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

Use GitHub Merge Queues instead of Bors #7824

Closed
james7132 opened this issue Feb 26, 2023 · 5 comments
Closed

Use GitHub Merge Queues instead of Bors #7824

james7132 opened this issue Feb 26, 2023 · 5 comments
Labels
A-Meta About the project itself C-Enhancement A new feature S-Blocked This cannot move forward until something else changes
Milestone

Comments

@james7132
Copy link
Member

What problem does this solve or what need does it fill?

GitHub now supports Merge Queues, which is what bors has been doing for us for the longest time.

What solution would you like?

Migrate to GitHub's merge queue instead of relying on Bors.

What alternative(s) have you considered?

Keep using Bors.

@james7132 james7132 added C-Enhancement A new feature A-Meta About the project itself labels Feb 26, 2023
@james7132
Copy link
Member Author

We probably should wait until 0.10 releases before we attempt this.

@james7132 james7132 added this to the 0.11 milestone Feb 26, 2023
@james7132 james7132 added the S-Blocked This cannot move forward until something else changes label Feb 26, 2023
@superdump
Copy link
Contributor

What benefits/drawbacks are there of changing to GitHub/continuing with bors?

@james7132
Copy link
Member Author

james7132 commented Feb 27, 2023

AFAIK, GitHub's are publicly viewable and each attempt is public information, unlike bors where the permissions to view the queue are also the same that allows use of bors r+. It also minimizes the attack surface in the case bors is compromised for whatever reason. Not sure if there are Actions triggers for each queue attempt, but if there are, we can have tighter control and integration with our existing CI actions.

It does, however, increase our dependence on GitHub as a platform, and we'd need to find a suitable replacement if we ever move away from GitHub for whatever reason. However, given that our Q&A is in Discussions and our extensive CI use is entirely built on GitHub Actions, I think it's probably OK to switch.

Also we won't see the [Merged by Bors] edits on PR titles, and PRs will get "merged" status instead of "closed". This really only has an impact on PR search, the visuals on the site, and the occasional achievement on the site. Not super important, or critical to the project, but probably worth mentioning. When they rolled out, I've saw some complaints that contributors haven't been getting "PRs merged" achievements because of bors. 🤣

@charleskawczynski
Copy link

Hello 👋🏻 ,

My team over at CliMA is interested in switching from bors to the GitHub merge queue (GHMQ), however, it seems that GHMQ requires at least two serially run CI cycles before merging. Our CI is a bit long (~1 hr) and doubling the time is painful.

I wanted to know, have you run into this issue as well?

@mockersf
Copy link
Member

Hi @charleskawczynski!

Yup, same for us. The merge queue uses branch protection rules, so it means the same jobs must pass once on the PR, and once in the merge queue.

We improved by:

  • parallelising as much as possible our jobs, to get fast feedbacks on a PR. If I remember correctly, with our current parallelisation GitHub actions can run on two PRs at a time, after that we reach the maximum number of free executors. It's a choice between faster feedback on an individual PR, or faster start on a group of PR
  • splitting our checks in two groups. One that must pass on every update, on that must pass only on the merge queue. The second group is made of jobs that are less likely to fail if the first one pass and may take longer, but we still want to have their status

The first group, in https://github.com/bevyengine/bevy/blob/main/.github/workflows/ci.yml, takes around 15 minutes to run, but would take 1 hour if all were done sequentially, see here for example run.
The second group, in https://github.com/bevyengine/bevy/blob/main/.github/workflows/validation-jobs.yml (see this line to have it not run on PR update), takes 20 minutes to run, but would take 65 minutes to run sequentially. here is an example run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Meta About the project itself C-Enhancement A new feature S-Blocked This cannot move forward until something else changes
Projects
None yet
Development

No branches or pull requests

5 participants