When we assign to a map that uses urls for keys, we need to lookup values from that map in the same manner. Without doing so, `Get` will return inconsistent results. The agent codebase generally doesn't call `Get` this way, because we've known url keys work weird, but viper uses this type of call within AllSettings() in order to rebuild the config. In some cases, this could corrupt the data in the config.
Viper 'UnmarshalKey' seems to have been designed to work on leaf
settings only. When being called on a group of settings, it would not
merge all sources (default, env vars, config, override, ...).
This means that using the `Set()` method could change the returned value
from 'UnmarshalKey' in unexpected ways (i.e. would no longer return the
value from the configuration).%
The second version of this fix correctly handles env vars override.
Fix Viper 'UnmarshalKey' behavior to include all sources
Viper 'UnmarshalKey' seems to have been designed to work on leaf
settings only. When being called on a group of settings, it would not
merge all sources (default, env vars, config, override, ...).
This means that using the `Set()` method could change the returned value
from 'UnmarshalKey' in unexpected ways (i.e. would no longer return the
value from the configuration).
This imports the `ci` workflow from
ab4b05adc6
with one modification noted in the file.
This omits the feedback workflows, as those are not required here. It
also omits the wasm workflow, as this old snapshot of the code does not
work in that context.
This commit removes the config watch feature of the library when building
on AIX. The fsnotify dependency required for this feature does not
currently compile on AIX, and we no not currently need this feature on AIX.
This commit removes the config watch feature of the library when building
on AIX. The fsnotify dependency required for this feature does not
currently compile on AIX, and we no not currently need this feature on AIX.
* Allow setting more than one env. variable into BindEnv.
* Allow setting value transformers which permit the modification of
an environment variable before being assigned to a key.