-
Couldn't load subscription status.
- Fork 215
update Rollups process #775
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?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,15 +3,15 @@ | |||||
| ## Background | ||||||
|
|
||||||
| The Rust project has a policy that every pull request must be tested after merge | ||||||
| before it can be pushed to master. As PR volume increases this can scale poorly, | ||||||
| before it can be pushed to master. As PR volume increases, this can scale poorly, | ||||||
| especially given the long (~3.5hr) current CI duration for Rust. | ||||||
|
|
||||||
| Enter rollups! Changes that are small, not performance sensitive, or not platform | ||||||
| dependent are marked with the `rollup` command to bors (`@bors r+ rollup` to | ||||||
| approve a PR and mark as a rollup, `@bors rollup` to mark a previously approved | ||||||
| approve a PR and mark it as a rollup, `@bors rollup` to mark a previously approved | ||||||
| PR, `@bors rollup-` to un-mark as a rollup). 'Performing a Rollup' then means | ||||||
| collecting these changes into one PR and merging them all at once. The rollup | ||||||
| command accepts four values `always`, `maybe`, `iffy`, and `never`. See [the | ||||||
| command accepts four values: `always`, `maybe`, `iffy`, and `never`. See [the | ||||||
| Rollups section] of the review policies for guidance on what these different | ||||||
| statuses mean. | ||||||
|
|
||||||
|
|
@@ -23,67 +23,99 @@ queue has been merged. | |||||
| ## Making a Rollup | ||||||
|
|
||||||
| 1. Using the interface on [Homu queue], select pull requests and then | ||||||
| use "rollup" button to make a rollup pull request. (The text about | ||||||
| fairness can be ignored.) | ||||||
| use "rollup" button to make a rollup pull request. | ||||||
|
|
||||||
| **Important note**: consider for addition PRs marked as | ||||||
| `rollup=always`, `rollup=maybe` and `rollup=iffy`, based on the | ||||||
| review policies of [the Rollups section]. Be extra careful when | ||||||
| deciding what to include, in particular on `rollup=maybe` and | ||||||
| `rollup=iffy` PRs. We should try as much as possible to avoid risking | ||||||
| and hit regressions (bugs or perf). Also consider that contributors | ||||||
| to hit regressions (bugs or perf). Also consider that contributors | ||||||
| often forget to tag things with rollup=never, when they should have | ||||||
| done so, so when PRs are not explicitly tagged with rollup, be extra | ||||||
| careful. | ||||||
| careful. Also carefully consider the area of the compiler the PRs touch. | ||||||
| Two diagnostic PRs may actually conflict with each other, as they both | ||||||
| change compiler output, which causes failures in each other's tests, | ||||||
| when both of them are merged together in a rollup without causing git merge-conflicts. | ||||||
| In this case the older PR should be given the privilege to merge first | ||||||
| and the newer PR should then be rebased as needed. | ||||||
|
|
||||||
| 2. Run the following command in the pull request thread: | ||||||
|
|
||||||
| ``` | ||||||
| @bors r+ rollup=never p=5 | ||||||
| ```` | ||||||
|
|
||||||
| where 5 is the number of PRs contained in your rollup. | ||||||
| 3. If the rollup fails, use the logs rust-log-analyzer | ||||||
| provides to bisect the failure to a specific PR and do | ||||||
| `@bors r-`. If the PR is running, you need to do `@bors r- retry`. Otherwise, | ||||||
| provides to bisect the failure to a specific PR and | ||||||
| `@bors r-` the PR. If the PR is running, you need to do `@bors r- retry`. Otherwise, | ||||||
| your rollup succeeded. If it did, proceed to the next rollup (every now and | ||||||
| then let `rollup=never` and toolstate PRs progress). | ||||||
| 4. Recreate the rollup without the offending PR starting again from **1.**. There's a link in the rollup PR's body to automatically prefill the rollup UI with the existing PRs (minus any PRs that have been `r-`d) | ||||||
| then let `rollup=never/iffy` and toolstate PRs progress). | ||||||
| 4. Recreate the rollup without the offending PR starting again from **1.**. | ||||||
| There's a link in the rollup PR's body to automatically prefill the rollup UI | ||||||
| with the existing PRs (minus any PRs that have been `r-`d) | ||||||
| Try avoiding adding any additional PR to the current "batch" as this | ||||||
| unnecessarily increases the chance of test failures. | ||||||
| Rollups should not overlap, if a PR is already contained in a rollup that is not closed, | ||||||
| it should not be added to another different rollup at the same time. | ||||||
| If a rollup fails and you are not sure which PR caused the problem, | ||||||
| you may bisect the rollup and split it up into two rollups until the offending PR becomes clear. | ||||||
|
|
||||||
| ## Selecting Pull Requests | ||||||
|
|
||||||
| The queue is sorted by rollup status. In general, a good rollup includes one or two `iffy` PRs (if available), a bunch of `maybe` (unmarked) PRs, and a large pile of `always` PRs. A rollup should never include `rollup=never` PRs. | ||||||
| The queue is sorted by rollup status. In general, a good rollup contains a bunch of `maybe` (unmarked) PRs, and a large pile of `always` PRs. You can include one or two `iffy` PRs if you are confident that they will pass. | ||||||
|
||||||
| If you have a lot of time, you can also make a rollup just from `iffy` PRs (if there are enough of them) and weed out the failures one by one. | ||||||
| A rollup should never include `rollup=never` PRs. | ||||||
|
|
||||||
| The actual absolute size of the rollup can depend based on experience and current length of the queue. | ||||||
| People new to making rollups might start with including 1 `iffy`, 2 `maybe`s, and 4 `always`s. Usually 6-8 PRs per rollup is a good compromise. | ||||||
| There is rarely a need to roll up more than 10 PRs at once (unless there are >30 PRs waiting the queue), keep in mind that we also try to minimize regressions per merge. | ||||||
|
|
||||||
| The actual absolute size of the rollup can depend based on experience, people new to making rollups might start with including 1 `iffy`, 4 `maybe`s, and 5 `always`s, but more experienced people might even make a rollup of 1-2 `iffy`s, 8 `maybe`s, and 10 `always`s! Massive rollups are rarely needed, but as your intuition grows you'll get better at judging risk when including PRs in a rollup. | ||||||
| Don't try to make mega-rollups (15-20 PRs that merge half or more of the entire queue all at once) to keep the number of perf or bug regressions per merge as low as possible and keep potential regressions [bisectable]. | ||||||
|
||||||
| Don't try to make mega-rollups (15-20 PRs that merge half or more of the entire queue all at once) to keep the number of perf or bug regressions per merge as low as possible and keep potential regressions [bisectable]. | |
| Limit the size of rollups, even if the queue is backed up -- large rollups run the risk of failing or merge conflicts, and smaller rollups keep potential regressions [bisectable]. On average, rollups are <N> PRs large, often varying from <N - M> to <N + M> depending on the number of `rollup=always` PRs that can be included. |
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.
choose some value for N and M.
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.
note that thanks to unrolled builds, bisection can be done within a roll-up and cargo bisect rustc does that
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.
note that thanks to unrolled builds, bisection can be done within a roll-up and cargo bisect rustc does that
But I think there is some time limit for rollup artifacts right? Something like 6 months?
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.
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.
Adopted this wording. I picked ~7 as the average size, with a usual bound of [5, 10] PRs.
Limit the size of rollups, even if the queue is backed up. Large rollups run the risk of failing
or merge conflicts, and smaller rollups keep potential regressions [bisectable]. On average, rollups
are 7 PRs large, often varying from 5 to 10 depending on the number ofrollup=alwaysPRs that can
be included.
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.
I have been thinking that what the existing documentation says (rollups always p=5) might be better than p=pr_count that is usually done. There are a lot of cases where 7 PRs get rolled up with p=7 and sit in the queue for a number of hours, only to be leapfrogged by a p=8 rollup that contains much newer PRs. Seems to have a tendency to break FIFO.
Uh oh!
There was an error while loading. Please reload this page.
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.
Yes that's why I added the "Rollups should not overlap" rule.
Uh oh!
There was an error while loading. Please reload this page.
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.
we can just ping the contributors who are assigning rollup p>5 (I've done this a couple of times myself) and just point them to p=5 being the good default and having that respect queue order. It helps to elaborate on the reasoning for choice of p=5 and not arbitrary p=N where N is the number of PRs rolled up.
If we update the docs here and then still notice contributors assigning p > 5 to rollups, we can just ping them and point them to the update docs here.
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.
(Thanks for the edits)
Just wanted to say, we should make these rollup advice as accessible and useful to onboard other contributors w/ r+ perms who may want to help to do rollups too.
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.
(Somewhat unrelated, but also I feel like the
p=???advice is at times too vague to be useful, at least when I read some of the forge docs related top=???advice)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.
Yeah, I feel like the tool/subtree updates should receive same priority as rollups and all pinned at
p=5exactly, good point.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.
mmh imo it makes sense to prioritise subtree/module updates over rollups since doing a tool sync is often more complicated than rebasing PRs
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.
Just, they should receive a consistent
pbetween themselves, but otherwise it feels whatever to me.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.
Adjusted this to say sth like
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.
I'm not sure anymore if there is an easy way to generalize 😅
some subtrees are mostly self-contained and risk free to rollup, other (like clippy) are prone to creating merge conflicts and changes in tests, some, like cargo may also have test failures which the pre merge ci cannot catch.
some subtrees are always rollup=never'd by the author so they cannot be rolled up