For the complete documentation index, see llms.txt. This page is also available as Markdown.

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


Before you begin

  • Feature flag required: This feature requires the PIPE_FAIL_ALL_FAILURE_STRATEGY feature 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.

Supported step types

This feature is only supported for deployment steps, such as Helm deploy step, Amazon Auto Scaling Group (ASG) Deploy steps, Kubernetes deploy, and GitOps Sync steps.

It is not supported for other step types including Verify steps, Approval steps, and other non-deployment steps.


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

YAML configuration only

Fail fast is currently configured through YAML only. There is no UI option to enable this feature. You must edit your pipeline YAML directly.

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

Last updated

Was this helpful?