Hydra ETL
Build your first job
Hydra DSL6 · Workflowretry
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.

✓ one successful attempt

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.
  • backofffixed by default or exponential.

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.

Retry adds attempts around one workflow step One initial attempt may be followed by up to two retries, stopping as soon as the step succeeds. attempt 1step fails retry max: 2policy wrapper attempts 2–3stop on success The wrapper repeats one node, not the whole workflow.
Retries are local and success short-circuits the policy.

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

Close by

0 / 0 on this page