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.
# steps run sequentially, not in parallel - indentation is wrong
- parallel:
- step: { script: [ ./a.sh ] }
- step: { script: [ ./b.sh ] } # NOT inside parallelCommon 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.
- 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.
- 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: falsewhen you need all branches to complete. - Use the validator to confirm the parallel grouping you intended.