Over the past few weeks @barosl has performed an awesome rewrite of bors called homu and it’s had some pretty good traction for the cargo repository. I plan on now unleashing homu onto the rust-lang/rust repository itself soon, but I wanted to give everyone a heads up as there are indeed some “breaking changes”.
Why rewrite bors?
The architecture of the old bors script was to run periodically as a cron job. Each time it ran bors would poll the state of the world and then move the world forward one step at a time. While certainly a simple idea (and it sure took us far!) this had some downsides:
- Bors gets slower as the queue gets larger. Because bors has to poll ever PR, the runtime is linear with respect to the number of open PRs, which means that bors is slowest when we need him most and we’re often hitting the github API rate limits.
- Transitions between PRs take quite a long time. Due to the rate limiting in the bullet above bors was run only once every 10 minutes. To transition PRs bors had to (1) discover tests passed, (2) merge the PR, and finally (3) find the next PR to merge. This meant that transitions between PRs could take up to 30 minutes!
Altogether, we found that the architecture of bors was too limiting, and enter homu!
How is homu different?
The primary change between bors and homu is that homu is event driven through the github webook API and the buildbot HTTP push API. Homu is not a cron job but rather a long-running server which isn’t intended to be shut down that frequently. It works by receiving status updates from github and buildbot as soon as they happen allowing for homu to make transitions near-instantaneously!
By using these push APIs from github and buildbot homu is able to not slow down as the queue gets larger and continue to move everything along efficiently.
The old bors status page will no longer be updated, and the new homu status page will be the “one true interface” to the PR queue of Rust. Note that currently homu is not enabled for Rust, only for Cargo (homu supports multiple repos!).
Additionally, the method of approving a PR is changing. The old method of “r+ on the commit in $user/rust” unfortunately doesn’t work for homu as there’s no way to receive push notifications about commits in external repositories. Instead, homu requires the comments
@bors: r+ $SHA to be written on the PR itself. All “commands” to bors need to be prefixed with
@bors, and other commands include
r-, etc. When the transition is made I will transfer all pending
r+ comments from commit comments to the PR itself to ensure that nothing is lost.
- New status page: http://buildbot.rust-lang.org/homu/
@bors: r+ $SHAto approve on the PR
@bors: rollupto flag for a rollup
@bors: retryto retry a PR
Currently homu is only enabled for the Cargo repository, not for Rust. I plan on enabling homu for Rust over the weekend (and shutting off the bors cron job), and I will make a post to this thread when I have done so.