Skip to content

Change Danger failure to warning for backports

🔎 What does this MR do and why?

As we are expanding the maintenance policy to allow bug fixes to be backported to up to three versions in patch releases (currently we only allow one version), we added a Danger rule to fail the pipeline if someone opens a merge request targeting a version outside of the maintenance policy. As we've moved this project forward, we've decided we still need to have ways to backport into older versions if needed and do not want to fail these pipelines.

In this MR, we update the failure to just be a warning and update the associated message.

🎞 Screenshots or screen recordings

Before - message is included in the error section:

Screen_Shot_2022-11-23_at_9.57.35_AM

After - message is included in the warning section:

Screenshot_2023-02-08_at_5.10.23_PM

💻 How to set up and validate locally

  1. Checkout a branch older than 15.6
  2. Create a new branch from that branch
  3. Cherry pick dc2b1096e2e02ab5e5f152e704be2454dae63708 (the original commit adding these Danger rules)
  4. Cherry pick this commit 75ad10952937eb8729669b6d78dd940ccd0db59f
  5. Push the branch and create an MR targeting 15-5-stable-ee (or whatever version you chose)
  6. Let the pipeline run, danger should show a warning regarding the version.
  7. Close the test MR.

I followed this process and created !111515 (comment 1271363219).

🛃 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 gitlab-com/gl-infra/delivery#2822 (closed)

Edited by Steve Abrams

Merge request reports