Skip to content

Prevented jobs allowed to fail from cancelling the pipeline

  • Please check this box if this contribution uses AI-generated content as outlined in the GitLab DCO & CLA

What does this MR do and why?

This MR changes the auto_cancel:on_job_failure feature to make sure that jobs allowed to fail don't trigger the auto-cancel logic 🙂

Related to: Interaction between workflow.auto_cancel.on_job... (#457123)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

N.A.

How to set up and validate locally

Set up a project to use the following .gitlab-ci.yml and make sure that when job_b fails the pipeline is not canceled, but is canceled when job_c fails 🙂

workflow:
  auto_cancel:
    on_job_failure: all

job_a:
  script:
    - sleep 20

job_b:
  allow_failure: true
  script:
    - sleep 5
    - exit 1

job_c:
  script:
    - sleep 10
    - exit 1
Edited by Furkan Ayhan

Merge request reports