Stable branch Danger package-and-test rules
🏘 What does this MR do and why?
groupdelivery is working to extend the maintenance policy and allow engineers to merge bug fix backports directly into stable branches.
This MR updates the Danger tooling with a few new rules around stable branches. Because stable branches need to remain...stable, we want to be sure the package-and-test
pipeline is always run before merging. It is not uncommon for that pipeline to fail, so we need to inform engineers what to do in those cases.
The Danger updates include:
- Add a section to the Danger output explaining what to do if the
e2e:package-and-test
pipeline fails. - Have Danger fail if the pipeline:expedite label is present on the MR (that label causes the
package-and-test
pipeline to be skipped). - Have Danger fail if for some reason the
package-and-test
pipeline has not started running.
The last two points are skipped if:
- The MR includes the failureflaky-test label
- The MR includes only documentation changes
For some additional context, the package-and-test
pipeline does run automatically on all MR pipelines for MRs targeting stable branches, so the last error will only show up if something happens to cause the pipeline not to run, for example, adding the pipeline:expedite label.
📸 Screenshots or screen recordings
This MR ran these Danger changes while targeting a stable branch. You can see the resulting failures here: !111491 (comment 1271177755)
New failure errors:
New section describing the package-and-test
failure process:
💻 How to set up and validate locally
- Checkout a stable branch (for example
15-7-stable-ee
) - Create a new branch from the stable branch
- Cherry-pick the commit from this MR, or apply the git diff on your new branch
- Push the branch and open an MR targeting the stable branch.
- Name the MR with "Revert" at the beginning of the MR title and add the pipeline:expedite label
- Danger should fail and have error messages referencing both the pipeline:expedite label as well as the missing
package-and-test
pipeline. There should also be a new section at the bottom of Danger explaining what to do when thepackage-and-test
job fails.
I opened an MR like this, see the Danger failure here: !110968 (comment 1267465471)
🛃 MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to gitlab-com/gl-infra/delivery#2797 (closed)