argoproj/argo-workflows · error
deleting archived workflows not supported
Error message
deleting archived workflows not supported
What it means
nullWorkflowArchive.DeleteWorkflow is the no-op archive implementation's delete method, used when archiving is disabled. Since there is no archive store, deletion is impossible and it always returns this error (unlike DeleteExpiredWorkflows, which silently no-ops).
Source
Thrown at persist/sqldb/null_workflow_archive.go:47
func (r *nullWorkflowArchive) CountWorkflows(ctx context.Context, options sutils.ListOptions) (int64, error) {
return 0, nil
}
func (r *nullWorkflowArchive) HasMoreWorkflows(ctx context.Context, options sutils.ListOptions) (bool, error) {
return false, nil
}
func (r *nullWorkflowArchive) GetWorkflow(ctx context.Context, uid string, namespace string, name string) (*wfv1.Workflow, error) {
return nil, fmt.Errorf("getting archived workflows not supported")
}
func (r *nullWorkflowArchive) GetWorkflowForEstimator(ctx context.Context, namespace string, requirements []labels.Requirement) (*wfv1.Workflow, error) {
return nil, fmt.Errorf("getting archived workflow for estimator not supported")
}
func (r *nullWorkflowArchive) DeleteWorkflow(ctx context.Context, uid string) error {
return fmt.Errorf("deleting archived workflows not supported")
}
func (r *nullWorkflowArchive) DeleteExpiredWorkflows(ctx context.Context, ttl time.Duration) error {
return nil
}
func (r *nullWorkflowArchive) ListWorkflowsLabelKeys(ctx context.Context) (*wfv1.LabelKeys, error) {
return &wfv1.LabelKeys{}, nil
}
func (r *nullWorkflowArchive) ListWorkflowsLabelValues(ctx context.Context, key string) (*wfv1.LabelValues, error) {
return &wfv1.LabelValues{}, nil
}
View on GitHub (pinned to 35bff19146)
Solutions
- Enable persistence with archive: true in the workflow-controller-configmap if archiving (and deletion) should work.
- Skip archive deletion calls when archiving is disabled — there is nothing to delete.
- Use `kubectl delete workflow` for live (non-archived) workflow deletion instead.
- Configure TTL-based cleanup (workflowTTL / archived TTL) only after the archive is actually enabled.
Example fix
// before
// err := archive.DeleteWorkflow(ctx, uid) // errors when archive off
// after
// if archiveEnabled {
// err := archive.DeleteWorkflow(ctx, uid)
// } else {
// kubectl.Delete(ctx, "workflows", uid) // delete the live object
// } Defensive patterns
Strategy: try-catch
Validate before calling
// verify archiving is configured before attempting delete
if !archivingEnabled(ctx) {
return errors.New("cannot delete archived workflow: archive is not configured")
} Type guard
func canDeleteArchived(archive workflowarchive.Archive) bool {
_, err := archive.GetWorkflow(ctx, "", "", "")
return !strings.Contains(fmt.Sprint(err), "not supported")
} Try / catch
if err := archive.DeleteWorkflow(ctx, uid); err != nil && strings.Contains(err.Error(), "not supported") {
logger.Info(ctx, "archive disabled; nothing to delete")
return nil
} Prevention
- Only run archive cleanup jobs on clusters with persistence + archive enabled.
- Use kubectl delete for non-archived workflows.
- Make retention/delete tooling tolerant of the null archive (treat as no-op).
- Verify archive configuration after upgrades, since null implementations replace the DB repo when persistence is absent.
When it happens
Trigger: Calling DeleteWorkflow (e.g. `argo archive delete <uid>`, archived-workflow delete API, or retention code) while the workflow archive is not configured.
Common situations: Cleanup scripts or cron jobs targeting a cluster where persistence/archive was never enabled; UI delete action on an installation without the archive database.
Related errors
- getting archived workflows not supported
- operation %v is not supported
- getting archived workflow for estimator not supported
- unsupported db type %s
- requires either selector or workflow
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/197039ec1ce9eff8.
Report an issue: GitHub.