Skip to content

Commit

Permalink
Added retry around RuntimeExecutor.Wait call when waiting for main co…
Browse files Browse the repository at this point in the history
…ntainer completion (argoproj#1597)
  • Loading branch information
markterm authored and sarabala1979 committed Sep 6, 2019
1 parent 0393427 commit 1bd50fa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion workflow/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,14 @@ func (we *WorkflowExecutor) Wait() error {
annotationUpdatesCh := we.monitorAnnotations(ctx)
go we.monitorDeadline(ctx, annotationUpdatesCh)

err = we.RuntimeExecutor.Wait(mainContainerID)
_ = wait.ExponentialBackoff(retry.DefaultRetry, func() (bool, error) {
err = we.RuntimeExecutor.Wait(mainContainerID)
if err != nil {
log.Warnf("Failed to wait for container id '%s': %v", mainContainerID, err)
return false, err
}
return true, nil
})
if err != nil {
return err
}
Expand Down

0 comments on commit 1bd50fa

Please sign in to comment.