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
Cnfig contex are being merged as defined in documentation. Context with higher weight overwrites the lower.
This works good for contexts with simple JSON values. With object and list this behavior is not consistent.
JSON List follows merging like variables and JSON object are being merged to a new object including keys from both context.
This is w very practical but not documented feature. It would be good if lists could use the same merging schema.
We use merging of objects to add some additional items for a group of devices.
Fe: We set 2 DNS Server in Region, but for some devices we add a third one.
With object and list this behavior is not consistent.
The behavior is consistent, it's just not what you want. Each key within a higher-weight ConfigContext will overwrite the same key (if any) in a lower-weight ConfigContext, regardless of value type. This is by design, and allows us to reliably overwrite lists or dictionaries as needed. (For example, setting a global list of NTP servers, and overwriting it with a region-specific list.) Changing this would break the current behavior.
Environment
Proposed Functionality
Cnfig contex are being merged as defined in documentation. Context with higher weight overwrites the lower.
This works good for contexts with simple JSON values. With object and list this behavior is not consistent.
JSON List follows merging like variables and JSON object are being merged to a new object including keys from both context.
This is w very practical but not documented feature. It would be good if lists could use the same merging schema.
We use merging of objects to add some additional items for a group of devices.
Fe: We set 2 DNS Server in Region, but for some devices we add a third one.
I am not sure it is a bug or feature.
Use Case
Functionality now:
Context A
{
"list": ["1", "2"],
"obj": {"one": "this"}
}
Context B
{
"list": ["10", "20"],
"obj": {"two": "that"}
}
Resulting context:
{
"list": ["1", "2"],
"obj": {
"one": "this",
"two": "that"
}
}
Expected context:
{
"list": ["1", "2", "10", "20"],
"obj": {
"one": "this",
"two": "that"
}
}
Database Changes
External Dependencies
The text was updated successfully, but these errors were encountered: