{"record":{"id":"7f1e505a71e2e235","repo":"argoproj/argo-workflows","slug":"artifact-override-s-matched-no-artifact-s","errorCode":null,"errorMessage":"artifact override(s) matched no artifact: %s","messagePattern":"artifact override\\(s\\) matched no artifact: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/util/util.go","lineNumber":397,"sourceCode":"\t}\n\treturn applied, nil\n}\n\n// unmatchedOverridesError names any override whose artifact name matched no artifact, so a\n// typo'd or stale override surfaces as an error instead of being silently dropped. Returns\n// nil when every override was consumed.\nfunc unmatchedOverridesError(overrides map[string]string, consumed map[string]bool) error {\n\tunmatched := make([]string, 0)\n\tfor name := range overrides {\n\t\tif !consumed[name] {\n\t\t\tunmatched = append(unmatched, name)\n\t\t}\n\t}\n\tif len(unmatched) == 0 {\n\t\treturn nil\n\t}\n\tslices.Sort(unmatched)\n\treturn fmt.Errorf(\"artifact override(s) matched no artifact: %s\", strings.Join(unmatched, \", \"))\n}\n\nfunc overrideArtifacts(wf *wfv1.Workflow, artifacts []string) error {\n\tif len(artifacts) == 0 {\n\t\treturn nil\n\t}\n\n\toverrides, err := ParseArtifactOverrides(artifacts)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Override artifact keys in workflow arguments\n\t// Note: For workflowTemplateRef workflows, artifacts are handled in workflow_server.go\n\t// which has access to the WorkflowTemplate to copy the full artifact configuration\n\tconsumed := make(map[string]bool, len(overrides))\n\tfor i, artifact := range wf.Spec.Arguments.Artifacts {\n\t\tif newKey, ok := overrides[artifact.Name]; ok {","sourceCodeStart":379,"sourceCodeEnd":415,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/util/util.go#L379-L415","documentation":"unmatchedOverridesError verifies that every artifact override provided matched at least one artifact in the template or workflow spec. If any override names did not match any artifact, the submit is aborted with this error listing the unmatched names. This catches typos and artifacts defined only in a different template than the one being resolved.","triggerScenarios":"Passing --artifact NAME=KEY where NAME does not equal the .name of any artifact in the workflow spec arguments or the resolved template artifacts — e.g. --artifact artefact=s3/key when the artifact is named 'artifact'.","commonSituations":"Typo in the artifact name, the artifact lives in a WorkflowTemplate referenced by templateRef rather than the submitted spec, or renaming an artifact in the template without updating callers/scripts.","solutions":["List the artifact names in the workflow/template and correct the override name spelling to match exactly.","If the artifact is defined in a referenced WorkflowTemplate, override it at the template level so ApplyOverridesToTemplateArtifacts sees it.","For templateRef workflows where artifacts are not inlined, add the artifact with its default key to the arguments before overriding (see the comment at workflow/util/util.go:417)."],"exampleFix":"// before\nargo submit wf.yaml --artifact source=s3://bucket/key\n// after (artifact is actually named 'src')\nargo submit wf.yaml --artifact src=s3://bucket/key","handlingStrategy":"validation","validationCode":"names := map[string]bool{}\nfor _, a := range templateArtifacts {\n\tnames[a.Name] = true\n}\nfor _, a := range wf.Spec.Arguments.Artifacts {\n\tnames[a.Name] = true\n}\nfor name := range overrides {\n\tif !names[name] {\n\t\treturn fmt.Errorf(\"override %q matches no artifact\", name)\n\t}\n}","typeGuard":null,"tryCatchPattern":"if err := util.ApplySubmitOpts(wf, opts); err != nil {\n\tif strings.Contains(err.Error(), \"matched no artifact\") {\n\t\t// log available artifact names and abort submit\n\t}\n\treturn err\n}","preventionTips":["Copy artifact names verbatim from the workflow/template YAML.","When using workflowTemplateRef, override artifacts defined in the template, not the referencing spec.","Grep 'argo get' output or template YAML for artifact names before scripting overrides."],"tags":["artifacts","override","name-mismatch"],"backgroundTag":"override-matches-no-artifact","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"}