argoproj/argo-workflows · error
in %s: %w
Error message
in %s: %w
What it means
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`.
Source
Thrown at cmd/argo/lint/lint.go:223
case *wfv1.WorkflowTemplate:
objName = getObjectName(wf.WorkflowTemplateKind, v, i)
if opts.ServiceClients.WorkflowTemplatesClient == nil {
logger.Debug(ctx, "ignoring object, not in lint options kinds")
continue
}
res.Linted = true
if err == nil {
_, err = opts.ServiceClients.WorkflowTemplatesClient.LintWorkflowTemplate(
ctx,
&workflowtemplatepkg.WorkflowTemplateLintRequest{Namespace: namespace, Template: v},
)
}
default:
continue // silently ignore unknown kinds
}
if err != nil {
res.Errs = append(res.Errs, fmt.Errorf("in %s: %w", objName, err))
}
}
return res
}
func (l *Results) Msg() string {
return l.msg
}
// evaluate must be called before checking the value of l.Success and l.String()
func (l *Results) evaluate() *Results {
success := true
l.anythingLinted = false
for _, r := range l.Results {
if !r.Linted {
continueView on GitHub (pinned to 35bff19146)
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).
Defensive patterns
Strategy: try-catch
Validate before calling
argo lint --strict my-workflow.yaml # run in CI before submit
Try / catch
for _, res := range results.Results {
for _, e := range res.Errs {
var objErr error
if errors.As(e, &objErr) { log.Printf("%s: %v", res.File, e) } // 'in <obj>:' prefix names the offending object
}
}
if !results.Success { os.Exit(1) } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- CodeBadRequest
- [%d].name '%s' is not unique
- malformed workflow template parameter "%s": valueFrom is nil
- cron schedules must consist of 5 values only
- ${e.Usage()}
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/697ffe2e1e487bee.
Report an issue: GitHub.