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(v1.24):source=8d9bda8f24c
  • Loading branch information
sttts authored and soltysh committed Aug 19, 2022
1 parent 40eb983 commit f64f7b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 f64f7b8

Please sign in to comment.