-
Notifications
You must be signed in to change notification settings - Fork 3.1k
App Config Provider - Load Order Change #42905
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
Conversation
…configuration/provider/_azureappconfigurationproviderbase.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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 refactors the Azure App Configuration Provider to change the loading order from processing configurations and feature flags separately to loading everything first, then processing all at once. This architectural change supports future features like Snapshots and Configuration Mapping.
- Changes loading order to batch configurations and feature flags before processing
- Moves async tests into a dedicated folder structure
- Consolidates shared code between sync and async versions by extracting common functionality to the base class
Reviewed Changes
Copilot reviewed 7 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
_azureappconfigurationproviderasync.py | Main async provider implementation with refactored loading and refresh logic |
_async_client_manager.py | Async client manager with simplified feature flag handling and fixed dataclass initialization |
_client_manager_base.py | Moved shared functionality to base class, simplified interface |
_client_manager.py | Sync client manager mirroring async changes |
_azureappconfigurationproviderbase.py | Enhanced base class with shared utility functions and feature flag processing |
_azureappconfigurationprovider.py | Sync provider implementation using shared base functionality |
assets.json | Updated asset tag reference |
...azure-appconfiguration-provider/azure/appconfiguration/provider/aio/_async_client_manager.py
Show resolved
Hide resolved
...iguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_client_manager.py
Show resolved
Hide resolved
...configuration-provider/azure/appconfiguration/provider/_azureappconfigurationproviderbase.py
Outdated
Show resolved
Hide resolved
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Outdated
Show resolved
Hide resolved
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Outdated
Show resolved
Hide resolved
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Show resolved
Hide resolved
...configuration-provider/azure/appconfiguration/provider/_azureappconfigurationproviderbase.py
Outdated
Show resolved
Hide resolved
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Outdated
Show resolved
Hide resolved
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Outdated
Show resolved
Hide resolved
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Show resolved
Hide resolved
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Show resolved
Hide resolved
...iguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_client_manager.py
Outdated
Show resolved
Hide resolved
...iguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_client_manager.py
Show resolved
Hide resolved
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.
.
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Outdated
Show resolved
Hide resolved
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Outdated
Show resolved
Hide resolved
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Outdated
Show resolved
Hide resolved
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Outdated
Show resolved
Hide resolved
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Outdated
Show resolved
Hide resolved
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Outdated
Show resolved
Hide resolved
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Outdated
Show resolved
Hide resolved
...-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Outdated
Show resolved
Hide resolved
...iguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_client_manager.py
Outdated
Show resolved
Hide resolved
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
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
...configuration-provider/azure/appconfiguration/provider/_azureappconfigurationproviderbase.py
Show resolved
Hide resolved
...guration-provider/azure/appconfiguration/provider/aio/_azureappconfigurationproviderasync.py
Show resolved
Hide resolved
...configuration-provider/azure/appconfiguration/provider/_azureappconfigurationproviderbase.py
Show resolved
Hide resolved
...guration-provider/azure/appconfiguration/provider/aio/_azureappconfigurationproviderasync.py
Outdated
Show resolved
Hide resolved
...configuration-provider/azure/appconfiguration/provider/_azureappconfigurationproviderbase.py
Outdated
Show resolved
Hide resolved
for config in configuration_settings: | ||
if isinstance(config, FeatureFlagConfigurationSetting): | ||
feature_flags_processed = [] | ||
for settings in configuration_settings: |
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.
nit: setting
instead of settings
configuration_settings_processed = {} | ||
for config in configuration_settings: | ||
if isinstance(config, FeatureFlagConfigurationSetting): | ||
feature_flags_processed = [] |
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.
feature_flags_processed
is populated but not used anywhere. Does this also mean we ignore all feature flags that are fetched with key-value setting selectors are ignored/filtered out?
feature_flags_processed = [] | ||
for settings in configuration_settings: | ||
if isinstance(settings, FeatureFlagConfigurationSetting): | ||
# Feature flags are not processed like other settings |
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.
The comment says feature flags are not processed yet they seem to be processed though not used?
) | ||
settings_refreshed = True | ||
|
||
if self._feature_flag_refresh_enabled and self._feature_flag_refresh_timer.needs_refresh(): |
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.
Should refresh be happening if self._Feature_flag_enabled
is false?
Description
This should change nothing in how the provider operates.