UTIL: cfg parser respect inherited vars #545
Open
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.
What
Fixes config file parsing with respect to inherited variables
Why ?
When the variable in the config table is inherited from another parent table (e.g., TLS var in CLs is defined in parent ucc_cl_base_config), and user sets the top variable in the env it gets overwritten by the file configuration.
For example,
if there is cfg file with entry:
UCC_CL_BASIC_TLS=^sharp
and user runs app with: UCC_TLS=ucp , then the value of CL_BASIC_TLS would still be "^sharp", i.e. all except sharp - not what user expects (which is "ucp" only).
How ?
When applying value from cfg file database need to check if there is a parent variable setting in the environment and then skip it in that case.