{"record":{"id":"8401cd6878fa94cd","repo":"argoproj/argo-workflows","slug":"no-data-template-found","errorCode":null,"errorMessage":"no data template found","messagePattern":"no data template found","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/executor/data.go","lineNumber":16,"sourceCode":"package executor\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/argoproj/argo-workflows/v4/workflow/data\"\n)\n\nfunc (we *WorkflowExecutor) processData(ctx context.Context) (any, error) {\n\tdataCtx, span := we.Tracing.StartProcessDataTemplate(ctx)\n\tdefer span.End()\n\tdataTemplate := we.Template.Data\n\tif dataTemplate == nil {\n\t\treturn nil, fmt.Errorf(\"no data template found\")\n\t}\n\n\treturn data.ProcessData(dataCtx, dataTemplate, newExecutorDataSourceProcessor(we))\n}\n\nfunc (we *WorkflowExecutor) Data(ctx context.Context) error {\n\ttransformedData, err := we.processData(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to process data template: %w\", err)\n\t}\n\n\tout, err := json.Marshal(transformedData)\n\tif err != nil {\n\t\treturn err\n\t}\n\twe.Template.Outputs.Result = new(string(out))\n\terr = we.ReportOutputs(ctx, nil)\n\tif err != nil {","sourceCodeStart":1,"sourceCodeEnd":34,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/executor/data.go#L1-L34","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Ensure the template actually defines a data: block (source + transformation) in the Workflow","Re-check that the executor receives the correct template (inspect /var/run/argo/template inside the pod)","Upgrade controller and executor together so template serialization matches","Use `argo lint` to validate the workflow before submission"],"exampleFix":"# before (data node without data spec)\n- name: my-data\n  dag:\n    tasks: []\n# after\n- name: my-data\n  data:\n    source:\n      artifactPaths:\n        archiveLogs: true\n    transformation:\n      - expression: \"filter(jsonList, {# != null})\"","handlingStrategy":"validation","validationCode":"# Validate before submit:\n# argo lint workflow.yaml\n# A data template must define data:\nfunc templateHasData(t *wfv1.Template) bool {\n\treturn t.Data != nil\n}","typeGuard":"func hasDataSpec(t *wfv1.Template) bool {\n\treturn t != nil && t.Data != nil\n}","tryCatchPattern":null,"preventionTips":["Always define the data: block (source + transformation) in data templates","Validate workflows with `argo lint` before submission","Keep controller and executor versions matched so the serialized template is complete","Inspect /var/run/argo/template in the pod if you suspect a template serialization issue"],"tags":["executor","data-template","missing-field"],"backgroundTag":"missing-data-template","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"}