Skip to content

Commit 495a5b2

Browse files
authored
Add some guidance on rollups and priorities. (#402)
* Add some guidance on rollups and priorities. * Update for comments from manishearth. * Clarify relationship of maybe and iffy. * Update link to rollups section. * Clarify rollup=maybe default. * Remove "pure refactoring" from rollup guidance.
1 parent 5ed42a1 commit 495a5b2

File tree

3 files changed

+78
-13
lines changed

3 files changed

+78
-13
lines changed

src/compiler/reviews.md

Lines changed: 72 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Every PR that lands in the compiler and its associated crates must be
44
reviewed by at least one person who is knowledgeable with the code in
5-
question.
5+
question.
66

77
When a PR is opened, you can request a reviewer by including `r?
88
@username` in the PR description. If you don't do so, the highfive bot
@@ -27,11 +27,76 @@ delegate+` or `@bors delegate=username`. This will allow the PR author
2727
to approve the PR by issuing `@bors` commands like the ones above
2828
(but this privilege is limited to the single PR).
2929

30-
## High priority issues
30+
## Rollups
3131

32-
When merging high priority issues (`P-critical` and `P-high`) it's
33-
recommended to avoid rollups and bump a bit the priority of the PR in
34-
the homu queue by issuing `@bors r+ rollup=never p=1`.
32+
All reviewers are strongly encouraged to explicitly mark a PR as to whether or
33+
not it should be part of a [rollup] with one of the following:
34+
35+
- `rollup=always`: These PRs are very unlikely to break tests or have performance
36+
implications. Example scenarios:
37+
- Changes are limited to documentation, comments, etc. that is highly
38+
unlikely to fail a build.
39+
- Changes cannot have performance implications.
40+
- Your PR is not landing possibly-breaking or behavior altering changes.
41+
- Feature stabilization without other changes is likely fine to
42+
rollup, though.
43+
- `rollup=maybe`: This is the **default** if you do not specify a rollup
44+
status. Use this if you don't have much confidence that it won't break
45+
tests. This can be used if you aren't sure if it should be one of the other
46+
categories. Since this is the default, there is usually no need to
47+
explicitly specify this, unless you are un-marking the rollup level from a
48+
previous command.
49+
- `rollup=iffy`: Use this for mildly risky PRs (more risky than "maybe").
50+
Example scenarios:
51+
- The PR is large and non-additive (note: adding 2000 lines of completely
52+
new tests is fine to rollup).
53+
- Messes too much with:
54+
- LLVM or code generation
55+
- bootstrap or the build system
56+
- build-manifest
57+
- Has platform-specific changes that are not checked by the normal PR checks.
58+
- May be affected by MIR migrate mode.
59+
- `rollup=never`: This should *never* be included in a rollup (**please**
60+
include a comment explaining why you have chosen this). Example scenarios:
61+
- May have performance implications.
62+
- May cause unclear regressions (we would likely want to bisect to this PR
63+
specifically, as it would be hard to identify as the cause from a
64+
rollup).
65+
- Has a high chance of failure.
66+
- Is otherwise dangerous to rollup.
67+
68+
> **Note**:\
69+
> `@bors rollup` is equivalent to `@bors rollup=always`\
70+
> `@bors rollup-` is equivalent to `@bors rollup=never`
71+
72+
## Priority
73+
74+
Reviewers are encouraged to set one of the rollup statuses listed above
75+
instead of setting priority. Bors automatically sorts based on the rollup
76+
status (never is the highest priority, always is the lowest), and also by PR
77+
age. If you do change the priority, please use your best judgment to balance
78+
fairness with other PRs.
79+
80+
The following is some guidance for setting priorities:
81+
82+
- 1-5
83+
- P-high issue fixes
84+
- Toolstate fixes
85+
- Beta-nominated PRs
86+
- Submodule updates
87+
- 5+
88+
- P-critical issue fixes
89+
- 10+
90+
- Bitrot-prone PRs (particularly very large ones that touch many files)
91+
- Urgent PRs
92+
- Beta backports
93+
- 20+
94+
- High priority that needs to jump ahead of any rollups
95+
- Fixes or changes something that has a high risk of being re-broken by
96+
another PR in the queue.
97+
- 1000
98+
- Absolutely critical fixes
99+
- Release promotions
35100

36101
## Expectations for r+
37102

@@ -46,3 +111,5 @@ done the review, and the code has not changed substantially since the
46111
review was done. Rebasing is fine, but changes in functionality
47112
typically require re-review (though it's a good idea to try and
48113
highlight what has changed, to help the reviewer).
114+
115+
[rollup]: ../release/rollups.md

src/libs/maintaining-std.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ PRs to [`rust-lang/rust`] aren’t merged manually using GitHub’s UI or by pus
217217

218218
For Libs PRs, rolling up is usually fine, in particular if it's only a new unstable addition or if it only touches docs (with the exception of intra doc links which complicates things while the feature has bugs...).
219219

220-
If a submodule is affected then probably don't `rollup`. If the feature affects perf then also avoid `rollup` -- mark it as `rollup=never`.
220+
See the [rollup guidelines] for more details on when to rollup.
221221

222222
### When there’s new public items
223223

@@ -263,3 +263,4 @@ Where `unsafe` and `const` is involved, e.g., for operations which are "unconst"
263263
[Everyone Poops]: http://cglab.ca/~abeinges/blah/everyone-poops
264264
[rust/pull/46799]: https://github.com/rust-lang/rust/pull/46799
265265
[hashbrown/pull/119]: https://github.com/rust-lang/hashbrown/pull/119
266+
[rollup guidelines]: ../compiler/reviews.md#rollups

src/release/rollups.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,9 @@ dependent are marked with the `rollup` command to bors (`@bors r+ rollup` to
1111
approve a PR and mark as a rollup, `@bors rollup` to mark a previously approved
1212
PR, `@bors rollup-` to un-mark as a rollup). 'Performing a Rollup' then means
1313
collecting these changes into one PR and merging them all at once. The rollup
14-
command accepts three values `always`, `maybe`, and `never`. `@bors rollup` is
15-
equivalent to `rollup=always` (which will indicate that a PR should always be
16-
included in a rollup), and `@bors rollup-` is equivalent to `@bors rollup=maybe`
17-
which is used to indicate that someone should try rollup the PR. `rollup=never`
18-
indicates that a PR should never be included in a rollup, this should generally
19-
only be used for PRs which are large additions or changes which could cause
20-
breakage or large perf changes.
14+
command accepts four values `always`, `maybe`, `iffy`, and `never`. See [the
15+
Rollups section] of the review policies for guidance on what these different
16+
statuses mean.
2117

2218
You can see the list of rollup PRs on Rust's [Homu queue], they are
2319
listed at the bottom of the 'approved' queue with a priority of 'rollup' meaning
@@ -78,3 +74,4 @@ If a rollup continues to fail you can run the `@bors rollup=never` command to
7874
never rollup the PR in question.
7975
8076
[Homu queue]: https://buildbot2.rust-lang.org/homu/queue/rust
77+
[the Rollups section]: ../compiler/reviews.md#rollups

0 commit comments

Comments
 (0)