{"record":{"id":"8df0ff881a1ed5e5","repo":"argoproj/argo-workflows","slug":"getting-archived-workflows-not-supported","errorCode":null,"errorMessage":"getting archived workflows not supported","messagePattern":"getting archived workflows not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"persist/sqldb/null_workflow_archive.go","lineNumber":39,"sourceCode":"\nfunc (r *nullWorkflowArchive) ArchiveWorkflow(ctx context.Context, wf *wfv1.Workflow) error {\n\treturn nil\n}\n\nfunc (r *nullWorkflowArchive) ListWorkflows(ctx context.Context, options sutils.ListOptions) (wfv1.Workflows, error) {\n\treturn wfv1.Workflows{}, nil\n}\n\nfunc (r *nullWorkflowArchive) CountWorkflows(ctx context.Context, options sutils.ListOptions) (int64, error) {\n\treturn 0, nil\n}\n\nfunc (r *nullWorkflowArchive) HasMoreWorkflows(ctx context.Context, options sutils.ListOptions) (bool, error) {\n\treturn false, nil\n}\n\nfunc (r *nullWorkflowArchive) GetWorkflow(ctx context.Context, uid string, namespace string, name string) (*wfv1.Workflow, error) {\n\treturn nil, fmt.Errorf(\"getting archived workflows not supported\")\n}\n\nfunc (r *nullWorkflowArchive) GetWorkflowForEstimator(ctx context.Context, namespace string, requirements []labels.Requirement) (*wfv1.Workflow, error) {\n\treturn nil, fmt.Errorf(\"getting archived workflow for estimator not supported\")\n}\n\nfunc (r *nullWorkflowArchive) DeleteWorkflow(ctx context.Context, uid string) error {\n\treturn fmt.Errorf(\"deleting archived workflows not supported\")\n}\n\nfunc (r *nullWorkflowArchive) DeleteExpiredWorkflows(ctx context.Context, ttl time.Duration) error {\n\treturn nil\n}\n\nfunc (r *nullWorkflowArchive) ListWorkflowsLabelKeys(ctx context.Context) (*wfv1.LabelKeys, error) {\n\treturn &wfv1.LabelKeys{}, nil\n}\n","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/persist/sqldb/null_workflow_archive.go#L21-L57","documentation":"nullWorkflowArchive is the no-op archive implementation used when the workflow archive is not configured. GetWorkflow always returns this error because there is no archive database to read from. It replaces the real sqldb-backed archive when persistence is disabled.","triggerScenarios":"Any request to fetch an archived workflow by UID (argo CLI `argo archive get`, server archived-workflow API, or UI) when persistence/workflow archive is not configured on the server/controller.","commonSituations":"Deployments without the persistence section in workflow-controller-configmap; users hitting archive endpoints of a server with no database; accidentally scaling down or misconfiguring the archive DB so the null archive is wired.","solutions":["Configure persistence in the workflow-controller-configmap (postgres/mysql endpoint, archive: true) and restart the controller and server.","If archiving is intentionally off, retrieve the workflow directly (kubectl get wf) rather than from the archive.","Check that the server is pointed at the deployment where archiving is actually enabled.","Handle the error in UI/CLI flows by hiding archive features when the archive is not configured."],"exampleFix":"// before (workflow-controller-configmap)\n// persistence: {}\n// after\n// persistence:\n//   connectionPool:\n//     maxIdleConns: 100\n//   postgresql:\n//     host: postgres\n//     database: postgres\n// archive: true","handlingStrategy":"type-guard","validationCode":"// feature-detect archive support before calling\nif !archivingEnabled(hybridCtx) {\n    return errors.New(\"workflow archive is not configured on this server\")\n}","typeGuard":"func archiveConfigured(archive workflowarchive.Archive) bool {\n    _, err := archive.GetWorkflow(ctx, \"__probe__\", \"\", \"\")\n    return err == nil || !strings.Contains(err.Error(), \"not supported\")\n}","tryCatchPattern":"wf, err := archive.GetWorkflow(ctx, uid, ns, name)\nif err != nil && strings.Contains(err.Error(), \"not supported\") {\n    return nil, status.Error(codes.Unimplemented, \"workflow archive is not configured\")\n}","preventionTips":["Enable persistence + archive: true in the controller configmap before exposing archive UI/CLI features.","Hide/disable archive endpoints when the archive isn't configured.","Check server startup logs for the archive wiring.","Fall back to reading live workflows via the k8s API when archiving is off."],"tags":["archive","database","server"],"backgroundTag":"archive-not-configured","analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}