Fixing App Configuration Provider Readme#46611
Conversation
There was a problem hiding this comment.
Pull request overview
Updates azure-appconfiguration-provider documentation and samples to correct feature flag enablement naming, expand README feature coverage, and adopt snippet-driven documentation blocks.
Changes:
- Corrects README parameter name to
feature_flag_enabledand refresh-related examples. - Adds
[START ...]/[END ...]snippet markers across multiple samples for README snippet inclusion. - Updates README content to cover additional features (tags, snapshots, geo-replication, secret refresh, async) and aligns terminology to “Entra ID”.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/appconfiguration/azure-appconfiguration-provider/README.md | Major README refresh: snippet references, new feature sections, corrected feature-flag enablement naming, Entra ID terminology. |
| sdk/appconfiguration/azure-appconfiguration-provider/samples/snapshot_sample.py | Adds snippet regions for snapshot loading and feature-flag loading from snapshots. |
| sdk/appconfiguration/azure-appconfiguration-provider/samples/refresh_sample.py | Adds snippet region intended for README dynamic refresh example. |
| sdk/appconfiguration/azure-appconfiguration-provider/samples/refresh_sample_feature_flags.py | Adds snippet region intended for README feature-flag refresh example. |
| sdk/appconfiguration/azure-appconfiguration-provider/samples/key_vault_reference_sample.py | Adds snippet region for Key Vault reference resolution example; updates wording to Entra ID. |
| sdk/appconfiguration/azure-appconfiguration-provider/samples/key_vault_reference_customized_clients_sample.py | Adds snippet region for Key Vault “provided client configs” example; updates wording to Entra ID. |
| sdk/appconfiguration/azure-appconfiguration-provider/samples/entra_id_sample.py | Adds snippet regions for Entra ID creation and selector examples used by README. |
| sdk/appconfiguration/azure-appconfiguration-provider/samples/connection_string_sample.py | Adds snippet regions for connection-string creation and selector examples used by README. |
| sdk/appconfiguration/azure-appconfiguration-provider/samples/async_entra_id_sample.py | Adds snippet markers for async Entra ID examples used by README. |
| sdk/appconfiguration/azure-appconfiguration-provider/samples/async_key_vault_reference_sample.py | Wording update from AAD to Entra ID. |
| sdk/appconfiguration/azure-appconfiguration-provider/samples/async_key_vault_reference_provided_clients_sample.py | Wording update from AAD to Entra ID. |
| sdk/appconfiguration/azure-appconfiguration-provider/samples/README.md | Updates sample table entry from AAD sample naming to entra_id_sample.py. |
Comments suppressed due to low confidence (2)
sdk/appconfiguration/azure-appconfiguration-provider/samples/refresh_sample_feature_flags.py:53
- The sample indexes feature flags with
[1](e.g.,config["feature_management"]["feature_flags"][1]), but this list may contain only a single feature flag (the sample only creates "Beta"). This can raiseIndexErrorat runtime; use[0]or (preferably) locate the flag byid.
print(config["message"])
print(config["my_json"]["key"])
print(config["feature_management"]["feature_flags"][1])
sdk/appconfiguration/azure-appconfiguration-provider/samples/async_entra_id_sample.py:34
- Within the newly added
[START trim_prefixes_aad_async]snippet, the comment still says “using AAD”, but the rest of the docs/samples have switched terminology to “Entra ID”. For consistency (and to avoid reader confusion), update this comment to “Entra ID”.
| @@ -40,6 +43,7 @@ def my_callback_on_fail(_): | |||
| on_refresh_error=my_callback_on_fail, | |||
| **kwargs, | |||
| ) | |||
| # [END refresh_provider] | |||
There was a problem hiding this comment.
The refresh_provider snippet block references watch_key (and also connection_string / kwargs) that are defined outside the [START refresh_provider] / [END refresh_provider] region. When this snippet is pulled into the package README it becomes non-runnable due to missing definitions. Consider moving the snippet start upward to include the variable setup (or inline WatchKey("...") and a connection string placeholder inside the snippet).
| from azure.appconfiguration.provider import load, SettingSelector | ||
|
|
||
| # Filtering by tags | ||
| selects = [SettingSelector(key_filter="*", tag_filters=["env=prod"])] | ||
| config = load(endpoint=endpoint, credential=credential, selects=selects, **kwargs) | ||
| ``` |
|
|
||
| ### Secret Refresh Interval | ||
|
|
||
| When using Key Vault references, the provider can periodically refresh resolved secrets. By default, secrets are refreshed every 60 seconds. You can customize this with the `secret_refresh_interval` parameter (minimum 1 second). |
| config = load( | ||
| connection_string=connection_string, | ||
| refresh_on=[WatchKey("message")], | ||
| refresh_on_feature_flags=True, |
Description
Fixes: #46466
Plus, general updates to the readme of missing feature, and updates to use the snippets feature.
Replaces AAD with Entra ID