Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 292e409

Browse files
committedMar 26, 2025·
Extract two cases from convertErrorToProgressing into its own function
1 parent bdb8777 commit 292e409

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎pkg/cvo/status.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -598,13 +598,13 @@ func convertErrorToProgressingForUpdateEffectNone(uErr *payload.UpdateError, now
598598
}
599599
// returns true in those slow cases because it is still only a suspicion
600600
if len(exceeded) > 0 && !machineConfig {
601-
return slowCOUpdatePrefix + uErr.Reason, fmt.Sprintf("waiting on %s over 30 minutes which is longer than expected", strings.Join(exceeded, ", ")), true
601+
return fmt.Sprintf("%s%s", slowCOUpdatePrefix, uErr.Reason), fmt.Sprintf("waiting on %s over 30 minutes which is longer than expected", strings.Join(exceeded, ", ")), true
602602
}
603603
if len(exceeded) > 0 && machineConfig {
604-
return slowCOUpdatePrefix + uErr.Reason, fmt.Sprintf("waiting on %s over 30 minutes and machine-config over 90 minutes which is longer than expected", strings.Join(exceeded, ", ")), true
604+
return fmt.Sprintf("%s%s", slowCOUpdatePrefix, uErr.Reason), fmt.Sprintf("waiting on %s over 30 minutes and machine-config over 90 minutes which is longer than expected", strings.Join(exceeded, ", ")), true
605605
}
606606
if len(exceeded) == 0 && machineConfig {
607-
return slowCOUpdatePrefix + uErr.Reason, "waiting on machine-config over 90 minutes which is longer than expected", true
607+
return fmt.Sprintf("%s%s", slowCOUpdatePrefix, uErr.Reason), "waiting on machine-config over 90 minutes which is longer than expected", true
608608
}
609609
return uErr.Reason, fmt.Sprintf("waiting on %s", strings.Join(names, ", ")), true
610610
}

0 commit comments

Comments
 (0)
Please sign in to comment.