{"record":{"id":"ca83da445d447611","repo":"argoproj/argo-workflows","slug":"multiple-archived-workflows-found-with-name-s","errorCode":null,"errorMessage":"Multiple archived workflows found with name '%s':\n  %s (Created: %s, Finished: %s)\nPlease specify the UID.","messagePattern":"Multiple archived workflows found with name '(.+?)':\n  (.+?) \\(Created: (.+?), Finished: (.+?)\\)\nPlease specify the UID\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/argo/commands/archive/util.go","lineNumber":68,"sourceCode":"\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":50,"sourceCodeEnd":73,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argo/commands/archive/util.go#L50-L73","documentation":"resolveUID maps a workflow name to its unique UID in the archive. If multiple archived workflows share the same name (Argo permits name reuse across archive entries), it cannot disambiguate and returns an error listing each match's UID, created and finished timestamps, asking the user to specify the UID.","triggerScenarios":"Running 'argo archive retry/resubmit <name>' where two or more archived workflows have identical metadata.name, e.g. a workflow named 'daily-job' that was run many times with generateName collisions or re-archived copies.","commonSituations":"Repeated retries of the same named workflow archived multiple times; environments without generateName where the same name was resubmitted; shared clusters with a broad archive.","solutions":["Use the UID directly: argo archive retry <uid> --uid.","Copy one of the UIDs from the error message listing the matches.","Narrow with --selector if applicable so fewer workflows match."],"exampleFix":"// before\nargo archive retry daily-job   # ambiguous\n// after\nargo archive retry a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11 --uid","handlingStrategy":"try-catch","validationCode":"# resolve the UID first, non-interactively\nargo archive list --selector workflows.argoproj.io/name=daily-job -o name","typeGuard":null,"tryCatchPattern":"if ! argo archive retry \"$name\" 2>err.txt; then\n  uid=$(grep -oE '[0-9a-f-]{36}' err.txt | head -1)\n  argo archive retry \"$uid\" --uid\nfi","preventionTips":["Prefer UIDs over names for archive operations in scripts.","Keep workflows unique-named (use generateName where possible).","Parse the multi-match error to interactively let users pick a UID."],"tags":["cli","archive","ambiguity"],"backgroundTag":"ambiguous-resource-name","analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}