Skip to content

Draft: Cascade parent/child pipeline cancellation

What does this MR do and why?

Issue: #273378 (closed)

This MR makes all child pipeline jobs and pipeline jobs cancel when a given pipeline is cancelled.

Screenshots or screen recordings

Screen_Shot_2022-03-04_at_10.23.33_AM

How to set up and validate locally

  1. Setup a first project with a .gitlab-ci.yml that looks like:
job-1:
  trigger:
    include:
      - project: 'root/child'
        ref: 'main'
        file: '.gitlab-ci.yml'

job-2:
  script: sleep 100
  1. Setup a second project with the path root/child with a .gitlab-ci.yml that looks like:
job-1:
  script: sleep 100
  1. Run the pipeline for the first project
  2. Confirm the pipeline for the second child project is running
  3. Cancel the pipeline for the first project
  4. Observe that the jobs/pipelines in the first and second project both have the status of canceled

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #273378 (closed)

Edited by Allison Browne

Merge request reports