Skip to content

Notify stable branch MRs on package-and-test fail

Steve Abrams requested to merge delivery2840-package-test-failure-comment into master

🔎 What does this MR do and why?

We are working to expand the maintenance policy for patch releases. One aspect of the process that is changing is developers will merge their backports directly into stable branches. We are using the package-and-test job as a way to evaluate if the change is safe for release. The package-and-test job sometimes will fail due to unrelated thing like flaky tests, so we don't block merging purely on a failure. However, we want to ensure that if a failure happens, a Software Engineer in Test (SET) takes a look and verifies the failure is unrelated.

This MR adds a new pipeline job to add a comment on MRs targeting stable branches anytime the package-and-test job fails. The comment pings the MR author and instructs them to contact an SET or quality for assistance.

📸 Screenshots or screen recordings

From !112368 (comment 1323194026)

Screenshot_2023-02-22_at_1.50.22_PM

💻 How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Checkout a stable branch, for example git checkout --track origin/15-8-stable-ee
  2. Create a new branch from that branch and check it out git checkout -b my-test-branch
  3. Cherry pick the commit added in this MR to the new branch git cherry-pick <commit_sha>
  4. Push the commit and open an MR. Make sure to update the target branch of the MR to 15-8-stable-ee.
  5. Once the package-and-test job starts to run, go into the downstream pipeline and cancel any job.
  6. Wait for the entire pipeline to finish
  7. A comment should be added to your test MR.

This process was used on this MR: !112368 (closed)

📐 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#2840 (closed)

Edited by Steve Abrams

Merge request reports