Skip to content

Commit

Permalink
fix(controller): fix retry on transient errors when validating workfl…
Browse files Browse the repository at this point in the history
…ow spec (#6370)

Signed-off-by: Tianchu Zhao <evantczhao@gmail.com>

Co-authored-by: Saravanan Balasubramanian <33908564+sarabala1979@users.noreply.github.com>
  • Loading branch information
tczhao and sarabala1979 authored Jul 20, 2021
1 parent 488aec3 commit 9233a8d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/util/strategicpatch"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/record"
"k8s.io/utils/pointer"
Expand Down Expand Up @@ -3254,7 +3253,7 @@ func (woc *wfOperationCtx) setExecWorkflow(ctx context.Context) error {

// Validate the execution wfSpec
var wfConditions *wfv1.Conditions
err := wait.ExponentialBackoff(retry.DefaultRetry,
err := waitutil.Backoff(retry.DefaultRetry,
func() (bool, error) {
var validationErr error
wfConditions, validationErr = validate.ValidateWorkflow(wftmplGetter, cwftmplGetter, woc.wf, validateOpts)
Expand Down

0 comments on commit 9233a8d

Please sign in to comment.