Skip to content
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

Bug: Duplicated feature flags in configuration when there are two feature flags with the same name #562

Open
zhiyuanliang-ms opened this issue Jun 20, 2024 · 0 comments

Comments

@zhiyuanliang-ms
Copy link
Contributor

Currently, .NET provider will not dedupe feature flag based on id. It just overwrites the previous one.

The implementation details can be found here: https://github.com/Azure/AppConfiguration-DotnetProvider/blob/main/src/Microsoft.Extensions.Configuration.AzureAppConfiguration/FeatureManagement/FeatureManagementKeyValueAdapter.cs#L35

Then, there is a bug when there are two feature flags with the same name and different keys.

Here, we have two Beta feature flags with different keys.
FeatureFlags

The beta1 has a time window filter and the beta2 has a targeting filter. The .NET provider will produce such configuration:

Bug

You can see there is one Beta feature flag with two feature filters in the configuration.

The example I provided above is not a valid use case, but it illustrates the bug well.

Assuming that the user has a feature flag in a snapshot and there is another feature flag with the same name but different settings in the app config store (this could be a valid use case), this bug might cause some strange behaviors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant