argoproj/argo-workflows · error
list archived workflows: %w
Error message
list archived workflows: %w
What it means
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.
Source
Thrown at cmd/argo/commands/archive/util.go:44
return false
}
return uuidRegex.MatchString(s)
}
func resolveUID(ctx context.Context, serviceClient workflowarchivepkg.ArchivedWorkflowServiceClient, identifier string, namespace string, forceUID bool, forceName bool) (string, error) {
if isUID(identifier, forceUID, forceName) {
return identifier, nil
}
req := &workflowarchivepkg.ListArchivedWorkflowsRequest{
Namespace: namespace,
NamePrefix: identifier,
NameFilter: "Exact",
}
resp, err := serviceClient.ListArchivedWorkflows(ctx, req)
if err != nil {
return "", fmt.Errorf("list archived workflows: %w", err)
}
matches := resp.Items
for len(matches) < 2 && resp.Continue != "" {
req.ListOptions = &metav1.ListOptions{Continue: resp.Continue}
resp, err = serviceClient.ListArchivedWorkflows(ctx, req)
if err != nil {
return "", fmt.Errorf("list archived workflows: %w", err)
}
matches = append(matches, resp.Items...)
}
if len(matches) == 0 {
return "", fmt.Errorf("archived workflow '%s' not found", identifier)
}
if len(matches) > 1 {
var msg strings.BuilderView on GitHub (pinned to 35bff19146)
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.
Example fix
// before argo archive delete my-wf // wrapped: list archived workflows: rpc error: ... // after # fix server address/auth first export ARGO_SERVER=my-argo.example.com export ARGO_TOKEN=<token> argo archive delete my-wf
Defensive patterns
Strategy: retry
Validate before calling
// pre-flight: server reachable and list works
_, err := archiveClient.ListArchivedWorkflows(ctx, &workflowarchivepkg.ListArchivedWorkflowRequest{
ListOptions: &metav1.ListOptions{FieldSelector: "metadata.name=__ping__"},
})
if err != nil { return fmt.Errorf("argo server/archive unavailable: %w", err) } Try / catch
var lastErr error
for i := 0; i < 3; i++ {
if err := deleteArchived(ctx, identifier); err == nil { return nil }
else if strings.Contains(err.Error(), "list archived workflows:") { lastErr = err; time.Sleep(time.Duration(1<<i) * time.Second); continue }
return err
}
return lastErr Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/56914ce4b19b4f71.
Report an issue: GitHub.