-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[App Configuration] - Head request support #54669
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
base: main
Are you sure you want to change the base?
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 adds HEAD request support to the Azure App Configuration client, enabling efficient change detection for configuration settings without retrieving full response bodies. The new methods CheckConfigurationSettingsAsync and CheckConfigurationSettings use HTTP HEAD requests to check if settings have changed by examining response status codes and headers (like ETags) while minimizing bandwidth usage.
Key Changes:
- Added
CheckConfigurationSettingsAsyncandCheckConfigurationSettingspublic methods that return pageable collections with empty Values but populated response headers - Implemented
ParseCheckConfigurationSettingsResponseto extract pagination tokens from Link headers without parsing response bodies - Added comprehensive test coverage for both modified and unmodified scenarios, including validation that 304 responses don't trigger warnings
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| sdk/appconfiguration/Azure.Data.AppConfiguration/src/ConfigurationClient.cs | Adds new public Check methods and supporting infrastructure including CheckConfigurationSettingsPageableImplementation helper and ParseCheckConfigurationSettingsResponse parser |
| sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationLiveTests.cs | Adds 6 test methods covering async/sync variants for unmodified pages, modified pages, and warning log validation scenarios |
| sdk/appconfiguration/Azure.Data.AppConfiguration/assets.json | Updates test assets tag to reflect new test recordings |
sdk/appconfiguration/Azure.Data.AppConfiguration/src/ConfigurationClient.cs
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationLiveTests.cs
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationLiveTests.cs
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/src/ConfigurationClient.cs
Show resolved
Hide resolved
sdk/appconfiguration/Azure.Data.AppConfiguration/src/ConfigurationClient.cs
Show resolved
Hide resolved
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
Added new public methods to
ConfigurationClientpublic virtual AsyncPageable<ConfigurationSetting> CheckConfigurationSettingsAsync(SettingSelector, CancellationToken)public virtual Pageable<ConfigurationSetting> CheckConfigurationSettings(SettingSelector, CancellationToken)that send HTTP HEAD requests to check for configuration setting changes without retrieving the full response body. This feature enables efficient watching scenarios by reducing bandwidth usage while still allowing clients to detect changes via response headers.