From b38fd14041e5e61618ea63975997d15704dac8f3 Mon Sep 17 00:00:00 2001 From: Yuan Tang Date: Fri, 11 Jun 2021 13:56:30 -0400 Subject: [PATCH] fix(executor): Check whether any errors within checkResourceState() are transient. Fixes #6118. (#6134) Signed-off-by: Yuan Tang --- workflow/executor/resource.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/workflow/executor/resource.go b/workflow/executor/resource.go index c71c7f7d6a8a..536b9465fa8b 100644 --- a/workflow/executor/resource.go +++ b/workflow/executor/resource.go @@ -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 } @@ -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) {