Skip to content

Defining features using MicrosoftSchema in AzureAppConfiguration and appsetting.json does not work when not using variants #627

@emilssonn

Description

@emilssonn

When AzureAppConfiguration loads features/config from Azure it checks for the existence of Variants, Allocation or Telemetry to decide what feature flag schema to use. If none of these are found it loads the config/feature in the DotnetSchema instead of the MicrosoftSchema. This makes merging features defined using the MicrosoftSchema in other config sources and the MicrosoftSchema impossible if not using a variant flag.

When following https://learn.microsoft.com/en-us/azure/azure-app-configuration/feature-management-dotnet-reference#feature-flag-declaration and then adding AzureAppConfiguration the feature flags defined in appsettings.json using MicrosoftSchema cannot be overridden using AzureAppConfiguration if not using variants.

Steps to reproduce:

  1. Add feature flags in appsettings.json using the MicrosoftSchema and not using variants.
  2. Connect to AzureAppConfiguration.
  3. Add the same feature flag (not variant)
  4. In AzureAppConfiguration, enabled/disable the feature flag.
  5. Nothing changes in the application (restart to reload if needed)

There should be some way (or the library should have more logic) to force the library to always call ProcessMicrosoftSchemaFeatureFlag in this section:

if ((featureFlag.Variants != null && featureFlag.Variants.Any()) || featureFlag.Allocation != null || featureFlag.Telemetry != null)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions