Skip to content

Commit 2a598bd

Browse files
Merge pull request #48 from microsoft/release/v1.1.2
Merge release/v1.1.2 to main
2 parents c1c187e + 7445c72 commit 2a598bd

6 files changed

Lines changed: 912 additions & 5 deletions

File tree

featuremanagement/feature_manager.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func (fm *FeatureManager) GetFeatureNames() []string {
167167
return nil
168168
}
169169

170-
res := make([]string, 0, len(flags))
170+
res := make([]string, len(flags))
171171
for i, flag := range flags {
172172
res[i] = flag.ID
173173
}
@@ -202,6 +202,11 @@ func (fm *FeatureManager) isEnabled(featureFlag FeatureFlag, appContext any) (bo
202202
matchedFeatureFilter, exists := fm.featureFilters[clientFilter.Name]
203203
if !exists {
204204
log.Printf("Feature filter %s is not found", clientFilter.Name)
205+
if requirementType == RequirementTypeAny {
206+
// When "Any", skip missing filters and continue evaluating the rest
207+
continue
208+
}
209+
// When "All", a missing filter means the feature cannot be enabled
205210
return false, nil
206211
}
207212

0 commit comments

Comments
 (0)