{"record":{"id":"31f2f3a656d63583","repo":"argoproj/argo-workflows","slug":"failed-to-get-existing-cron-workflow-q-to-update","errorCode":null,"errorMessage":"failed to get existing cron workflow %q to update: %w","messagePattern":"failed to get existing cron workflow %q to update: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/argo/commands/cron/update.go","lineNumber":83,"sourceCode":"\t}\n\n\tcronWorkflows := generateCronWorkflows(ctx, filePaths, cliOpts.strict)\n\n\tfor _, cronWf := range cronWorkflows {\n\t\tnewWf := wfv1.Workflow{Spec: cronWf.Spec.WorkflowSpec}\n\t\terr := util.ApplySubmitOpts(&newWf, submitOpts)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif cronWf.Namespace == \"\" {\n\t\t\tcronWf.Namespace = client.Namespace(ctx)\n\t\t}\n\t\tcurrent, err := serviceClient.GetCronWorkflow(ctx, &cronworkflowpkg.GetCronWorkflowRequest{\n\t\t\tName:      cronWf.Name,\n\t\t\tNamespace: cronWf.Namespace,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to get existing cron workflow %q to update: %w\", cronWf.Name, err)\n\t\t}\n\t\tcronWf.ResourceVersion = current.ResourceVersion\n\t\tupdated, err := serviceClient.UpdateCronWorkflow(ctx, &cronworkflowpkg.UpdateCronWorkflowRequest{\n\t\t\tNamespace:    cronWf.Namespace,\n\t\t\tCronWorkflow: &cronWf,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to update workflow template: %w\", err)\n\t\t}\n\t\tfmt.Print(getCronWorkflowGet(ctx, updated))\n\t}\n\treturn nil\n}\n","sourceCodeStart":65,"sourceCodeEnd":97,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argo/commands/cron/update.go#L65-L97","documentation":"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.","triggerScenarios":"Thrown at cmd/argo/commands/cron/update.go:83 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the cron workflow first with argo cron create","Check the name/namespace spelling and get permissions"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}