Grammar element · workflow.steps.retry
retry wraps one step in an attempt policy
No retry, fixed delay, and exponential backoff are all valid. Success stops the loop immediately.
workflow.yaml4 steps
What retry wraps
One step execution, repeated only after failure and only up to the declared maximum.
What workflow.steps.retry is
retry is the re-attempt policy around one workflow step.
It is not a workflow-wide restart. Completed predecessor nodes stay complete, and the policy only repeats the step that failed.
What it contains
- max — Number of retries after the initial attempt; default zero.
- delay — Base wait in seconds; default zero.
- backoff —
fixedby default orexponential.
Max counts retries, not attempts
A policy with max: 2 allows the initial attempt plus two re-attempts. Reading max this way prevents an off-by-one expectation during incident review.
Run the complete example
Copy this manifest from the verified documentation project, then run it from the repository root.
workflow:
version: "1.0"
name: docs_workflow
description: Two actions used by the DSL documentation.
trigger: {type: manual}
steps:
- name: prepare
type: action
action: log
params: {message: "Preparation complete."}
retry: {max: 2, delay: 0, backoff: fixed}
- name: publish
type: action
action: log
params: {message: "Publication complete."}
depends_on: [prepare]
when: "1 == 1"
on_failure: fail
hdrctl workflow run examples/tutorial/dsl-elements/workflow.yaml
✓ Step 'prepare' OK (0.0s) ✓ Step 'publish' OK (0.0s) ✅ Workflow 'docs_workflow' completed in 0.0s — 2/2 steps OK
The relevant command syntax, copied from hdrctl workflow run --help:
hdrctl workflow run PATH PATH path to workflow.yaml --lang LANG interface language -h, --help show command help