You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
value: '{{ index .steps "parse-request" "path_params" "id" }}'
430
430
```
431
431
432
-
`wfctl template validate --config workflow.yaml`lints template expressions and warns on undefined step references, forward references, and suggests the `step` function for hyphenated names.
432
+
#### Missing Key Behaviour
433
433
434
+
By default, template expressions that reference a missing map key (e.g. a typo in a step field name) resolve to the zero value silently — but the engine now logs a **WARN** message to make the problem visible:
435
+
436
+
```
437
+
WARN template resolved missing key to zero value pipeline=my-pipeline error="..."
438
+
```
439
+
440
+
To turn the warning into a hard error, set `strict_templates: true` on the pipeline:
441
+
442
+
```yaml
443
+
pipelines:
444
+
my-pipeline:
445
+
strict_templates: true # any missing key access fails the pipeline step
| Mode | `strict_templates` | Missing key result |
455
+
|------|-------------------|--------------------|
456
+
| Default | `false` | Zero value (`<no value>`) + WARN log |
457
+
| Strict | `true` | Step returns an error |
458
+
459
+
Strict mode applies to **both** direct dot-access (`{{ .steps.auth.field }}`) and the `step`/`trigger` helper functions (`{{ step "auth" "field" }}`). A missing key via either syntax will fail the step when `strict_templates: true` is set.
460
+
461
+
`wfctl template validate --config workflow.yaml` lints template expressions and warns on undefined step references and forward references. Use `strict_templates: true` in the pipeline config to catch field-level typos at runtime.
0 commit comments