argoproj/argo-workflows · error

can't process Artifact GC Strategy %s: node %+v has an unnam

Error message

can't process Artifact GC Strategy %s: node %+v has an unnamed template

What it means

While processing an Artifact GC strategy, the controller extracts the template name from the artifact's originating node via util.GetTemplateFromNode. If that node has no template name (empty), the GC strategy cannot classify the artifact for deletion and this error is returned.

Source

Thrown at workflow/controller/artifact_gc.go:182

		podName, err = woc.artGCPodName(strategy, info)
		if err != nil {
			return err
		}
		if _, found := podNames[podName]; !found {
			podNames[podName] = info
		}
		if _, found := groupedByPod[podName]; !found {
			groupedByPod[podName] = make(templatesToArtifacts)
		}
		// get the Template for the Artifact
		node, nodeErr := woc.wf.Status.Nodes.Get(artifactSearchResult.NodeID)
		if nodeErr != nil {
			woc.log.WithField("nodeID", artifactSearchResult.NodeID).Error(ctx, "Was unable to obtain node")
			return fmt.Errorf("can't process Artifact GC Strategy %s: node ID %q not found in Status", strategy, artifactSearchResult.NodeID)
		}
		templateName := util.GetTemplateFromNode(*node)
		if templateName == "" {
			return fmt.Errorf("can't process Artifact GC Strategy %s: node %+v has an unnamed template", strategy, node)
		}
		template, found := templatesByName[templateName]
		if !found {
			template = woc.wf.GetTemplateByName(templateName)
			if template == nil {
				return fmt.Errorf("can't process Artifact GC Strategy %s: template name %q belonging to node %+v not found", strategy, templateName, node)
			}
			templatesByName[templateName] = template
		}

		if _, found := groupedByPod[podName][template.Name]; !found {
			groupedByPod[podName][template.Name] = make(wfv1.ArtifactSearchResults, 0)
		}

		groupedByPod[podName][template.Name] = append(groupedByPod[podName][template.Name], artifactSearchResult)
	}

	// start up a separate Pod with a separate set of ArtifactGCTasks for it to use for each unique Service Account/metadata

View on GitHub (pinned to 35bff19146)

Solutions

  1. Delete the workflow's stale artifact GC state so it is recomputed, or let the strategy fail and handle artifacts manually
  2. Re-run the workflow on a current Argo version so nodes record templateName
  3. Avoid hand-editing workflow status; restore from archive if status was corrupted
  4. Check GetTemplateFromNode / node status completeness with `argo get <wf> -o yaml` before relying on artifactGC
Defensive patterns

Strategy: validation

Validate before calling

// before GC processing, verify template name derivable
if util.GetTemplateFromNode(node) == "" {
    log.Warn("node has no template name; skipping artifact GC", node.ID)
}

Prevention

When it happens

Trigger: A node in Status.Nodes lacks templateName/templateRef information — typically synthetic or malformed nodes, nodes created by older Argo versions before templateName was always recorded, or manually edited workflow status — discovered during garbageCollectArtifacts.

Common situations: Workflows migrated from very old Argo versions where node status didn't persist templateName; status edited by scripts/automation stripping fields; retry nodes or hooks with incomplete status entries.

Related errors


AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03). Data as JSON: /api/errors/262831094bce838d. Report an issue: GitHub.