Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

argo cli submit needs retries #14106

Open
3 of 4 tasks
tooptoop4 opened this issue Jan 21, 2025 · 0 comments
Open
3 of 4 tasks

argo cli submit needs retries #14106

tooptoop4 opened this issue Jan 21, 2025 · 0 comments
Labels
area/cli The `argo` CLI type/bug

Comments

@tooptoop4
Copy link
Contributor

Pre-requisites

  • I have double-checked my configuration
  • I have tested with the :latest image tag (i.e. quay.io/argoproj/workflow-controller:latest) and can confirm the issue still exists on :latest. If not, I have explained why, in detail, in my description below.
  • I have searched existing issues and could not find a match for this bug
  • I'd like to contribute the fix myself (see contributing guide)

What happened? What did you expect to happen?

using argo cli to submit workflow sometimes get:

level=fatal msg="Failed to submit workflow: rpc error: code = AlreadyExists desc = Operation cannot be fulfilled on resourcequotas \"redact\": the object has been modified; please apply your changes to the latest version and try again"

return fmt.Errorf("Failed to submit workflow: %v", err)
}
if err = printWorkflow(created, common.GetFlags{Output: cliOpts.Output}); err != nil {
return err
}
return common.WaitWatchOrLog(ctx, serviceClient, namespace, []string{created.Name}, *cliOpts)
}
func submitWorkflows(ctx context.Context, serviceClient workflowpkg.WorkflowServiceClient, namespace string, workflows []wfv1.Workflow, submitOpts *wfv1.SubmitOpts, cliOpts *common.CliSubmitOpts) error {
if err := validateOptions(workflows, submitOpts, cliOpts); err != nil {
return err
}
if len(workflows) == 0 {
return errors.New("No Workflow found in given files")
}
var workflowNames []string
for _, wf := range workflows {
if wf.Namespace == "" {
// This is here to avoid passing an empty namespace when using --server-dry-run
wf.Namespace = namespace
}
err := util.ApplySubmitOpts(&wf, submitOpts)
if err != nil {
return err
}
if cliOpts.Priority != nil {
wf.Spec.Priority = cliOpts.Priority
}
options := &metav1.CreateOptions{}
if submitOpts.DryRun {
options.DryRun = []string{"All"}
}
created, err := serviceClient.CreateWorkflow(ctx, &workflowpkg.WorkflowCreateRequest{
Namespace: wf.Namespace,
Workflow: &wf,
ServerDryRun: submitOpts.ServerDryRun,
CreateOptions: options,
})
if err != nil {
return fmt.Errorf("Failed to submit workflow: %v", err)

Version(s)

3.4.11

Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflow that uses private images.

n/a

Logs from the workflow controller

kubectl logs -n argo deploy/workflow-controller | grep ${workflow}

n/a

Logs from in your workflow's wait container

kubectl logs -n argo -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded

n/a
@shuangkun shuangkun added the area/cli The `argo` CLI label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli The `argo` CLI type/bug
Projects
None yet
Development

No branches or pull requests

2 participants