Fail Fast Pipeline
Enable fail fast behavior to immediately fail pipelines when any step or stage in a parallel group fails.
In traditional deployments, Harness waits for all steps or stages to complete before determining pipeline status. This can be inefficient when an early failure is enough to trigger rollback.
Harness supports fail fast behavior, which immediately fails the pipeline and triggers the configured failure strategy when any step or stage in a parallel group fails.
What you will learn from this topic
Understand fail fast behavior and when to use it.
How to configure fail fast in your pipeline failure strategy.
How fail fast works with matrix iterations and parallel execution behavior.
Before you begin
Feature flag required: This feature requires the
PIPE_FAIL_ALL_FAILURE_STRATEGYfeature flag. Contact Harness Support to enable this feature flag.Pipeline permissions: You must have Edit permissions on pipelines to configure failure strategies. For more information, refer to Manage roles.
Fail fast behavior
When fail fast is enabled, if any step or stage in a parallel group fails, the pipeline immediately:
Fails without waiting for the remaining steps to complete.
Triggers the configured failure strategy, such as pipeline rollback.
This is particularly useful in scenarios where early failures should halt the entire rollout.
Configure fail fast
To enable fail fast behavior, add failAll: true to the failure strategy at stage level.
The following YAML example shows a failure strategy with fail fast enabled:
Fail fast with matrix iterations
failAll: true also applies when the failing stage uses a matrix strategy. When one matrix iteration fails, Harness triggers the configured failure strategy for the stage, for example rolling back through PipelineRollback.
failAll: true does not cancel matrix iterations that are already running. Iterations that have started continue to completion; only iterations that haven't started yet are skipped. This matches the general parallel-execution behavior described in Failure strategy support for multiservice, multi-infrastructure, and matrix deployment: already-started deployments in a parallel group cannot be stopped, even when a failure occurs elsewhere in the group.
Once every iteration reaches a terminal state, the configured failure strategy runs once for the stage, for example a single PipelineRollback that rolls back all matrix iterations together.
Next steps
Define a failure strategy on stages and steps: Learn about other failure strategy actions available for stages and steps.
Rollback pipelines: Learn more about pipeline rollback failure strategies.
Last updated
Was this helpful?