argoproj/argo-workflows · error
failed to get existing cron workflow %q to update: %w
Error message
failed to get existing cron workflow %q to update: %w
What it means
While running argo cron update, fetching the existing CronWorkflow by name from the server failed, so there is no ResourceVersion to carry into the update. Typically the cron workflow does not exist yet or RBAC blocks the get.
Source
Thrown at cmd/argo/commands/cron/update.go:83
}
cronWorkflows := generateCronWorkflows(ctx, filePaths, cliOpts.strict)
for _, cronWf := range cronWorkflows {
newWf := wfv1.Workflow{Spec: cronWf.Spec.WorkflowSpec}
err := util.ApplySubmitOpts(&newWf, submitOpts)
if err != nil {
return err
}
if cronWf.Namespace == "" {
cronWf.Namespace = client.Namespace(ctx)
}
current, err := serviceClient.GetCronWorkflow(ctx, &cronworkflowpkg.GetCronWorkflowRequest{
Name: cronWf.Name,
Namespace: cronWf.Namespace,
})
if err != nil {
return fmt.Errorf("failed to get existing cron workflow %q to update: %w", cronWf.Name, err)
}
cronWf.ResourceVersion = current.ResourceVersion
updated, err := serviceClient.UpdateCronWorkflow(ctx, &cronworkflowpkg.UpdateCronWorkflowRequest{
Namespace: cronWf.Namespace,
CronWorkflow: &cronWf,
})
if err != nil {
return fmt.Errorf("failed to update workflow template: %w", err)
}
fmt.Print(getCronWorkflowGet(ctx, updated))
}
return nil
}
View on GitHub (pinned to 35bff19146)
Solutions
- Create the cron workflow first with argo cron create
- Check the name/namespace spelling and get permissions
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at cmd/argo/commands/cron/update.go:83 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/31f2f3a656d63583.
Report an issue: GitHub.