Skip to content

Commit b83ac37

Browse files
committed
comments: address review feedback from #1190
Improve comments to clarify some concerns from earlier PR feedback.
1 parent db8190f commit b83ac37

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

pkg/featuregates/featuregates.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ import (
88
// StubOpenShiftVersion is the default OpenShift version placeholder for the purpose of determining
99
// enabled and disabled CVO feature gates. It is assumed to never conflict with a real OpenShift
1010
// version. Both DefaultCvoGates and CvoGatesFromFeatureGate should return a safe conservative
11-
// default set of enabled and disabled gates, typically with unknownVersion set to true.
11+
// default set of enabled and disabled gates when StubOpenShiftVersion is passed as the version.
12+
// This value is an analogue to the "0.0.1-snapshot" string that is used as a placeholder in
13+
// second-level operator manifests. Here we use the same string for consistency, but the constant
14+
// should be only used by the callers of CvoGatesFromFeatureGate and DefaultCvoGates methods when
15+
// the caller does not know its actual OpenShift version.
1216
const StubOpenShiftVersion = "0.0.1-snapshot"
1317

1418
// CvoGateChecker allows CVO code to check which feature gates are enabled

pkg/start/start.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ func (o *Options) processInitialFeatureGate(ctx context.Context, configInformerF
256256
var clusterFeatureGate *configv1.FeatureGate
257257

258258
// client-go automatically retries some network blip errors on GETs for 30s by default, and we want to
259-
// retry the remaining ones ourselves. If we fail longer than that, the operator won't be able to do work
260-
// anyway. Return the error and crashloop.
259+
// retry the remaining ones ourselves. If we fail longer than that, CVO won't be able to do work anyway.
260+
// Return the error and crashloop.
261261
//
262262
// We implement the timeout with a context because the timeout in PollImmediateWithContext does not behave
263263
// well when ConditionFunc takes longer time to execute, like here where the GET can be retried by client-go
@@ -672,8 +672,8 @@ func (c *Context) InitializeFromPayload(ctx context.Context, restConfig *rest.Co
672672
var clusterFeatureGate *configv1.FeatureGate
673673

674674
// client-go automatically retries some network blip errors on GETs for 30s by default, and we want to
675-
// retry the remaining ones ourselves. If we fail longer than that, the operator won't be able to do work
676-
// anyway. Return the error and crashloop.
675+
// retry the remaining ones ourselves. If we fail longer than that, CVO won't be able to do work anyway.
676+
// Return the error and crashloop.
677677
//
678678
// We implement the timeout with a context because the timeout in PollImmediateWithContext does not behave
679679
// well when ConditionFunc takes longer time to execute, like here where the GET can be retried by client-go

0 commit comments

Comments
 (0)