You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow adding an item to the already defined default config in the hb_opts module. For example, adding another route or store to the already configured one.
Added root-only +key append and key+ prepend behavior in src/core/resolver/hb_opts.erl:677.
Binary, atom, and map values are wrapped in lists; lists remain unchanged.
+key+ and nested decorated keys are untouched.
Decorated root keys are removed from the merged configuration.
Integrated the merge into HB_CONFIG startup loading in src/core/http/hb_http_server.erl:39.
I was thinking about the use case for "stores", which is a structure with more than 1 key, and we accept either a map or a list.
For the on use case, we access it via the map, and we want to add a new entry (e.g., cache-write) to the on hook configuration. For this, we need another pattern.
+ on a message should be irrelevant because the default is to merge not replace anyway?
The default on edge is to replace.
The default on this branch is to concatenate into a list.
on hook is expecting it to be a map, so if we want to merge with the current default, we need to provide a different behaviour. Checking the previous type (list, map, ...) doesn't work, because <<"stores">> supports both (map and list).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow adding an item to the already defined default config in the
hb_optsmodule. For example, adding another route or store to the already configured one.+keyappend andkey+prepend behavior in src/core/resolver/hb_opts.erl:677.+key+and nested decorated keys are untouched.