"fast finish" option in CI/CD pipelines with jobs that are allowed to fail

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Problem to solve

If a pipeline has jobs that are allowed to fail (allow_failure: true), then the pipeline should be marked successful as soon as all other jobs have completed if fast_finish: true is specified on the pipeline. Also, a stage should be completed as soon as all other jobs that must succeed in that stage have completed if fast_finish: true is specified on the pipeline.

Further details

The best way I can explain this is linking to the feature provided by Travis CI https://docs.travis-ci.com/user/customizing-the-build/#fast-finishing

Proposal

Here's how a .gitlab-ci.yml definition would look:

fast_finish: true

build:
  stage: build
  script:
    - run the build

test:
  stage: test
  script:
    - run core tests

# it is ok if this job fails, and we should not wait for it to succeed
code_quality:
  stage: test
  allow_failure: true
  script:
    - run codequality

release:
  stage: deploy
  script:
    - release code

# it is ok if this job fails, and we should not wait for it to succeed
other_release_task:
  stage: deploy
  allow_failure: true
  script:
    - other release task

When this pipeline runs:

  1. the build stage should require the build job to succeed
  2. the test stage should require the test job to succeed
  3. as soon as the test job succeeds, the deploy stage should start (regardless of the status of the code_quality job)
  4. the deploy stage should require the release job to succeed
  5. as soon as the release job succeeds, the pipeline should be marked success (regardless of the status of the other_release_task job)
Edited Sep 08, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading