Skip to content

Update missing filter handling to treat it as disabled when RequirementType.All (#586)#590

Merged
linglingye001 merged 2 commits intomainfrom
linglingye/update-missing-filter-evaluation
Apr 16, 2026
Merged

Update missing filter handling to treat it as disabled when RequirementType.All (#586)#590
linglingye001 merged 2 commits intomainfrom
linglingye/update-missing-filter-evaluation

Conversation

@linglingye001
Copy link
Copy Markdown
Member

@linglingye001 linglingye001 commented Apr 7, 2026

Why this PR?

In FeatureManager.cs L425, within the IsEnabledAsync method, there is a hard throw when IgnoreMissingFeatureFilters is true and a feature uses RequirementType.All:

if (featureDefinition.RequirementType == RequirementType.All &&
    _options.IgnoreMissingFeatureFilters)
{
    throw new FeatureManagementException(
        FeatureManagementError.Conflict,
        "The 'IgnoreMissingFeatureFilters' flag cannot be used in combination with a feature of requirement type 'All'.");
}
  • If any single feature uses RequirementType.All, the entire application crashes when that feature is evaluated, even though the option was intended for other features using RequirementType.Any.
  • It prevents users from enabling IgnoreMissingFeatureFilters globally in scenarios where they have a mix of RequirementType.Any and RequirementType.All features.

Fix #586

Visible Changes

Remove the throw for RequirementType.All && IgnoreMissingFeatureFilters, and update the missing filter handling to treat it as disabled when RequirementType.All

@jimmyca15
Copy link
Copy Markdown
Member

jimmyca15 commented Apr 15, 2026

PR title should be updated to reflect the specific scenario being addressed and issue linked.

@linglingye001 linglingye001 changed the title Update missing filter handling Update missing filter handling to treat it as disabled when RequirementType.All (#586) Apr 16, 2026
@linglingye001
Copy link
Copy Markdown
Member Author

PR title should be updated to reflect the specific scenario being addressed and issue linked.

Updated

@linglingye001 linglingye001 merged commit 442b8b1 into main Apr 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IgnoreMissingFeatureFilters Option Should Not Throw For RequirementType.All

2 participants