-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
fix(config)!: nested environment config overrides #157
Conversation
04296c4
to
2b7269c
Compare
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #157 +/- ##
==========================================
- Coverage 44.08% 43.64% -0.44%
==========================================
Files 12 12
Lines 565 573 +8
==========================================
+ Hits 249 250 +1
- Misses 316 323 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Description
Behavior related to overriding configuration for nested elements via environment variables changed in config-rs@v0.9. We need to use
__
instead of_
separator to match nested fields. For details see rust-cli/config-rs#73.Also added some documentation that mentions it's possible to use environment variables to override configuration.
How Has This Been Tested?
All tests are passing locally, I updated
config::test::parse_config
and added a couple more env override assertions. I also tested in a small sandbox project and observed the following:history
result (with fix)
We can see that the first RC tag in history is being ignored as expected so the env override worked! 🎊
Types of Changes
Checklist: