{"record":{"id":"262831094bce838d","repo":"argoproj/argo-workflows","slug":"can-t-process-artifact-gc-strategy-s-node-v-ha","errorCode":null,"errorMessage":"can't process Artifact GC Strategy %s: node %+v has an unnamed template","messagePattern":"can't process Artifact GC Strategy (.+?): node %\\+v has an unnamed template","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/controller/artifact_gc.go","lineNumber":182,"sourceCode":"\t\tpodName, err = woc.artGCPodName(strategy, info)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif _, found := podNames[podName]; !found {\n\t\t\tpodNames[podName] = info\n\t\t}\n\t\tif _, found := groupedByPod[podName]; !found {\n\t\t\tgroupedByPod[podName] = make(templatesToArtifacts)\n\t\t}\n\t\t// get the Template for the Artifact\n\t\tnode, nodeErr := woc.wf.Status.Nodes.Get(artifactSearchResult.NodeID)\n\t\tif nodeErr != nil {\n\t\t\twoc.log.WithField(\"nodeID\", artifactSearchResult.NodeID).Error(ctx, \"Was unable to obtain node\")\n\t\t\treturn fmt.Errorf(\"can't process Artifact GC Strategy %s: node ID %q not found in Status\", strategy, artifactSearchResult.NodeID)\n\t\t}\n\t\ttemplateName := util.GetTemplateFromNode(*node)\n\t\tif templateName == \"\" {\n\t\t\treturn fmt.Errorf(\"can't process Artifact GC Strategy %s: node %+v has an unnamed template\", strategy, node)\n\t\t}\n\t\ttemplate, found := templatesByName[templateName]\n\t\tif !found {\n\t\t\ttemplate = woc.wf.GetTemplateByName(templateName)\n\t\t\tif template == nil {\n\t\t\t\treturn fmt.Errorf(\"can't process Artifact GC Strategy %s: template name %q belonging to node %+v not found\", strategy, templateName, node)\n\t\t\t}\n\t\t\ttemplatesByName[templateName] = template\n\t\t}\n\n\t\tif _, found := groupedByPod[podName][template.Name]; !found {\n\t\t\tgroupedByPod[podName][template.Name] = make(wfv1.ArtifactSearchResults, 0)\n\t\t}\n\n\t\tgroupedByPod[podName][template.Name] = append(groupedByPod[podName][template.Name], artifactSearchResult)\n\t}\n\n\t// start up a separate Pod with a separate set of ArtifactGCTasks for it to use for each unique Service Account/metadata","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/controller/artifact_gc.go#L164-L200","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Delete the workflow's stale artifact GC state so it is recomputed, or let the strategy fail and handle artifacts manually","Re-run the workflow on a current Argo version so nodes record templateName","Avoid hand-editing workflow status; restore from archive if status was corrupted","Check GetTemplateFromNode / node status completeness with `argo get <wf> -o yaml` before relying on artifactGC"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before GC processing, verify template name derivable\nif util.GetTemplateFromNode(node) == \"\" {\n    log.Warn(\"node has no template name; skipping artifact GC\", node.ID)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure workflows run on an Argo version that records templateName on every node","Avoid external mutation of workflow status","Re-run legacy workflows on current Argo before relying on artifactGC"],"tags":["artifact-gc","workflow-status","template","argo-workflows"],"backgroundTag":"missing-template-name","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"}