canonical / checkbox

Checkbox
https://checkbox.readthedocs.io
GNU General Public License v3.0
30 stars 47 forks source link

Gate SRU with clear warning in the description (Infra) #1380

Closed Hook25 closed 1 month ago

Hook25 commented 2 months ago

Description

In order to avoid changing the sru testplan unintentionally, this PR introduces a validation mechanism that requires that if the sru testplan is touched by a pr, then the description must contain the following text:

WARNING: This modifies com.canonical.certification::sru-server

or

WARNING: This modifies com.canonical.certification::sru

The action lists the differences that the PR introduces for each sru testplan in the log, and fails if the text is not found

Resolved issues

Fixes: CHECKBOX-1512

Documentation

The action describes what to do when it fails, requiring the user to update the description due to the change to sru.

Tests

No change to sru, no error (note the two no diff): https://github.com/canonical/checkbox/actions/runs/10165387577/job/28113046601 Change to sru but no text in the description (note, the diff is the inclusion in the sru-server testplan of the ubuntu-desktop-recommands job): https://github.com/canonical/checkbox/actions/runs/10165493766/job/28113405735 Change to sru and text in the description (note how the diff is still shown, so we can audit it, but the workflow doesn't fail as the description was changed at that time to include the warning): https://github.com/canonical/checkbox/actions/runs/10165700224/job/28114127742

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 45.12%. Comparing base (c09a4ce) to head (a329c58). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1380 +/- ## ======================================= Coverage 45.12% 45.12% ======================================= Files 366 366 Lines 39058 39058 Branches 6607 6607 ======================================= Hits 17626 17626 Misses 20758 20758 Partials 674 674 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.