{"record":{"id":"0383e6b4a1725f19","repo":"argoproj/argo-workflows","slug":"codebadrequest-0383e6","errorCode":"CodeBadRequest","errorMessage":"spec.entrypoint is required","messagePattern":"spec\\.entrypoint is required","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/validate/validate.go","lineNumber":260,"sourceCode":"\tfor k := range mergedAnnotations {\n\t\ttctx.globalParams[varkeys.WorkflowAnnotationsByName.Concretize(k)] = placeholderGenerator.NextPlaceholder()\n\t}\n\ttctx.globalParams[varkeys.WorkflowAnnotationsAll.Template()] = placeholderGenerator.NextPlaceholder()\n\ttctx.globalParams[varkeys.WorkflowAnnotationsJSON.Template()] = placeholderGenerator.NextPlaceholder()\n\n\tfor k := range mergedLabels {\n\t\ttctx.globalParams[varkeys.WorkflowLabelsByName.Concretize(k)] = placeholderGenerator.NextPlaceholder()\n\t}\n\ttctx.globalParams[varkeys.WorkflowLabelsAll.Template()] = placeholderGenerator.NextPlaceholder()\n\ttctx.globalParams[varkeys.WorkflowLabelsJSON.Template()] = placeholderGenerator.NextPlaceholder()\n\n\tif wf.Spec.Priority != nil {\n\t\ttctx.globalParams[varkeys.WorkflowPriority.Template()] = strconv.Itoa(int(*wf.Spec.Priority))\n\t}\n\ttctx.globalParams[varkeys.WorkflowStatus.Template()] = placeholderGenerator.NextPlaceholder()\n\n\tif !opts.IgnoreEntrypoint && entrypoint == \"\" {\n\t\treturn errors.New(errors.CodeBadRequest, \"spec.entrypoint is required\")\n\t}\n\n\tif !opts.IgnoreEntrypoint {\n\t\tvar args wfv1.ArgumentsProvider\n\t\targs = &wfArgs\n\t\tif opts.WorkflowTemplateValidation {\n\t\t\targs = &FakeArguments{}\n\t\t}\n\t\ttmpl := &wfv1.WorkflowStep{Template: entrypoint}\n\t\tif hasWorkflowTemplateRef {\n\t\t\ttmpl = &wfv1.WorkflowStep{TemplateRef: wfTmplRef}\n\t\t}\n\t\t_, err = tctx.validateTemplateHolder(ctx, tmpl, tmplCtx, args, opts.WorkflowTemplateValidation)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/validate/validate.go#L242-L278","documentation":"Every Argo Workflow spec must name an entrypoint template — the first template executed. Workflow validation (workflow/validate) rejects specs without one unless the caller opts out (opts.IgnoreEntrypoint). The entrypoint may be given directly (spec.entrypoint) or resolved from workflowTemplateRef defaults, but if after resolution the entrypoint name is still empty, this CodeBadRequest error is returned.","triggerScenarios":"Submitting (argo submit / CreateWorkflow / SubmitWorkflow) or linting (argo lint / LintWorkflow) a Workflow whose spec lacks spec.entrypoint and which does not reference a WorkflowTemplate that supplies one. Also surfaces during WorkflowTemplate/ClusterWorkflowTemplate validation of embedded specs.","commonSituations":"Hand-written minimal workflow YAML that only contains templates but no entrypoint; a workflowTemplateRef pointing at a template with no entrypoint in its spec; CI linting a partial spec; upgrading or migrating manifests where the entrypoint key was renamed or dropped.","solutions":["Add spec.entrypoint naming one of the templates defined in spec.templates","If relying on a WorkflowTemplate, confirm the referenced template's spec defines an entrypoint (argo get/inspect the template)","Run `argo lint <file>` before submitting to catch this locally"],"exampleFix":"# before\nspec:\n  templates:\n    - name: whalesay\n      container: {image: docker/whalesay, command: [cowsay]}\n# after\nspec:\n  entrypoint: whalesay\n  templates:\n    - name: whalesay\n      container: {image: docker/whalesay, command: [cowsay]}","handlingStrategy":"validation","validationCode":"if wf.Spec.Entrypoint == \"\" && wf.Spec.WorkflowTemplateRef == nil {\n    return errors.New(\"spec.entrypoint is required (or use workflowTemplateRef whose spec defines one)\")\n}","typeGuard":"func hasEntrypoint(wf *wfv1.Workflow) bool {\n    return wf.Spec.Entrypoint != \"\" || wf.Spec.WorkflowTemplateRef != nil\n}","tryCatchPattern":"if err := (wfv1.Workflow{Spec: wf.Spec}).Validate(); err != nil {\n    if strings.Contains(err.Error(), \"entrypoint is required\") {\n        return fmt.Errorf(\"set spec.entrypoint before submitting: %w\", err)\n    }\n    return err\n}","preventionTips":["Always run `argo lint` in CI before submitting workflows","If using workflowTemplateRef, verify the referenced template's spec sets entrypoint","Keep workflow scaffolds with a placeholder entrypoint to avoid omitting it"],"tags":["argo-workflows","yaml","validation","workflow-spec"],"backgroundTag":"missing-required-argument","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"}