Skip to content

Commit 9d1d2cd

Browse files
authored
fix: cronOperator/serverResubmitWf retry create workflow on transient error. Fixes #13970 (#13971)
Signed-off-by: Tianchu Zhao <[email protected]>
1 parent de10e06 commit 9d1d2cd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

workflow/util/util.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,13 @@ func SubmitWorkflow(ctx context.Context, wfIf v1alpha1.WorkflowInterface, wfClie
195195
}
196196
return wf, err
197197
} else {
198-
return wfIf.Create(ctx, wf, metav1.CreateOptions{})
198+
var runWf *wfv1.Workflow
199+
err = waitutil.Backoff(retry.DefaultRetry, func() (bool, error) {
200+
var err error
201+
runWf, err = wfIf.Create(ctx, wf, metav1.CreateOptions{})
202+
return !errorsutil.IsTransientErr(err), err
203+
})
204+
return runWf, err
199205
}
200206
}
201207

0 commit comments

Comments
 (0)