Skip to content

Commit

Permalink
UPSTREAM: <carry>: warn only about unknown feature gates
Browse files Browse the repository at this point in the history
  • Loading branch information
sttts authored and damemi committed Aug 27, 2021
1 parent 274e9f5 commit b6cca55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -220,7 +220,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 @@ -52,7 +52,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 @@ -356,7 +356,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 b6cca55

Please sign in to comment.