Skip to content

Conversation

@mrm9084
Copy link
Member

@mrm9084 mrm9084 commented Nov 13, 2025

Description

  • fixing refresh always reloading everything, even with no change

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings November 13, 2025 21:23
@github-actions github-actions bot added the App Configuration Azure.ApplicationModel.Configuration label Nov 13, 2025
Copilot finished reviewing on behalf of mrm9084 November 13, 2025 21:25
Copy link
Contributor

Copilot AI left a 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_refresh tests 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

@mrm9084 mrm9084 merged commit 33db94b into Azure:main Nov 13, 2025
20 checks passed
@mrm9084 mrm9084 deleted the bugfix branch November 13, 2025 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

App Configuration Azure.ApplicationModel.Configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants