argoproj/argo-workflows · error
artifact override(s) matched no artifact: %s
Error message
artifact override(s) matched no artifact: %s
What it means
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.
Source
Thrown at workflow/util/util.go:397
}
return applied, nil
}
// unmatchedOverridesError names any override whose artifact name matched no artifact, so a
// typo'd or stale override surfaces as an error instead of being silently dropped. Returns
// nil when every override was consumed.
func unmatchedOverridesError(overrides map[string]string, consumed map[string]bool) error {
unmatched := make([]string, 0)
for name := range overrides {
if !consumed[name] {
unmatched = append(unmatched, name)
}
}
if len(unmatched) == 0 {
return nil
}
slices.Sort(unmatched)
return fmt.Errorf("artifact override(s) matched no artifact: %s", strings.Join(unmatched, ", "))
}
func overrideArtifacts(wf *wfv1.Workflow, artifacts []string) error {
if len(artifacts) == 0 {
return nil
}
overrides, err := ParseArtifactOverrides(artifacts)
if err != nil {
return err
}
// Override artifact keys in workflow arguments
// Note: For workflowTemplateRef workflows, artifacts are handled in workflow_server.go
// which has access to the WorkflowTemplate to copy the full artifact configuration
consumed := make(map[string]bool, len(overrides))
for i, artifact := range wf.Spec.Arguments.Artifacts {
if newKey, ok := overrides[artifact.Name]; ok {View on GitHub (pinned to 35bff19146)
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).
Example fix
// before argo submit wf.yaml --artifact source=s3://bucket/key // after (artifact is actually named 'src') argo submit wf.yaml --artifact src=s3://bucket/key
Defensive patterns
Strategy: validation
Validate before calling
names := map[string]bool{}
for _, a := range templateArtifacts {
names[a.Name] = true
}
for _, a := range wf.Spec.Arguments.Artifacts {
names[a.Name] = true
}
for name := range overrides {
if !names[name] {
return fmt.Errorf("override %q matches no artifact", name)
}
} Try / catch
if err := util.ApplySubmitOpts(wf, opts); err != nil {
if strings.Contains(err.Error(), "matched no artifact") {
// log available artifact names and abort submit
}
return err
} Prevention
- 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.
When it happens
Trigger: 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'.
Common situations: 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.
Related errors
- failed to set key for artifact %s: %w
- failed to set key for artifact %s in stored spec: %w
- no artifact logs are available
- Artifact driver connection validation failed: %v
- Artifact driver validation failed: The following artifact dr
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/7f1e505a71e2e235.
Report an issue: GitHub.