argoproj/argo-workflows · error
no template found for name %q associated with nodeID %q
Error message
no template found for name %q associated with nodeID %q
What it means
getArtifactAndDriver reads the template name stored on the node and looks it up with wf.GetTemplateByName to find the template's ArchiveLocation. If the node references a template name that is not present in the Workflow object (spec.templates / stored templates), the server cannot resolve the artifact location and returns 'no template found for name %q associated with nodeID %q'. This typically means the workflow status and its template set are inconsistent or truncated (inline templates stored on nodes not kept in the workflow), commonly after archive/offload or a partially-persisted workflow.
Source
Thrown at server/artifacts/artifact_server.go:709
// Artifact Location can be defined in various places:
// 1. In the Artifact itself
// 2. Defined by Controller configmap
// 3. Workflow spec defines artifactRepositoryRef which is a ConfigMap which defines the location
// 4. Template defines ArchiveLocation
// 5. Inline Template
var archiveLocation *wfv1.ArtifactLocation
templateNode, err := wf.Status.Nodes.Get(nodeID)
if err != nil {
logger.WithError(err).WithField("nodeID", nodeID).Error(ctx, "was unable to retrieve node")
return nil, nil, fmt.Errorf("unable to get artifact and driver; could not get node for %s: %w", nodeID, err)
}
templateName := util.GetTemplateFromNode(*templateNode)
if templateName != "" {
template := wf.GetTemplateByName(templateName)
if template == nil {
return nil, nil, fmt.Errorf("no template found for name %q associated with nodeID %q", templateName, nodeID)
}
archiveLocation = template.ArchiveLocation // this is case 4
}
if templateName == "" || !archiveLocation.HasLocation() {
ar, arErr := a.artifactRepositories.Get(ctx, wf.Status.ArtifactRepositoryRef) // this should handle cases 2, 3 and 5
if arErr != nil {
return art, nil, arErr
}
archiveLocation = ar.ToArtifactLocation()
}
err = art.Relocate(archiveLocation) // if the Artifact defines the location (case 1), it will be used; otherwise whatever archiveLocation is set to
if err != nil {
return art, nil, err
}
if fileName != nil {
err = art.AppendToKey(*fileName)View on GitHub (pinned to 35bff19146)
Solutions
- Check the workflow: `argo get <wf> -o json | jq '.status.storedTemplates, .spec.templates'` — confirm the template name on the node exists there.
- Re-fetch or unarchive the full workflow (ensure the archive/hydrator returns complete status) and retry the artifact download.
- Upgrade Argo Workflows to a version fixing stored-template/offload hydration issues if you use very large workflows or SQL archive.
- Verify templates were not removed by a resubmit/retry — download artifacts from the original workflow that produced them.
- As a workaround, set an explicit artifactRepository (controller configmap or spec.artifactRepositoryRef) so artifact location resolution does not depend on the inline template's ArchiveLocation.
Example fix
// before: requesting artifact from a partially-hydrated archived workflow
wf, _ := archiver.GetWorkflow(ctx, uid)
svc.GetArtifactFile(ctx, nodeID, artName, false, nil) // template missing -> error
// after: use the archive's own artifact access or ensure full hydration
wf, err := archiver.GetWorkflow(ctx, uid)
if err != nil { return err }
for _, n := range wf.Status.Nodes {
if n.ID == nodeID && util.GetTemplateFromNode(n) != "" {
if wf.GetTemplateByName(util.GetTemplateFromNode(n)) == nil {
return fmt.Errorf("workflow %s is missing stored templates; re-export archive", uid)
}
}
}
svc.GetArtifactFile(ctx, nodeID, artName, false, nil) Defensive patterns
Strategy: validation
Validate before calling
wf, err := wfClient.ArgoprojV1alpha1().Workflows(ns).Get(ctx, wfName, metav1.GetOptions{})
if err != nil { return err }
node, ok := wf.Status.Nodes[nodeID]
if !ok { return fmt.Errorf("node %q missing", nodeID) }
if tn := util.GetTemplateFromNode(node); tn != "" && wf.GetTemplateByName(tn) == nil {
return fmt.Errorf("workflow %s lacks stored template %q; archive may be incomplete", wfName, tn)
} Type guard
func templateResolvable(wf *wfv1.Workflow, nodeID string) bool {
node, ok := wf.Status.Nodes[nodeID]
if !ok { return false }
tn := util.GetTemplateFromNode(node)
return tn == "" || wf.GetTemplateByName(tn) != nil
} Try / catch
art, err := svc.GetArtifact(ctx, nodeID, artName, isInput)
if err != nil {
if strings.Contains(err.Error(), "no template found for name") {
return fmt.Errorf("workflow status incomplete (missing stored templates); re-fetch from archive or upgrade Argo: %w", err)
}
return err
} Prevention
- Avoid resubmitting/replacing workflows you still need artifacts from — download artifacts before modifying templates.
- Keep workflow status under offload thresholds or upgrade to versions with reliable template hydration.
- Verify archived workflows export storedTemplates before relying on artifact downloads from archive.
- Configure a default artifactRepository so location resolution does not depend solely on template ArchiveLocation.
When it happens
Trigger: Requesting an artifact for a node whose GetTemplateFromNode returns a template name absent from wf (wf.Status.StoredTemplates or spec.Templates) — e.g. archived workflow fetched with stored templates not hydrated, workflow with offloaded/truncated status, requesting artifacts from a workflow version that predates the template (resubmit replaced templates), or hand-edited/workflow template-name mismatches in Status.Nodes.
Common situations: Downloading artifacts from the archive UI for an old workflow; upgrading Argo between versions that changed inline-template storage; workflows with very large status where nodes/templates were compressed/offloaded and hydration failed; using a custom client that fetches the Workflow without full status.
Related errors
- failed to re-enter working directory %q after staging input
- failed to stat input artifact %q at %s: %w
- failed to create parent directory for artifact %q at %s: %w
- failed to stat artifact path %q at %s: %w
- failed to resolve parent of artifact path %q at %s: %w
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/e98e67605a7f0619.
Report an issue: GitHub.