argoproj/argo-workflows · error

no data template found

Error message

no data template found

What it means

processData is the executor's data-template handler; it reads we.Template.Data and refuses to run when it is nil. A data template node reached the executor without an actual data: spec, so there is nothing to process.

Source

Thrown at workflow/executor/data.go:16

package executor

import (
	"context"
	"encoding/json"
	"fmt"

	"github.com/argoproj/argo-workflows/v4/workflow/data"
)

func (we *WorkflowExecutor) processData(ctx context.Context) (any, error) {
	dataCtx, span := we.Tracing.StartProcessDataTemplate(ctx)
	defer span.End()
	dataTemplate := we.Template.Data
	if dataTemplate == nil {
		return nil, fmt.Errorf("no data template found")
	}

	return data.ProcessData(dataCtx, dataTemplate, newExecutorDataSourceProcessor(we))
}

func (we *WorkflowExecutor) Data(ctx context.Context) error {
	transformedData, err := we.processData(ctx)
	if err != nil {
		return fmt.Errorf("unable to process data template: %w", err)
	}

	out, err := json.Marshal(transformedData)
	if err != nil {
		return err
	}
	we.Template.Outputs.Result = new(string(out))
	err = we.ReportOutputs(ctx, nil)
	if err != nil {

View on GitHub (pinned to 35bff19146)

Solutions

  1. Ensure the template actually defines a data: block (source + transformation) in the Workflow
  2. Re-check that the executor receives the correct template (inspect /var/run/argo/template inside the pod)
  3. Upgrade controller and executor together so template serialization matches
  4. Use `argo lint` to validate the workflow before submission

Example fix

# before (data node without data spec)
- name: my-data
  dag:
    tasks: []
# after
- name: my-data
  data:
    source:
      artifactPaths:
        archiveLogs: true
    transformation:
      - expression: "filter(jsonList, {# != null})"
Defensive patterns

Strategy: validation

Validate before calling

# Validate before submit:
# argo lint workflow.yaml
# A data template must define data:
func templateHasData(t *wfv1.Template) bool {
	return t.Data != nil
}

Type guard

func hasDataSpec(t *wfv1.Template) bool {
	return t != nil && t.Data != nil
}

Prevention

When it happens

Trigger: A pod/template of type Data is executed but the template's Data field is nil — e.g. the executor picked up a template blob (/var/run/argo/template) that lacks the data section, or a non-data template was incorrectly dispatched to the Data path.

Common situations: Template YAML missing the data: block while still being run as a data node; controller/executor version skew corrupting the serialized template; hand-edited or CRD-managed templates dropping the data field; wrong executor entrypoint running processData on a regular container pod.

Related errors


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