Add environment variable to disable feature management schema compatibility logic#676
Merged
zhiyuanliang-ms merged 14 commits intomainfrom Jul 20, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an environment variable to disable schema compatibility logic in the feature management provider, forcing all feature flags to use the Microsoft schema when enabled.
- Add
AZURE_APP_CONFIGURATION_FM_SCHEMA_COMPATIBILITY_DISABLEDsupport inFeatureManagementKeyValueAdapter - Update conditional logic to respect the new environment variable
- Add a new unit test covering forced Microsoft schema behavior
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Microsoft.Extensions.Configuration.AzureAppConfiguration/FeatureManagement/FeatureManagementKeyValueAdapter.cs | Read the new environment variable and adjust schema selection logic |
| tests/Tests.AzureAppConfiguration/Unit/FeatureManagementTests.cs | Add test verifying behavior when the environment variable is set or unset |
Comments suppressed due to low confidence (2)
src/Microsoft.Extensions.Configuration.AzureAppConfiguration/FeatureManagement/FeatureManagementKeyValueAdapter.cs:22
- [nitpick] Consider renaming this constant to
DisableFmSchemaCompatibilityEnvironmentVariableNameto clearly indicate it holds the environment variable name.
private const string DisableFmSchemaCompatibilityEnvironmentVariable = "AZURE_APP_CONFIGURATION_FM_SCHEMA_COMPATIBILITY_DISABLED";
tests/Tests.AzureAppConfiguration/Unit/FeatureManagementTests.cs:2345
- Add a unit test for explicitly setting the environment variable to an invalid value (e.g., "notabool") to verify the default behavior fallback.
// Act - Verify normal behavior when environment variable is not set
...ns.Configuration.AzureAppConfiguration/FeatureManagement/FeatureManagementKeyValueAdapter.cs
Outdated
Show resolved
Hide resolved
...ns.Configuration.AzureAppConfiguration/FeatureManagement/FeatureManagementKeyValueAdapter.cs
Show resolved
Hide resolved
…eatureManagement/FeatureManagementKeyValueAdapter.cs Co-authored-by: Copilot <[email protected]>
...ns.Configuration.AzureAppConfiguration/FeatureManagement/FeatureManagementKeyValueAdapter.cs
Outdated
Show resolved
Hide resolved
zhiyuanliang-ms
previously approved these changes
Jun 24, 2025
…//github.com/Azure/AppConfiguration-DotnetProvider into ajusupovic/add-fmschema-compatibility-envvar
jimmyca15
reviewed
Jul 15, 2025
...ns.Configuration.AzureAppConfiguration/FeatureManagement/FeatureManagementKeyValueAdapter.cs
Outdated
Show resolved
Hide resolved
jimmyca15
previously approved these changes
Jul 15, 2025
jimmyca15
requested changes
Jul 16, 2025
....Extensions.Configuration.AzureAppConfiguration/AzureAppConfigurationEnvironmentVariables.cs
Outdated
Show resolved
Hide resolved
jimmyca15
approved these changes
Jul 17, 2025
This was referenced Dec 17, 2025
Closed
This was referenced Jan 7, 2026
Closed
Closed
Closed
Merged
This was referenced Jan 27, 2026
Closed
Closed
Closed
This was referenced Feb 3, 2026
Closed
This was referenced Feb 16, 2026
This was referenced Mar 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the environment variable
AZURE_APP_CONFIGURATION_FM_SCHEMA_COMPATIBILITY_DISABLED. When set totrue, the provider will process and output all feature flags as the newer Microsoft schema. If false, the provider will function as it does today where a flag is only processed in the Microsoft schema if any of thevariants,allocation, ortelemetryproperties are present.