Skip to content

Commit

Permalink
fix: cronOperator/serverResubmitWf retry create workflow on transient…
Browse files Browse the repository at this point in the history
… error. Fixes #13970 (#13971)

Signed-off-by: Tianchu Zhao <[email protected]>
  • Loading branch information
tczhao authored Dec 6, 2024
1 parent de10e06 commit 9d1d2cd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion workflow/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,13 @@ func SubmitWorkflow(ctx context.Context, wfIf v1alpha1.WorkflowInterface, wfClie
}
return wf, err
} else {
return wfIf.Create(ctx, wf, metav1.CreateOptions{})
var runWf *wfv1.Workflow
err = waitutil.Backoff(retry.DefaultRetry, func() (bool, error) {
var err error
runWf, err = wfIf.Create(ctx, wf, metav1.CreateOptions{})
return !errorsutil.IsTransientErr(err), err
})
return runWf, err
}
}

Expand Down

0 comments on commit 9d1d2cd

Please sign in to comment.