{"record":{"id":"7069ae707cdce122","repo":"argoproj/argo-workflows","slug":"executor-plugin-metadata-name-is-mandatory","errorCode":null,"errorMessage":"executor plugin metadata name is mandatory","messagePattern":"executor plugin metadata name is mandatory","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/apis/workflow/v1alpha1/workflow_types.go","lineNumber":564,"sourceCode":"\n\treturn &wfs.ArtifactGC.ArtifactGC\n}\n\nfunc (wfs WorkflowSpec) GetTTLStrategy() *TTLStrategy {\n\treturn wfs.TTLStrategy\n}\n\n// AsExecutorPluginSpec maps proto models to v4/pkg/plugins/spec models.\nfunc (wfs WorkflowSpec) AsExecutorPluginSpec() ([]execplugin.Plugin, error) {\n\tplugins := make([]execplugin.Plugin, 0, len(wfs.ExecutorPlugins))\n\tfor _, plugin := range wfs.ExecutorPlugins {\n\t\tsidecar := execplugin.Sidecar{\n\t\t\tAutomountServiceAccountToken: plugin.Spec.Sidecar.AutomountServiceAccountToken,\n\t\t\tContainer:                    plugin.Spec.Sidecar.Container,\n\t\t}\n\n\t\tif plugin.Name == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"executor plugin metadata name is mandatory\")\n\t\t}\n\t\terr := sidecar.Validate()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tspec := execplugin.PluginSpec{\n\t\t\tSidecar: sidecar,\n\t\t}\n\t\tplugins = append(plugins, execplugin.Plugin{\n\t\t\tObjectMeta: plugin.ObjectMeta,\n\t\t\tSpec:       spec,\n\t\t})\n\t}\n\treturn plugins, nil\n}\n\n// GetSemaphoreKeys will return list of semaphore configmap keys which are configured in the workflow","sourceCodeStart":546,"sourceCodeEnd":582,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/pkg/apis/workflow/v1alpha1/workflow_types.go#L546-L582","documentation":"When Argo converts an ExecutorPlugin spec into a sidecar container to inject into workflow pods, the plugin's metadata.name is required because it identifies the plugin. This error is returned from the conversion function when plugin.Name is empty.","triggerScenarios":"Applying an ExecutorPlugin custom resource (or loading one in code) whose `metadata.name` field is missing or empty, which then flows into the plugin-to-sidecar conversion.","commonSituations":"YAML with metadata omitted or indented wrong so name is not parsed; programmatically constructing an ExecutorPlugin struct without setting Name.","solutions":["Set metadata.name on the ExecutorPlugin resource to a non-empty value","Ensure the YAML indentation places `name` under `metadata:`","Validate with `kubectl apply --dry-run=server` before submitting workflows"],"exampleFix":"# before\napiVersion: argoproj.io/v1alpha1\nkind: ExecutorPlugin\nspec: ...\n# after\napiVersion: argoproj.io/v1alpha1\nkind: ExecutorPlugin\nmetadata:\n  name: my-plugin\nspec: ...","handlingStrategy":"validation","validationCode":"if plugin.ObjectMeta.Name == \"\" {\n    return errors.New(\"executor plugin requires metadata.name\")\n}","typeGuard":null,"tryCatchPattern":"sidecar, err := execplugin.GetContainer(plugin)\nif err != nil {\n    return fmt.Errorf(\"invalid ExecutorPlugin %q: %w\", plugin.Name, err)\n}","preventionTips":["Validate ExecutorPlugin manifests with kubectl dry-run before apply","Use kubebuilder/CRD validation markers requiring metadata.name","Lint plugin YAML in CI"],"tags":["executor-plugin","validation","kubernetes"],"backgroundTag":"missing-metadata-name","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"}