-
Notifications
You must be signed in to change notification settings - Fork 3.2k
App Config Provider Bug Fix #44012
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
App Config Provider Bug Fix #44012
Conversation
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.
Pull Request Overview
This PR fixes a bug where the refresh() method was always triggering a full reload of configuration settings, even when no watched keys had changed. The fix introduces a flag to track whether any watched settings actually changed before triggering a refresh.
Key changes:
- Modified
get_updated_watched_settings()to return an empty dictionary when no changes are detected, preventing unnecessary reloads - Added comprehensive test coverage with new
test_no_refreshtests to verify the fix - Updated test cases to properly specify labels for WatchKey instances
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| azure/appconfiguration/provider/_client_manager.py | Added trigger_refresh flag to return empty dict when no watched settings change |
| azure/appconfiguration/provider/aio/_async_client_manager.py | Applied same fix as sync version for async implementation |
| tests/test_provider_refresh.py | Added test_no_refresh test case and imported ConfigurationSetting |
| tests/aio/test_async_provider_refresh.py | Added async version of test_no_refresh test case |
| tests/key_vault/test_secret_refresh.py | Added label parameter to WatchKey for proper test setup |
| tests/aio/key_vault/test_async_secret_refresh.py | Added label parameter to WatchKey for async test |
| CHANGELOG.md | Updated with bug fix description and release date |
Description
refreshalways reloading everything, even with no changeAll SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines