Skip to content

Commit

Permalink
UPSTREAM: <carry>: warn only about unknown feature gates
Browse files Browse the repository at this point in the history
OpenShift-Rebase-Source: a137009
  • Loading branch information
sttts authored and soltysh committed Dec 20, 2023
1 parent 122e917 commit b1167bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -224,7 +224,8 @@ func (f *featureGate) SetFromMap(m map[string]bool) error {
k := Feature(k)
featureSpec, ok := known[k]
if !ok {
return fmt.Errorf("unrecognized feature gate: %s", k)
klog.Warningf("unrecognized feature gate: %s", k)
continue
}
if featureSpec.LockToDefault && featureSpec.Default != v {
return fmt.Errorf("cannot set feature gate %v to %v, feature is locked to %v", k, v, featureSpec.Default)
Expand Down
Expand Up @@ -56,7 +56,7 @@ func TestFeatureGateFlag(t *testing.T) {
testAlphaGate: false,
testBetaGate: false,
},
parseError: "unrecognized feature gate: fooBarBaz",
//parseError: "unrecognized feature gate: fooBarBaz",
},
{
arg: "AllAlpha=false",
Expand Down Expand Up @@ -360,7 +360,7 @@ func TestFeatureGateSetFromMap(t *testing.T) {
testAlphaGate: false,
testBetaGate: false,
},
setmapError: "unrecognized feature gate:",
//setmapError: "unrecognized feature gate:",
},
{
name: "set locked gates",
Expand Down

0 comments on commit b1167bf

Please sign in to comment.