{"record":{"id":"56914ce4b19b4f71","repo":"argoproj/argo-workflows","slug":"list-archived-workflows-w","errorCode":null,"errorMessage":"list archived workflows: %w","messagePattern":"list archived workflows: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/argo/commands/archive/util.go","lineNumber":44,"sourceCode":"\t\treturn false\n\t}\n\treturn uuidRegex.MatchString(s)\n}\n\nfunc resolveUID(ctx context.Context, serviceClient workflowarchivepkg.ArchivedWorkflowServiceClient, identifier string, namespace string, forceUID bool, forceName bool) (string, error) {\n\tif isUID(identifier, forceUID, forceName) {\n\t\treturn identifier, nil\n\t}\n\n\treq := &workflowarchivepkg.ListArchivedWorkflowsRequest{\n\t\tNamespace:  namespace,\n\t\tNamePrefix: identifier,\n\t\tNameFilter: \"Exact\",\n\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","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argo/commands/archive/util.go#L26-L62","documentation":"Inside resolveUID (cmd/argo/commands/archive/util.go), when a name-based lookup issues ListArchivedWorkflows and that RPC fails, the error is wrapped as 'list archived workflows: %w'. This first occurrence (line 44) is the initial page of the paginated name-prefix listing.","triggerScenarios":"Any archive get/delete/retry/resubmit by workflow name where the argo server's ListArchivedWorkflows call returns an error — server unreachable, RBAC denial on the archive API, archive database down, or malformed ListOptions.","commonSituations":"argo server down or wrong --port/--argo-server address; SSO/token lacking clusterworkflowtemplate/archive read permissions; MySQL/Postgres backing the archive not accepting connections; network proxy dropping gRPC/WebSocket traffic.","solutions":["Inspect the wrapped cause: connection errors point at server address/connectivity; permission errors at RBAC/SSO.","Verify `argo archive list` works at all — if it also fails, fix server connectivity or auth first.","Check the archive database (Postgres/MySQL) is up and persistence config enables archival.","Retry if the cause was transient network failure; the CLI does not retry automatically."],"exampleFix":"// before\nargo archive delete my-wf   // wrapped: list archived workflows: rpc error: ...\n\n// after\n# fix server address/auth first\nexport ARGO_SERVER=my-argo.example.com\nexport ARGO_TOKEN=<token>\nargo archive delete my-wf","handlingStrategy":"retry","validationCode":"// pre-flight: server reachable and list works\n_, err := archiveClient.ListArchivedWorkflows(ctx, &workflowarchivepkg.ListArchivedWorkflowRequest{\n    ListOptions: &metav1.ListOptions{FieldSelector: \"metadata.name=__ping__\"},\n})\nif err != nil { return fmt.Errorf(\"argo server/archive unavailable: %w\", err) }","typeGuard":null,"tryCatchPattern":"var lastErr error\nfor i := 0; i < 3; i++ {\n    if err := deleteArchived(ctx, identifier); err == nil { return nil }\n    else if strings.Contains(err.Error(), \"list archived workflows:\") { lastErr = err; time.Sleep(time.Duration(1<<i) * time.Second); continue }\n    return err\n}\nreturn lastErr","preventionTips":["Set ARGO_SERVER/ARGO_TOKEN correctly in automation environments.","Grant list permission on archived workflows to the SA/SSO group.","Monitor archive database (Postgres/MySQL) health.","Add bounded retries with backoff for gRPC transient errors."],"tags":["argo-workflows","archive","grpc","list-failure"],"backgroundTag":"list-archived-workflows-failed","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"}