argoproj/argo-workflows · error
resolve UID: %w
Error message
resolve UID: %w
What it means
Thrown by `argo archive retry` (retryArchivedWorkflows) when `resolveUID` cannot resolve a CLI argument to a unique archived-workflow UID before building the Workflow for retry. The wrapped cause after the prefix identifies the real failure (list error, not found, or multiple matches).
Source
Thrown at cmd/argo/commands/archive/retry.go:142
func retryArchivedWorkflows(ctx context.Context, archiveServiceClient workflowarchivepkg.ArchivedWorkflowServiceClient, serviceClient workflowpkg.WorkflowServiceClient, retryOpts retryOps, cliSubmitOpts common.CliSubmitOpts, args []string) error {
selector, err := fields.ParseSelector(retryOpts.nodeFieldSelector)
if err != nil {
return fmt.Errorf("unable to parse node field selector '%s': %w", retryOpts.nodeFieldSelector, err)
}
var wfs wfv1.Workflows
if retryOpts.hasSelector() {
wfs, err = listArchivedWorkflows(ctx, archiveServiceClient, retryOpts.fieldSelector, retryOpts.labelSelector, 0)
if err != nil {
return err
}
}
// Add workflows from args - auto-detect UID vs NAME
for _, identifier := range args {
var uid string
uid, err = resolveUID(ctx, archiveServiceClient, identifier, retryOpts.namespace, retryOpts.forceUID, retryOpts.forceName)
if err != nil {
return fmt.Errorf("resolve UID: %w", err)
}
wf := wfv1.Workflow{
ObjectMeta: metav1.ObjectMeta{
Namespace: retryOpts.namespace,
UID: types.UID(uid),
},
}
wfs = append(wfs, wf)
}
var lastRetried *wfv1.Workflow
retriedIdentifiers := make(map[string]bool)
for _, wf := range wfs {
// Use UID if available, otherwise use namespace/name for deduplication
var identifier string
if wf.UID != "" {
identifier = "uid:" + string(wf.UID)
} else {View on GitHub (pinned to 35bff19146)
Solutions
- Use the full workflow UID (from `argo archive list`) instead of the name.
- Set the correct -n namespace for the archived workflow.
- Resolve ambiguity by picking the exact UID of the run you want to retry.
- If the cause is a server error, verify argo server connectivity and that the archive database is healthy.
Example fix
// before argo archive retry nightly-job // after argo archive retry e1234567-89ab-cdef-0123-456789abcdef
Defensive patterns
Strategy: validation
Validate before calling
res, _ := archiveClient.ListArchivedWorkflows(ctx, &workflowarchivepkg.ListArchivedWorkflowRequest{
ListOptions: &metav1.ListOptions{FieldSelector: "metadata.name=" + identifier},
})
if len(res.Items) != 1 {
return fmt.Errorf("expected exactly 1 archived workflow for %q, got %d", identifier, len(res.Items))
}
uid := string(res.Items[0].UID) Try / catch
if err := retryArchivedWorkflows(...); err != nil {
if strings.Contains(err.Error(), "resolve UID:") {
// prompt for/lookup the exact UID and retry once
}
return err
} Prevention
- Use UIDs for automated retry jobs.
- Confirm the namespace before resolving names.
- Handle archives with duplicate names by listing first.
When it happens
Trigger: `argo archive retry <identifier>` where the identifier matches no archived workflow, matches several, or ListArchivedWorkflows inside resolveUID fails.
Common situations: Retrying by name when the archive holds multiple runs with the same name; wrong namespace; using an ID that is neither a UID nor an exact name without --force-uid/--force-name.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- resolve UID: %w
- resolve UID: %w
- resolve UID: %w
- archived workflow '%s' not found
- requires either selector or workflow
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/f0cc4f7664a75743.
Report an issue: GitHub.