{"record":{"id":"19c6cdc01b4527e0","repo":"argoproj/argo-workflows","slug":"no-valid-source-is-used-for-data-template","errorCode":null,"errorMessage":"no valid source is used for data template","messagePattern":"no valid source is used for data template","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/data/data.go","lineNumber":34,"sourceCode":"\t}\n\ttransformedData, err := processTransformation(sourcedData, &data.Transformation)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to process data transformation: %w\", err)\n\t}\n\treturn transformedData, nil\n}\n\nfunc processSource(ctx context.Context, source wfv1.DataSource, processor wfv1.DataSourceProcessor) (any, error) {\n\tvar data any\n\tvar err error\n\tswitch {\n\tcase source.ArtifactPaths != nil:\n\t\tdata, err = processor.ProcessArtifactPaths(ctx, source.ArtifactPaths)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to source artifact paths: %w\", err)\n\t\t}\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"no valid source is used for data template\")\n\t}\n\n\treturn data, nil\n}\n\nfunc processTransformation(data any, transformation *wfv1.Transformation) (any, error) {\n\tif transformation == nil {\n\t\treturn data, nil\n\t}\n\n\tvar err error\n\tfor i, step := range *transformation {\n\t\tif step.Expression != \"\" {\n\t\t\tdata, err = processExpression(step.Expression, data)\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error processing data step %d: %w\", i, err)\n\t\t}","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/data/data.go#L16-L52","documentation":"A Data template declared a source that the controller cannot process: only source.artifactPaths is supported, and it was nil/absent. processSource falls through to its default branch and returns this error, meaning the data source configuration itself is invalid rather than a storage failure.","triggerScenarios":"spec.data.source is empty, or set to a non-artifactPaths source (unsupported/misspelled field), so the switch finds no case and hits default.","commonSituations":"YAML indentation putting artifactPaths at the wrong level, using a source type from another tool or a future Argo version, or a typo like artifactPath(singular).","solutions":["Ensure spec.data.source.artifactPaths is populated with a valid artifact repository source","Check YAML indentation — artifactPaths must be directly under source","Run argo lint on the workflow to catch malformed data sources before submit","If you intended another source type, verify your Argo version supports it (only artifactPaths is implemented)"],"exampleFix":"// before\nsource:\n  git:\n    repo: https://github.com/x/y   # unsupported source\n// after\nsource:\n  artifactPaths:\n    s3:\n      bucket: my-bucket\n      key: artifacts/*.tgz","handlingStrategy":"validation","validationCode":"// Validate Data template shape before submit\nif wfTmpl.Data == nil || wfTmpl.Data.Source.ArtifactPaths == nil {\n    return fmt.Errorf(\"template %q: data.source.artifactPaths is required\", wfTmpl.Name)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always populate source.artifactPaths — it is the only supported source","Check YAML indentation so artifactPaths nests under source","Run argo lint in CI to catch malformed data templates","Avoid inventing source types not present in the v1alpha1 API"],"tags":["data-template","config","validation","argo-workflows"],"backgroundTag":"unsupported-data-source","analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}