Skip to content

[App Configuration] - Head request support#45858

Open
mrm9084 wants to merge 16 commits intoAzure:mainfrom
mrm9084:appconfigHeadRequests
Open

[App Configuration] - Head request support#45858
mrm9084 wants to merge 16 commits intoAzure:mainfrom
mrm9084:appconfigHeadRequests

Conversation

@mrm9084
Copy link
Copy Markdown
Member

@mrm9084 mrm9084 commented Mar 23, 2026

Description

Adds a way to check for app config changes via head request.

See JS version: Azure/azure-sdk-for-js#36959

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 March 23, 2026 20:41
@github-actions github-actions Bot added the App Configuration Azure.ApplicationModel.Configuration label Mar 23, 2026
Copy link
Copy Markdown
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

Adds a HEAD-based “check” API to Azure App Configuration’s Python client to support efficient change detection via page-level ETags (mirroring the JS SDK behavior).

Changes:

  • Introduces check_configuration_settings() on sync and async clients, backed by new generated HEAD operations.
  • Refactors generated paging/request preparation helpers and adds check_key_values_in_one_page implementations.
  • Adds new sync/async AAD tests plus a new usage sample; updates changelog and test recordings assets tag.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_azure_appconfiguration_client.py Adds sync check_configuration_settings() surface.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/aio/_azure_appconfiguration_client_async.py Adds async check_configuration_settings() surface.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_operations/_patch.py Adds sync generated HEAD operation + shared request/error-map helpers.
sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_operations/_patch.py Adds async generated HEAD operation + shared request/error-map helpers.
sdk/appconfiguration/azure-appconfiguration/tests/test_azure_appconfiguration_client_aad.py Adds sync AAD test covering page-level ETag monitoring via HEAD.
sdk/appconfiguration/azure-appconfiguration/tests/test_azure_appconfiguration_client_aad_async.py Adds async AAD test covering page-level ETag monitoring via HEAD.
sdk/appconfiguration/azure-appconfiguration/samples/check_configuration_settings_sample.py New sample demonstrating HEAD-based change checks via ETags.
sdk/appconfiguration/azure-appconfiguration/CHANGELOG.md Documents the new check_configuration_settings() feature.
sdk/appconfiguration/azure-appconfiguration/assets.json Updates assets tag for new recordings.

match_condition: Optional[MatchConditions] = None,
continuation_token: Optional[str] = None,
**kwargs: Any,
) -> dict:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you help explain the return type here? Is that because we return something that has @nextLink ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a dictionary with two items, nextlink and items. I'll update the doc.

accept_datetime: Optional[Union[datetime, str]] = None,
fields: Optional[List[Union[str, ConfigurationSettingFields]]] = None,
**kwargs: Any,
) -> ConfigurationSettingPaged:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect we return the same thing that list does, callers just need to know that the iterable will be empty.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return ItemPaged[ConfigurationSetting]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimmyca15 I actually looked into this a bit more and we need to return ConfigurationSettingPaged or we/our customers will have typing issues. This includes updating list to also return this. Note this isn't a breaking change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain the problem?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type checking fails on iterator = items.by_page(match_conditions=etags) as it doesn't see match_conditions as a valid input.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we need to make ConfigurationSettingPaged public?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if you look at the diff since your last review you should see me making it public.

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.

5 participants