{"record":{"id":"dad9b685cb568dcc","repo":"argoproj/argo-workflows","slug":"d-name-s-is-invalid-s","errorCode":null,"errorMessage":"[%d].name: '%s' is invalid: %s","messagePattern":"\\[(.+?)\\]\\.name: '(.+?)' is invalid: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/apis/workflow/v1alpha1/validation_utils.go","lineNumber":63,"sourceCode":"// verifies that the Name field of the structs are:\n// * unique\n// * non-empty\n// * matches matches our regex requirements\nfunc validateWorkflowFieldNames(names []string, isParamOrArtifact bool) error {\n\tnameSet := make(map[string]bool)\n\n\tfor i, name := range names {\n\t\tif name == \"\" {\n\t\t\treturn fmt.Errorf(\"[%d].name is required\", i)\n\t\t}\n\t\tvar errs []string\n\t\tif isParamOrArtifact {\n\t\t\terrs = isValidParamOrArtifactName(name)\n\t\t} else {\n\t\t\terrs = isValidWorkflowFieldName(name)\n\t\t}\n\t\tif len(errs) != 0 {\n\t\t\treturn fmt.Errorf(\"[%d].name: '%s' is invalid: %s\", i, name, strings.Join(errs, \";\"))\n\t\t}\n\t\t_, ok := nameSet[name]\n\t\tif ok {\n\t\t\treturn fmt.Errorf(\"[%d].name '%s' is not unique\", i, name)\n\t\t}\n\t\tnameSet[name] = true\n\t}\n\treturn nil\n}\n\n// validateNoCycles validates that a dependency graph has no cycles by doing a Depth-First Search\n// depGraph is an adjacency list, where key is a node name and value is a list of its dependencies' names\nfunc validateNoCycles(depGraph map[string][]string) error {\n\tvisited := make(map[string]bool)\n\tvar noCyclesHelper func(currentName string, cycyle []string) error\n\tnoCyclesHelper = func(currentName string, cycle []string) error {\n\t\tif _, ok := visited[currentName]; ok {\n\t\t\treturn nil","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/pkg/apis/workflow/v1alpha1/validation_utils.go#L45-L81","documentation":"validateWorkflowFieldNames found a name that fails the regex check — either the param/artifact regex or the workflow-field regex depending on context. The message carries the index, the offending name, and the specific rule(s) violated (e.g. illegal characters, wrong case).","triggerScenarios":"Thrown at pkg/apis/workflow/v1alpha1/validation_utils.go:63 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rename to match the allowed pattern (e.g. My-name1-2 for fields; alphanumeric plus '-' and '_' for params/artifacts)","Check the joined error details for the exact rule violated"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}