argoproj/argo-workflows · error
[%d].name is required
Error message
[%d].name is required
What it means
validateWorkflowFieldNames verifies that struct Name fields in a slice (params, artifacts, steps, containers, etc.) are non-empty, unique, and regex-valid. This guard fires with the element's index when a name is empty, identifying which list item in the spec is missing its required name during template/workflow validation.
Source
Thrown at pkg/apis/workflow/v1alpha1/validation_utils.go:54
}
if !workflowFieldNameRegex.MatchString(name) {
msg := workflowFieldNameErrMsg + " (e.g. My-name1-2, 123-NAME)"
errs = append(errs, msg)
}
return errs
}
// validateWorkflowFieldNames accepts a slice of strings and
// verifies that the Name field of the structs are:
// * unique
// * non-empty
// * matches matches our regex requirements
func validateWorkflowFieldNames(names []string, isParamOrArtifact bool) error {
nameSet := make(map[string]bool)
for i, name := range names {
if name == "" {
return fmt.Errorf("[%d].name is required", i)
}
var errs []string
if isParamOrArtifact {
errs = isValidParamOrArtifactName(name)
} else {
errs = isValidWorkflowFieldName(name)
}
if len(errs) != 0 {
return fmt.Errorf("[%d].name: '%s' is invalid: %s", i, name, strings.Join(errs, ";"))
}
_, ok := nameSet[name]
if ok {
return fmt.Errorf("[%d].name '%s' is not unique", i, name)
}
nameSet[name] = true
}
return nil
}View on GitHub (pinned to 35bff19146)
Solutions
- Add a non-empty name to the element at the reported index
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/apis/workflow/v1alpha1/validation_utils.go:54 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/c46f12833db74e1c.
Report an issue: GitHub.