Skip to content

Nuget "Microsoft.FeatureManagement.AspNetCore" Version 3.3.0 - Multiple feature filters match the configured filter named 'Microsoft.TimeWindow' #447

Closed
@davidstarkcab

Description

@davidstarkcab

Hello!

After we updated the NuGet package Microsoft.FeatureManagement.AspNetCore to version 3.3.0, we started receiving the following exception: "Multiple feature filters match the configured filter named 'Microsoft.TimeWindow'" whenever we have multiple feature toggles activated with Microsoft.TimeWindow.

This is how we configure it:

builder.Services.AddFeatureManagement().AddFeatureFilter<ContextualTargetingFilter>().AddFeatureFilter<TimeWindowFilter>().AddFeatureFilter<PercentageFilter>();

 builder.Configuration.AddAzureAppConfiguration(options =>
 {
     options.Connect(url, credentials).UseFeatureFlags(options =>
     {
         options.Select("*", environment);
         options.CacheExpirationInterval = TimeSpan.FromSeconds(30);
     });

     configurationRefresher = options.GetRefresher();
 });

Here is how we encounter the error:

await _configurationRefresher.TryRefreshAsync();

TargetingContext targetingContext = new TargetingContext
{
    Groups = Groups,
    UserId = String.Empty
};

var features = new List<FeatureToggle>();

await foreach (var featureName in _featureManagerSnapshot.GetFeatureNamesAsync())
{
    var feature = new FeatureToggle
    {
        Feature = featureName,
        IsEnabled = await _featureManagerSnapshot.IsEnabledAsync(featureName, targetingContext)
    };
    features.Add(feature);
}

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions