{"record":{"id":"329cd6f5d7cc2768","repo":"argoproj/argo-workflows","slug":"archived-workflow-s-not-found","errorCode":null,"errorMessage":"archived workflow '%s' not found","messagePattern":"archived workflow '(.+?)' not found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/argo/commands/archive/util.go","lineNumber":58,"sourceCode":"\t}\n\n\tresp, err := serviceClient.ListArchivedWorkflows(ctx, req)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"list archived workflows: %w\", err)\n\t}\n\n\tmatches := resp.Items\n\tfor len(matches) < 2 && resp.Continue != \"\" {\n\t\treq.ListOptions = &metav1.ListOptions{Continue: resp.Continue}\n\t\tresp, err = serviceClient.ListArchivedWorkflows(ctx, req)\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"list archived workflows: %w\", err)\n\t\t}\n\t\tmatches = append(matches, resp.Items...)\n\t}\n\n\tif len(matches) == 0 {\n\t\treturn \"\", fmt.Errorf(\"archived workflow '%s' not found\", identifier)\n\t}\n\n\tif len(matches) > 1 {\n\t\tvar msg strings.Builder\n\t\tfmt.Fprintf(&msg, \"Multiple archived workflows found with name '%s':\\n\", identifier)\n\t\tfor _, wf := range matches {\n\t\t\tfmt.Fprintf(&msg, \"  %s (Created: %s, Finished: %s)\\n\", wf.UID, humanize.Timestamp(wf.CreationTimestamp.Time), humanize.Timestamp(wf.Status.FinishedAt.Time))\n\t\t}\n\t\tmsg.WriteString(\"Please specify the UID.\")\n\t\treturn \"\", errors.New(msg.String())\n\t}\n\n\treturn string(matches[0].UID), nil\n}\n","sourceCodeStart":40,"sourceCodeEnd":73,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argo/commands/archive/util.go#L40-L73","documentation":"resolveUID (cmd/argo/commands/archive/util.go) errors when a name-based lookup finds zero archived workflows matching the exact name. The CLI cannot disambiguate and refuses to proceed, telling you the identifier that was searched.","triggerScenarios":"Calling archive get/delete/retry/resubmit with a workflow name that has no exact match in the archive for the given namespace — e.g. the workflow never completed-and-archived, was purged by TTL/retention, or the name has trailing whitespace/case mismatch.","commonSituations":"Querying a workflow archived in a different namespace; workflows deleted before archival settings captured them; retention policies evicting old entries; assuming a running (not yet archived) workflow is queryable via archive commands.","solutions":["Run `argo archive list -n <ns> | grep <name>` (or `argo list --archived`) to confirm the entry exists and copy its exact name/UID.","Fix the -n namespace flag to the namespace where the workflow actually ran.","If the workflow is still running (not archived), use `argo get <name>` instead of the archive commands.","If the entry was evicted, restore from database backups or resubmit from the original manifest — it cannot be recovered from the archive."],"exampleFix":"// before\nargo archive get nightly-job   # not found\n\n// after\nargo archive list -n default | grep nightly-job\nargo archive get <uid-of-nightly-job>","handlingStrategy":"validation","validationCode":"res, _ := archiveClient.ListArchivedWorkflows(ctx, &workflowarchivepkg.ListArchivedWorkflowRequest{\n    ListOptions: &metav1.ListOptions{FieldSelector: \"metadata.name=\" + name},\n})\nif len(res.Items) == 0 {\n    return fmt.Errorf(\"%s is not in the archive; is it complete/archived and in the right namespace?\", name)\n}","typeGuard":null,"tryCatchPattern":"if err := act(ctx, identifier); err != nil {\n    if strings.Contains(err.Error(), \"archived workflow\") && strings.Contains(err.Error(), \"not found\") {\n        // fall back to live workflow commands: argo get/argo delete\n    }\n    return err\n}","preventionTips":["Confirm workflows complete and archival is enabled before archive lookups.","Use `argo archive list` interactively to copy exact names/UIDs.","Check namespace flags in scripts.","Remember running workflows are not in the archive — use live commands for them."],"tags":["argo-workflows","archive","not-found","cli"],"backgroundTag":"resource-not-found","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"}