Repository navigation
fix(parameters): key appconfig default provider by environment and ap… - #8635
Conversation
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
leandrodamascena
left a comment
There was a problem hiding this comment.
Thanks @codewithzubair07, nice first contribution! I ran the suites and also tested it against two real AppConfig applications with the same profile name: develop reads app A's config when you ask for app B, your branch returns the right one for each. Same app and environment reuse the provider, and clear_caches() still clears everything.
Approving now. This goes out in 3.38.0, so it will sit here a bit before I merge. No need to rebase or touch anything, I'll take care of it and you'll get the credit in the release notes. Thank you!
Thanks for the review and for testing it against real AppConfig apps, that’s a more thorough check than I could do on my side. Happy to leave the merge and rebase to you. Thanks for the credit in the 3.38.0 notes! |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8635 +/- ##
========================================
Coverage 96.93% 96.93%
========================================
Files 318 318
Lines 16075 16076 +1
Branches 1436 1436
========================================
+ Hits 15583 15584 +1
Misses 349 349
Partials 143 143 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |



Issue number: closes #8588
Summary
Changes
get_app_config created one provider on the first call and reused it, so later calls with a different environment or application read the wrong config. The provider is now cached per environment/application pair. Added a test for two apps/environments and updated the three tests that set the old "appconfig" key.
User experience
Before: a function reading two applications or environments silently got the first one's config. After: each call uses the environment and application it was given.
Ran tests/functional/parameters, ruff and mypy locally. Also ran the repro from the issue, which needed AWS_DEFAULT_REGION set (no AWS credentials).
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.