Skip to content
Latchkey

Bitbucket "parallel" Steps - Misgrouped or Fail-Fast Cancellation

A parallel block runs its child steps concurrently - but only if they are grouped under it correctly. A misindented step runs serially, and by default one failing branch can cancel the others.

What this error means

Steps you expected to run at once run one after another, or the whole parallel group is cancelled the instant one branch fails. The config is "valid" but the grouping or fail-fast behavior is not what you intended.

bitbucket-pipelines.yml
# steps run sequentially, not in parallel - indentation is wrong
- parallel:
  - step: { script: [ ./a.sh ] }
- step: { script: [ ./b.sh ] }   # NOT inside parallel

Common causes

Child steps not nested under parallel

Every concurrent step must sit in the list directly under parallel:. A step indented one level too shallow falls out of the group and runs on its own, serially.

Fail-fast cancels sibling branches

By default, when one parallel step fails, Bitbucket can stop the remaining ones. If you wanted every branch to finish (e.g. to collect all test results), the default cancellation surprises you.

How to fix it

Nest all concurrent steps under parallel

Keep every step that should run at once inside the same parallel list.

bitbucket-pipelines.yml
- parallel:
    - step: { name: Unit, script: [ ./test.sh unit ] }
    - step: { name: Lint, script: [ ./lint.sh ] }

Control fail-fast behavior

Use the fail-fast option to keep other branches running when one fails.

bitbucket-pipelines.yml
- parallel:
    fail-fast: false
    steps:
      - step: { script: [ ./test.sh a ] }
      - step: { script: [ ./test.sh b ] }

How to prevent it

  • Double-check indentation so every concurrent step is under parallel.
  • Set fail-fast: false when you need all branches to complete.
  • Use the validator to confirm the parallel grouping you intended.

Frequently asked questions

What causes ""parallel" steps"?
Every concurrent step must sit in the list directly under parallel:. A step indented one level too shallow falls out of the group and runs on its own, serially.
How do I fix "parallel" steps?
Keep every step that should run at once inside the same parallel list.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card