-
Notifications
You must be signed in to change notification settings - Fork 39
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
CI: migrate from Bors to GitHub Merge Queue; also, refactor some code, and add some more unit tests #477
Conversation
How do we configure the merge queue? Did you already set it up to trigger integration tests? |
My phone is upstairs, so I can't see if you're an admin in this repo, but here's the above settings. From skimming the README it seems like you just need to configure it here and in the workflow set |
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.
Cool, let's try it!
Co-authored-by: mattBrzezinski <[email protected]>
Hmmm. Why isn't the merge queue working? |
I think that Merge Queue is unhappy because the integration tests aren't running on the PR. But we intentionally don't want to run the integration tests on the PR, because we want to avoid hitting rate limits. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #477 +/- ##
===========================================
- Coverage 100.00% 99.49% -0.51%
===========================================
Files 12 12
Lines 394 398 +4
===========================================
+ Hits 394 396 +2
- Misses 0 2 +2 ☔ View full report in Codecov by Sentry. |
I have unchecked the "Only merge non-failing pull requests" option in the merge queue settings. |
I think we basically just need to make sure that none of the required status checks are stuck at pending (yellow) on a PR. The easiest way to do that is to just fail those checks on PRs, which is what I've done here. Because I've unchecked the "Only merge non-failing pull requests" option, those PR failures should not prevent us from adding a PR to the merge queue, at which point those same status checks will pass on the |
Looking at https://github.com/orgs/community/discussions/46757#discussion-4836009 and https://theunixzoo.co.uk/blog/2023-11-16-migrating-to-gh-merge-queues.html I think we do need a workaround here. But I think we should pass the checks on PRs rather than failing them, and require all checks pass |
My concern is that if we mark the integration tests as passed (green) on PRs, then I might look at a PR and mistakenly think to myself that the integration tests have run and passed, which would not be correct. At least with the red X, it's clear that the integration tests did not run and pass. Maybe I can mark the integration tests as "skipped" on PRs. I'll try that out. |
following the links there leads to https://github.com/imjohnbo/ok-to-test as well |
Codecov is the only problem here, right? I think we should just get unit test coverage to 100%, and then use GitHub Merge Queue. Or, alternatively, self-host our own instance of Bors. |
It looks like it's only like 3 lines uncovered by the unit tests, right? |
Chasing down 100% coverage via mocking seems like a slog though :( |
Alright, I have it down to only 2 uncovered lines (that are uncovered by the unit tests but covered by the integration tests). But I'm not sure how to write a unit test to cover those two lines, even with mocking. I think, for the short-term, let's just revert to the original We can maybe create a "developer docs" markdown page in the repo, and in that page, document that it's okay if Codecov shows up as 99% (and thus ❌) on a PR, because it will become 100% once the PR is added to the merge queue and integration tests run. |
|
|
Why is this not merging? I unchecked the "only merge passing PRs" option in the branch protection settings. |
are codecov checks required? maybe for required checks they must all be passing, or something like that |
That's really annoying if true. What, then, is the point of being able to uncheck the "only merge passing PRs" checkbox? |
I'm going to throw my hands up in defeat for now, and just lower the threshold to 99% (which is what the unit tests hit). |
Alright, the threshold for |
It looks like the public Bors instance has been shut down, so we are forced to migrate to GitHub Merge Queue instead.