Skip to content

Conversation

@Sakib25800
Copy link
Member

This PR adds the rollup logic. You can select certain PRs and then create a rollup.

I did not add the "create a similar PR" text in the rollup PR description as I'm not sure it's used - I can add that in another PR if needed.

The rollup logic works very similarly to homu's.

@fmease
Copy link
Member

fmease commented Nov 13, 2025

I did not add the "create a similar PR" text in the rollup PR description as I'm not sure it's used

I've used it very often. It's super helpful for creating a new rollup based on a failed one where you've kicked out a single PR. I'm pretty sure everyone who does rollups uses it all the time. You don't want to manually reassemble the failed rollup -1 bad PR (+N new ones) when there are like 30+ PRs in the queue.

Now, I've heard that this bors impl will have other tricks up its sleeve eventually esp. for creating multiple rollups at once / staggered, so maybe such a link will indeed be made obsolete via some other functionality / mechanism.

@Kobzol
Copy link
Member

Kobzol commented Nov 13, 2025

I did not add the "create a similar PR" text in the rollup PR description as I'm not sure it's used - I can add that in another PR if needed.

I think that button is indeed quite useful. However, we don't need to implement it in this PR, it can be follow-up work.

Copy link
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

This looks awesome, thank you so much! I went through it and left a bunch of comments.

Apart from the comments, it would be great to have tests for this (doesn't need to be in this PR, let's do it in a follow-up). I'm imagining something like this:

  1. The test context will gain a new method, something like .rollup(<list-of-prs>) (we can just hardcode the default repo name inside of it).
  2. The method will post a request to the /oauth/callback endpoint
  3. We will have to mock any GitHub requests done by the rollup handler.
  4. We wait for the rollup to be done (should be enough to wait for the OAuth callback HTTP request finishing) and then assert that the rollup PR was created.


// Merge each PR's commits into the rollup branch
for pr in rollup_prs {
let pr_github = gh_client
Copy link
Member

Choose a reason for hiding this comment

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

Loading the PRs can take some times, as it's up to e.g. 20 roundtrips to GitHub. As a follow-up, it would be great to do some mini-benchmark to see how long it takes to load e.g. 20 PRs sequentially, vs creating e.g. FuturesUnordered or something that can buffer futures and load e.g. 5 PRs at a time, to make this faster, as it can be trivially parallelized.

@Sakib25800 Sakib25800 mentioned this pull request Nov 18, 2025
14 tasks
Copy link
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

Changes look great so far! :)

@Kobzol
Copy link
Member

Kobzol commented Nov 18, 2025

Thank you! The PR needs a rebase, and maybe a squash (17 commits is a bit too much), but other than that I think I'm ok with merging! We can take a look at parallelizing the PR fetch later. Awesome job! ❤️

@Sakib25800 Sakib25800 force-pushed the rollup-logic branch 2 times, most recently from 9aaa11d to eb407b8 Compare November 19, 2025 10:16
Copy link
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

Thank you!

@Kobzol Kobzol added this pull request to the merge queue Nov 19, 2025
Merged via the queue into rust-lang:main with commit d7fc9fe Nov 19, 2025
2 checks passed
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.

3 participants