Skip to content

Commit

Permalink
feat: RHTAPBUGS-985: retry pipelineruns when hit TaskRunImagePullFail…
Browse files Browse the repository at this point in the history
…ed reason in Pipelinerun statuses (#906)

retry pipelineruns when hit TaskRunImagePullFailed reason in Pipelineruns statuses
  • Loading branch information
flacatus authored Nov 23, 2023
1 parent c3b981c commit 25a743c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/clients/has/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,9 @@ func (h *HasController) WaitForComponentPipelineToBeFinished(component *appservi

if err != nil {
GinkgoWriter.Printf("attempt %d/%d: PipelineRun %q failed: %+v", attempts, maxRetries+1, pr.GetName(), err)
// Retry the PipelineRun only in case we hit the known issue https://issues.redhat.com/browse/SRVKP-2749
if attempts == maxRetries+1 || pr.GetStatusCondition().GetCondition(apis.ConditionSucceeded).GetReason() != "CouldntGetTask" {
//CouldntGetTask: Retry the PipelineRun only in case we hit the known issue https://issues.redhat.com/browse/SRVKP-2749
// TaskRunImagePullFailed: Retry in case of https://issues.redhat.com/browse/RHTAPBUGS-985 and https://github.com/tektoncd/pipeline/issues/7184
if attempts == maxRetries+1 || (pr.GetStatusCondition().GetCondition(apis.ConditionSucceeded).GetReason() != "CouldntGetTask" && pr.GetStatusCondition().GetCondition(apis.ConditionSucceeded).GetReason() != "TaskRunImagePullFailed") {
return err
}
if sha, err = h.RetriggerComponentPipelineRun(component, pr); err != nil {
Expand Down

0 comments on commit 25a743c

Please sign in to comment.