-
Notifications
You must be signed in to change notification settings - Fork 385
Ensure "complete" CI steps always run #4506
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
base: master
Are you sure you want to change the base?
Conversation
LGTM but I don't understand the GH stuff enough to checkmark |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4506 +/- ##
==========================================
- Coverage 97.70% 97.69% -0.02%
==========================================
Files 1381 1381
Lines 83973 83973
Branches 4251 4251
==========================================
- Hits 82046 82036 -10
- Misses 1927 1937 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Datadog ReportBranch report: ✅ 0 Failed, 20632 Passed, 1370 Skipped, 3m 17.78s Total Time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Today when the "complete" job is skipped, the branch protection check considers it successful ‽
This is normal (and similar to rspec skipping tests?)
In GHA terms, "skipped" means "this step/workflow is not relevant".
e.g running system tests for doc changes makes no sense => skipped, ergo "successful".
This PR would transform a "skipped" UI display materialising the fact that the tests did not run (intentionally so) into a checkmark that looks like as if the tests did run when they actually didn't.
(Again, a skipped test is displayed differently than a passing one in a rspec suite)
even when its dependency jobs have failed
Also "(complete)" should not run when any dependent fail and thus properly result in the PR tests not passing / the PR being unmergeable. Is that the initial reason for this PR? That you'd like it to be red?
Marking this "request changes" to leave the opportunity to discuss, but I don't believe the change should be merged.
See:
@lloeki My reading of the diff is that a skipped status would be changed to failing, not successful, thus there will not actually be a case when a skipped test would be marked as having been run and succeeded? |
That would be a problem! It's like you have this rspec test:
You don't want that to fail the test suite, you want the test suite to pass (and tell you that bit has been skipped) If you have a doubt, imagine that In our case the system tests have no business running when there are only changes to, say, documentation files, ergo the running of it is skipped based on a path criteria, because they're simply irrelevant to run in that case, and so the overall result of the skip is to satisfy the branch protection status requirement check. If "skip" implied "fail" then merges would be blocked by irrelevant checks. |
This PR ensures the last step of our CI workflows (normally called
WORKFLOW NAME (complete)
) always run, even when its dependency jobs have failed or been skipped.This ensures that our mandatory branch protection checks will never be skipped by GitHub. Today when the "complete" job is skipped, the branch protection check considers it successful ‽
Change log entry
No
Additional Notes:
How to test the change?