Skip to content

Adjust Danger logic for stable branches

Steve Abrams requested to merge delivery19492-danger-current-stable-version into master

What does this MR do and why?

When we implemented the Danger rules around stable branches for the new patch release process, we were considering expanding the patch release maintenance policy to 3 releases. We have since decided to keep it at 1, the current stable release. This MR updates a danger rule that was evaluating against the 3 last versions to evaluate only against the current stable release.

Currently, if you open an MR in the 2nd or 3rd most recent versions, you do not see any warning to open an exception request (backport request), but that request is required since those are out of the maintenance policy. This change updates so the warning will be included in those versions.

Related to gitlab-com/gl-infra/delivery#19492 (closed)

Screenshots or screen recordings

To test this, I followed the instructions in the section below.

Description Reference
Backport MR for current stable release (16.2) !128410 (closed)
Danger output from 16.2 backport with no exception request warning Screenshot_2023-08-03_at_3.56.39_PM
Backport MR for release outside maintenance policy (16.1) !128411 (closed)
Danger output from 16.1 backport with exception request warning Screenshot_2023-08-03_at_3.57.51_PM

How to set up and validate locally

  1. Branch off of the current stable branch (16-2-stable-ee) and cherry pick these changes.
  2. Push your branch and open an MR targeting 16-2-stable-ee.
  3. You should not see the exception request warning
  4. Branch off of the current stable branch (16-1-stable-ee) and cherry pick these changes.
  5. Push your branch and open an MR targeting 16-1-stable-ee.
  6. You should see the warning to open an exception request.

MR acceptance checklist

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

Edited by Steve Abrams

Merge request reports

Loading