{"record":{"id":"697ffe2e1e487bee","repo":"argoproj/argo-workflows","slug":"in-s-w","errorCode":null,"errorMessage":"in %s: %w","messagePattern":"in (.+?): %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/argo/lint/lint.go","lineNumber":223,"sourceCode":"\t\tcase *wfv1.WorkflowTemplate:\n\t\t\tobjName = getObjectName(wf.WorkflowTemplateKind, v, i)\n\t\t\tif opts.ServiceClients.WorkflowTemplatesClient == nil {\n\t\t\t\tlogger.Debug(ctx, \"ignoring object, not in lint options kinds\")\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tres.Linted = true\n\t\t\tif err == nil {\n\t\t\t\t_, err = opts.ServiceClients.WorkflowTemplatesClient.LintWorkflowTemplate(\n\t\t\t\t\tctx,\n\t\t\t\t\t&workflowtemplatepkg.WorkflowTemplateLintRequest{Namespace: namespace, Template: v},\n\t\t\t\t)\n\t\t\t}\n\t\tdefault:\n\t\t\tcontinue // silently ignore unknown kinds\n\t\t}\n\n\t\tif err != nil {\n\t\t\tres.Errs = append(res.Errs, fmt.Errorf(\"in %s: %w\", objName, err))\n\t\t}\n\t}\n\n\treturn res\n}\n\nfunc (l *Results) Msg() string {\n\treturn l.msg\n}\n\n// evaluate must be called before checking the value of l.Success and l.String()\nfunc (l *Results) evaluate() *Results {\n\tsuccess := true\n\tl.anythingLinted = false\n\n\tfor _, r := range l.Results {\n\t\tif !r.Linted {\n\t\t\tcontinue","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argo/lint/lint.go#L205-L241","documentation":"During linting, lintData iterates every parsed object and validates it. If validation of a specific object fails, the error is collected as `in <objectName>: <cause>` in the Result's error list, attributing the failure to the named workload object (Workflow, CronWorkflow, WorkflowTemplate, etc.). This is the aggregation format for genuine spec errors found by `argo lint`.","triggerScenarios":"Any invalid spec in a linted file: missing required fields, invalid template references, unknown kind fields, failing strict-mode checks; a YAML doc that parses to a known kind but fails validation.","commonSituations":"CI pipelines linting manifests before submit; hand-edited YAML with typos in template names; references to templates/dag tasks that don't exist; strict fields flagged only with --strict.","solutions":["Read the wrapped cause after `in <name>:` — it names the exact spec problem and field.","Fix the YAML at that object; run `argo lint <file>` again until clean.","Use `--strict` in CI to catch deprecated/misused fields early.","Check template references exist (template names, dag task dependencies, artifact names)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"argo lint --strict my-workflow.yaml  # run in CI before submit","typeGuard":null,"tryCatchPattern":"for _, res := range results.Results {\n    for _, e := range res.Errs {\n        var objErr error\n        if errors.As(e, &objErr) { log.Printf(\"%s: %v\", res.File, e) } // 'in <obj>:' prefix names the offending object\n    }\n}\nif !results.Success { os.Exit(1) }","preventionTips":["Run argo lint in CI on every manifest change","Use --strict to surface deprecated fields","Cross-check template/dag task/artifact references by name","Keep manifests near the schema version of your installed controller"],"tags":["lint","validation","yaml","spec"],"backgroundTag":"spec-validation-failed","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"}