Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 12 commits into from
Aug 7, 2024
Merged

Conversation

Hook25
Copy link
Collaborator

@Hook25 Hook25 commented Jul 30, 2024

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

Copy link

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@           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           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Hook25 Hook25 marked this pull request as ready for review July 30, 2024 16:10
Copy link
Collaborator

@pieqq pieqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one request, but otherwise it looks good to me!

.github/workflows/pr_validation.yaml Show resolved Hide resolved
.github/workflows/pr_validation.yaml Outdated Show resolved Hide resolved
Co-authored-by: Pierre Equoy <[email protected]>
Copy link
Collaborator

@pieqq pieqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Hook25 Hook25 merged commit f57e990 into main Aug 7, 2024
7 checks passed
@Hook25 Hook25 deleted the sru_gate branch August 7, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants