question

IvanDobrynskyi-4592 avatar image
0 Votes"
IvanDobrynskyi-4592 asked ryanchill edited

Using Feature Flags with label and null label values cause dynamic response from the feature manager

Hi all, we had an issue with using feature flags.
We have a feature with the same name
We apply the code and expect to read all features and the labeled should always override the null labeled one.

.UseFeatureFlags(featureFlagOptions =>
                    {
                        featureFlagOptions.Label = LabelFilter.Null;
                    }).UseFeatureFlags(featureFlagOptions =>
                    {
                        featureFlagOptions.Label = label;
                    })


And as a result, we had a dynamic response from the feature manager with
During the first call, we had the label value, but then all the rest calls we had only null labeled values


azure-webappsazure-app-configuration
image.png (6.3 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ryanchill avatar image
0 Votes"
ryanchill answered

Hi @IvanDobrynskyi-4592,

I'm not certain why you're chaining the call like that, but I would do the following:

// Augment the ConfigurationBuilder with Azure App Configuration
// Pull the connection string from an environment variable
configBuilder.AddAzureAppConfiguration(options => {
    options.Connect(configuration["connection_string"])
           .Select("CustomFeature*", LabelFilter.Null)
           .Select("CustomFeature*", "label")
           .UseFeatureFlags();
});


This allows you to pull CustomFeature key value pairs along based on the feature flag it's associated with.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.