{"record":{"id":"2ef830bc1f6e1211","repo":"argoproj/argo-workflows","slug":"containers-s-dependency-s-not-defined","errorCode":null,"errorMessage":"containers.%s dependency '%s' not defined","messagePattern":"containers\\.(.+?) dependency '(.+?)' not defined","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/apis/workflow/v1alpha1/container_set_template_types.go","lineNumber":122,"sourceCode":"\t// Ensure there are no collisions with volume mountPaths and artifact load paths\n\tmountPaths := make(map[string]string)\n\tfor i, volMount := range in.VolumeMounts {\n\t\tif prev, ok := mountPaths[volMount.MountPath]; ok {\n\t\t\treturn fmt.Errorf(\"volumeMounts[%d].mountPath '%s' already mounted in %s\", i, volMount.MountPath, prev)\n\t\t}\n\t\tmountPaths[volMount.MountPath] = fmt.Sprintf(\"volumeMounts.%s\", volMount.Name)\n\t}\n\n\t// Ensure the dependencies are defined\n\tnameToContainer := make(map[string]ContainerNode)\n\tfor _, ctr := range in.Containers {\n\t\tnameToContainer[ctr.Name] = ctr\n\t}\n\tfor _, ctr := range in.Containers {\n\t\tfor _, depName := range ctr.Dependencies {\n\t\t\t_, ok := nameToContainer[depName]\n\t\t\tif !ok {\n\t\t\t\treturn fmt.Errorf(\"containers.%s dependency '%s' not defined\", ctr.Name, depName)\n\t\t\t}\n\t\t}\n\t}\n\n\t// Ensure there is no dependency cycle\n\tdepGraph := make(map[string][]string)\n\tfor _, ctr := range in.Containers {\n\t\tdepGraph[ctr.Name] = append(depGraph[ctr.Name], ctr.Dependencies...)\n\t}\n\terr = validateNoCycles(depGraph)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"containers %s\", err.Error())\n\t}\n\treturn nil\n}\n\ntype ContainerNode struct {\n\tcorev1.Container `json:\",inline\" protobuf:\"bytes,1,opt,name=container\"`","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/pkg/apis/workflow/v1alpha1/container_set_template_types.go#L104-L140","documentation":"ContainerSetTemplate.Validate found a container whose Dependencies array names a container that is not declared in the same container set. The message identifies the referencing container (ctr.Name) and the missing dependency name.","triggerScenarios":"Thrown at pkg/apis/workflow/v1alpha1/container_set_template_types.go:122 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a container entry named as the dependency, or fix the typo in the dependencies list","Ensure dependencies reference sibling containers, not templates or other steps"],"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"}