Skip to content

Commit ca4ba8a

Browse files
committed
pkg/payload/task: Handle MultipleErrors in SummaryForReason
The MultipleErrors reason landed in c2ac20f (status: Report the operators that have not yet deployed, 2019-04-09, #158), but for some reason was left out of SummaryForReason. I'm adding it in this commit to get something more useful than: $ oc adm upgrade info: An upgrade is in progress. Unable to apply 4.8.0-0.ci-2021-05-26-172803: an unknown error has occurred: MultipleErrors when the Failing=True message is: Multiple errors are preventing progress: * Cluster operator machine-api is updating versions * Cluster operator openshift-apiserver is updating versions I'm not entirely clear on why these didn't fallback to the "unknown error" strings at the bottom of SummaryForReason, but they don't seem to have done so.
1 parent 3228124 commit ca4ba8a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/payload/task.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,11 @@ func SummaryForReason(reason, name string) string {
264264
return fmt.Sprintf("the workload %s cannot roll out", name)
265265
}
266266
return "a workload cannot roll out"
267+
case "MultipleErrors":
268+
if len(name) > 0 {
269+
return fmt.Sprintf("the workload %s cannot roll out", name)
270+
}
271+
return "multiple errors reconciling the payload"
267272
}
268273

269274
if strings.HasPrefix(reason, "UpdatePayload") {

0 commit comments

Comments
 (0)