-
Notifications
You must be signed in to change notification settings - Fork 115
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
Nuget "Microsoft.FeatureManagement.AspNetCore" Version 3.3.0 - Multiple feature filters match the configured filter named 'Microsoft.TimeWindow' #447
Comments
What version did you upgrade from, and is the same setup working with the old version? |
Hi, @davidstarkcab I have reproduced the bug. This bug is introduced by 3.3.0. Sorry for the inconvenience. The reason of this bug is that in v3.3.0, we enhance the To resolve your problem, please downgrade to 3.2.0 or you can change this line builder.Services.AddFeatureManagement().AddFeatureFilter<ContextualTargetingFilter>().AddFeatureFilter<TimeWindowFilter>().AddFeatureFilter<PercentageFilter>(); to
Starting from 3.0.0, In the README, we said
This is a mistake, I should bold this to catch more eyes. I will update the README and fix the bug soon. |
3.2.0 and its the same setup |
@zhiyuanliang-ms Thanks! |
Our previous way to avoid duplicated registeration is to check the implementationType of existing ServiceDescriptor in the service collection. ServiceDescriptor doesn't allow us to set implementationType while using implementationFactory. I didn't come up a graceful solution. Currently, I have two was in my mind:
Remove the public Cache property of TimeWindowFilter and put it into the constructor
Ignore TimeWindowFilter in AddFeatureFilter() The FeatureManagementBuilder is internal, so our implementation of AddFeatureFilter() will only be called after calling AddFeatureManagement() where the TimeWindowFilter should have been registered |
Hi, @davidstarkcab Have you tried removing all |
@zhiyuanliang-ms Yes, now it works perfectly! Many thanks! |
|
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:
Here is how we encounter the error:
The text was updated successfully, but these errors were encountered: