diff --git a/pkg/cvo/internal/operatorstatus.go b/pkg/cvo/internal/operatorstatus.go index 0fad320195..cda58cd74b 100644 --- a/pkg/cvo/internal/operatorstatus.go +++ b/pkg/cvo/internal/operatorstatus.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" "sort" - "strings" "time" "unicode" @@ -137,23 +136,7 @@ func waitForOperatorStatusToBeDone(ctx context.Context, interval time.Duration, } sort.Strings(keys) - var reports []string - for _, op := range keys { - // we do not need to report `operator` version. - if op == "operator" { - continue - } - ver := undone[op] - if len(ver) == 1 { - reports = append(reports, fmt.Sprintf("missing version information for %s", op)) - continue - } - reports = append(reports, fmt.Sprintf("upgrading %s from %s to %s", op, ver[1], ver[0])) - } message := fmt.Sprintf("Cluster operator %s is still updating", actual.Name) - if len(reports) > 0 { - message = fmt.Sprintf("Cluster operator %s is still updating: %s", actual.Name, strings.Join(reports, ", ")) - } lastErr = &payload.UpdateError{ Nested: errors.New(lowerFirst(message)), Reason: "ClusterOperatorNotAvailable", @@ -176,11 +159,6 @@ func waitForOperatorStatusToBeDone(ctx context.Context, interval time.Duration, available = true case condition.Type == configv1.OperatorProgressing && condition.Status == configv1.ConditionFalse: progressing = false - case condition.Type == configv1.ClusterStatusConditionType("Failing"): - if condition.Status == configv1.ConditionFalse { - failing = false - } - failingCondition = condition case condition.Type == configv1.OperatorDegraded: if condition.Status == configv1.ConditionFalse { degradedValue = false diff --git a/pkg/cvo/internal/operatorstatus_test.go b/pkg/cvo/internal/operatorstatus_test.go index 066e11b4a5..4ccbc90aca 100644 --- a/pkg/cvo/internal/operatorstatus_test.go +++ b/pkg/cvo/internal/operatorstatus_test.go @@ -83,9 +83,9 @@ func Test_waitForOperatorStatusToBeDone(t *testing.T) { }, }, expErr: &payload.UpdateError{ - Nested: fmt.Errorf("cluster operator test-co is still updating: missing version information for operand-1"), + Nested: fmt.Errorf("cluster operator test-co is still updating"), Reason: "ClusterOperatorNotAvailable", - Message: "Cluster operator test-co is still updating: missing version information for operand-1", + Message: "Cluster operator test-co is still updating", Name: "test-co", }, }, { @@ -109,9 +109,9 @@ func Test_waitForOperatorStatusToBeDone(t *testing.T) { }, }, expErr: &payload.UpdateError{ - Nested: fmt.Errorf("cluster operator test-co is still updating: missing version information for operand-1"), + Nested: fmt.Errorf("cluster operator test-co is still updating"), Reason: "ClusterOperatorNotAvailable", - Message: "Cluster operator test-co is still updating: missing version information for operand-1", + Message: "Cluster operator test-co is still updating", Name: "test-co", }, }, { @@ -137,9 +137,9 @@ func Test_waitForOperatorStatusToBeDone(t *testing.T) { }, }, expErr: &payload.UpdateError{ - Nested: fmt.Errorf("cluster operator test-co is still updating: upgrading operand-1 from v0 to v1"), + Nested: fmt.Errorf("cluster operator test-co is still updating"), Reason: "ClusterOperatorNotAvailable", - Message: "Cluster operator test-co is still updating: upgrading operand-1 from v0 to v1", + Message: "Cluster operator test-co is still updating", Name: "test-co", }, }, { @@ -165,9 +165,9 @@ func Test_waitForOperatorStatusToBeDone(t *testing.T) { }, }, expErr: &payload.UpdateError{ - Nested: fmt.Errorf("cluster operator test-co is still updating: upgrading operand-1 from v0 to v1"), + Nested: fmt.Errorf("cluster operator test-co is still updating"), Reason: "ClusterOperatorNotAvailable", - Message: "Cluster operator test-co is still updating: upgrading operand-1 from v0 to v1", + Message: "Cluster operator test-co is still updating", Name: "test-co", }, }, { @@ -197,9 +197,9 @@ func Test_waitForOperatorStatusToBeDone(t *testing.T) { }, }, expErr: &payload.UpdateError{ - Nested: fmt.Errorf("cluster operator test-co is still updating: upgrading operand-1 from v0 to v1, upgrading operand-2 from v0 to v1"), + Nested: fmt.Errorf("cluster operator test-co is still updating"), Reason: "ClusterOperatorNotAvailable", - Message: "Cluster operator test-co is still updating: upgrading operand-1 from v0 to v1, upgrading operand-2 from v0 to v1", + Message: "Cluster operator test-co is still updating", Name: "test-co", }, }, { @@ -229,9 +229,9 @@ func Test_waitForOperatorStatusToBeDone(t *testing.T) { }, }, expErr: &payload.UpdateError{ - Nested: fmt.Errorf("cluster operator test-co is still updating: upgrading operand-2 from v0 to v1"), + Nested: fmt.Errorf("cluster operator test-co is still updating"), Reason: "ClusterOperatorNotAvailable", - Message: "Cluster operator test-co is still updating: upgrading operand-2 from v0 to v1", + Message: "Cluster operator test-co is still updating", Name: "test-co", }, }, {