-
Notifications
You must be signed in to change notification settings - Fork 112
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
Can't Upgrade to v3.0.0 - "The feature filter '' specified for feature '' was not found. #313
Comments
@hilljaycie14 You reference an example feature "TEST-123". What filters is that feature registered to use? |
@hilljaycie14 I took a look and here's what I've found. Version 3.0 has introduced a behavior change, perhaps one we can consider a regression/bug. In version 2.6.1 it was fine for a feature to reference a contextual feature filter and not use it. The system would detect that the contextual filter referenced does exist, but since no app context was provided it would simply ignore evaluating the contextual filter. It's debatable whether or not this was the right behavior to be implemented, but nonetheless it's how it worked. v3.0 changed this. Now, if a contextual filter is referenced, but no context that can be used for the filter is passed, then the system errors. At a glance, it seems we should allow things to work as they did in 2.6.1 |
@hilljaycie14 A work around solution is to set the IgnoreMissingFeatureFilters option as true. |
I checked the behavior in 2.6.1. Let's say you have a non-contextual filter called FilterA and a contextual filters FilterB which accepts TypeT. When you call IsEnabledAsync("MyFeature") When you call IsEnabledAsync("MyFeature", context), if context's type is TypeT When you call IsEnabledAsync("MyFeature", context), if context's type is TypeF |
Thank you all for your quick responses, it is greatly appreciated!
The registration is as follows, some code omitted for privacy concerns:
@zhiyuanliang-ms thank you for your workaround && getting a quick PR up! Greatly appreciated! |
Breaking change was not reported for the following scenario "FeatureManagement": {
"FeatureToCheck": {
"RequirementType": "Any",
"EnabledFor": [
{
"Name": "ContextualFilter"
},
{
"Name": "NonContextualFilter"
}
]
}
} |
@MoazAlkharfan Yes, this is a breaking change. This PR #314 fixed it. We are going to release 3.1.0 in the following days. 3.1.0 will include bug fix and some other new features. |
Fixed in release 3.1.0 |
Our team implements two custom feature filters:
MyContextualFilter
&MyFeatureFilter
.As soon as we upgrade from v2.6.1, we receive the following error
Microsoft.FeatureManagement.FeatureManagementException: The feature filter 'MyContextual' specified for feature 'TEST-123' was not found.
after callingawait _featureManager.IsEnabledAsync("TEST-123")
.EvaluateAsync
is never hitThis is where the error originates from and it seems like it has to be related to this change, as its the only change on this file since v3.0.0 was released.
Anyone have any ideas? Really scratching our heads here, and we need to upgrade ASAP
ETA: it seems weird that the contextual filter would be throwing an error when no context is being provided to use that filter
The text was updated successfully, but these errors were encountered: