-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(config): add multiple file config sources #1907
Conversation
NET-594 Add option to Nox CLI to consume several Config.tomls
|
What about I remember @nahsi said it's important cuz Ansible can reorder flags. |
I have discussed these options with @nahsi and it is not the ansible problem. It is a problem with some cases (like jinja2) when software uses a map for args instead of vec. The map doesn't have the order. Also, he showed as an example a consul agent, but it works in the same way (you can pass -config-file multiple times and the last has higher priority and overrides the previous) |
Co-authored-by: folex <[email protected]>
Co-authored-by: folex <[email protected]>
Description
Allow to pass --config argument multiple times and allow to pass multiple paths in FLUENCE_CONFIG env.
Motivation
Want to have a layered configuration: define based things in one file and override them with another config.
Related Issue(s)
https://linear.app/fluence/issue/NET-594/add-option-to-nox-cli-to-consume-several-configtomls
https://linear.app/fluence/issue/NET-616/remove-unused-options-in-nox-config
Proposed Changes
The initial file for loading is a Config.toml located near the nox binary file but it is not required.
The second priority is all files from FLUENCE_CONFIG env, separated by comma (,)
The last priority is files passed by the --config argument. The last config has the higher priority and overrides provided values from previous configs. All files provided by FLUENCE_CONFIG and --config should exist.
Additional Notes
Also removed unused values in configs.
Checklist
Reviewer Checklist