Skip to content

Commit

Permalink
fix(executor): Check whether any errors within checkResourceState() a…
Browse files Browse the repository at this point in the history
…re transient. Fixes #6118. (#6134)

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
  • Loading branch information
terrytangyuan authored Jun 11, 2021
1 parent db95dbf commit b38fd14
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions workflow/executor/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func (we *WorkflowExecutor) WaitResource(ctx context.Context, resourceNamespace,
log.Infof("Returning from successful wait for resource %s in namespace %s", resourceName, resourceNamespace)
return true, nil
}
if isErrRetryable {
if isErrRetryable || argoerr.IsTransientErr(err) {
log.Infof("Waiting for resource %s in namespace %s resulted in retryable error: %v", resourceName, resourceNamespace, err)
return false, nil
}
Expand All @@ -231,9 +231,6 @@ func (we *WorkflowExecutor) checkResourceState(ctx context.Context, selfLink str
request := we.RESTClient.Get().RequestURI(selfLink)
stream, err := request.Stream(ctx)

if argoerr.IsTransientErr(err) {
return true, errors.Errorf(errors.CodeNotFound, "The error is detected to be transient: %v. Retrying...", err)
}
if err != nil {
err = errors.Cause(err)
if apierr.IsNotFound(err) {
Expand Down

0 comments on commit b38fd14

Please sign in to comment.