{"record":{"id":"37a5a93dfd740514","repo":"argoproj/argo-workflows","slug":"getting-archived-workflow-for-estimator-not-suppor","errorCode":null,"errorMessage":"getting archived workflow for estimator not supported","messagePattern":"getting archived workflow for estimator not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"persist/sqldb/null_workflow_archive.go","lineNumber":43,"sourceCode":"\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\nfunc (r *nullWorkflowArchive) ListWorkflowsLabelValues(ctx context.Context, key string) (*wfv1.LabelValues, error) {\n\treturn &wfv1.LabelValues{}, nil\n}\n","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/persist/sqldb/null_workflow_archive.go#L25-L61","documentation":"nullWorkflowArchive.GetWorkflowForEstimator is the no-op implementation used when workflow archiving is disabled. Estimator logic (used to predict workflow duration from archived runs) needs an archived workflow sample, which does not exist without an archive, so it always returns this error.","triggerScenarios":"A workflow template uses an estimator / estimated-duration feature, or server code calls GetWorkflowForEstimator to find a representative archived workflow, while the null archive is wired (archive not configured).","commonSituations":"Using duration estimation or `estimatedDuration` features on a cluster without persistence enabled; API/UI paths that estimate progress hitting a server with no archive database.","solutions":["Enable workflow archiving via the persistence section in the workflow-controller-configmap so a real archive backs the estimator.","Disable/avoid estimator-dependent features when archiving is off.","Guard callers: skip estimation (return no estimate) when the archive repo is the null implementation or archiving is disabled.","Confirm the server and controller both run with archiving enabled if estimation is expected to work."],"exampleFix":"// before\n// wf, err := archive.GetWorkflowForEstimator(ctx, ns, reqs)\n// after\n// if !archiveEnabled {\n//     return nil, nil // no estimate available without archive\n// }\n// wf, err := archive.GetWorkflowForEstimator(ctx, ns, reqs)","handlingStrategy":"type-guard","validationCode":"// gate estimator usage on archive availability\nif !archivingEnabled(ctx) {\n    return nil, nil // no estimate possible without an archive\n}","typeGuard":"func estimatorSupported(archive workflowarchive.Archive) bool {\n    _, err := archive.GetWorkflowForEstimator(ctx, \"default\", nil)\n    return !strings.Contains(fmt.Sprint(err), \"not supported\")\n}","tryCatchPattern":"wf, err := archive.GetWorkflowForEstimator(ctx, ns, reqs)\nif err != nil && strings.Contains(err.Error(), \"not supported\") {\n    return nil, nil // degrade gracefully: no duration estimate\n}","preventionTips":["Enable archiving before using estimator/progress features.","Treat estimates as optional; always degrade gracefully when unavailable.","Check persistence config on both controller and server at deploy time.","Document that estimatedDuration requires the workflow archive."],"tags":["archive","estimator","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-08T10:18:20.063Z"}