Skip to content

Commit cde4543

Browse files
Merge pull request #570 from ehuss/beta-milestone
Update beta backport process.
2 parents 5d6ea59 + f95669e commit cde4543

File tree

1 file changed

+43
-30
lines changed

1 file changed

+43
-30
lines changed

src/release/backporting.md

Lines changed: 43 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,49 @@ Only a few people are even aware of the process, but this is actually something
55

66
## Beta backporting in `rust-lang/rust`
77

8-
When somebody identifies a PR that should be backported to beta they tag it
9-
[`beta-nominated`](https://github.com/rust-lang/rust/pulls?q=is%3Apr+is%3Aclosed+label%3Abeta-nominated).
10-
That means they want one of the teams to evaluate whether the patch should be
11-
backported. Also consider applying the `T-*` tag for a specific team, and the
12-
`I-*-nominated` tag for that team; that'll _really_ get their attention.
13-
Anybody with triage access is free to make these tags. Backports are mostly
14-
done to fix regressions. If the team thinks it should be backported they'll
15-
then additionally tag it
16-
[`beta-accepted`](https://github.com/rust-lang/rust/pulls?q=is%3Apr+is%3Aclosed+label%3Abeta-accepted).
17-
18-
At that point the PR is ready to be backported. So the list of patches ready for
19-
a backport is those tagged
20-
[both `beta-nominated` and `beta-accepted`](https://github.com/rust-lang/rust/pulls?q=is%3Apr+label%3Abeta-accepted+is%3Aclosed+label%3Abeta-nominated).
21-
22-
So now somebody needs to go through those PR's and cherry-pick their commits to
23-
the beta branch. Those cherry-picks are then submitted as a PR _against the
24-
beta branch_, with a title started with `[beta]` (so reviewers can see its
25-
specialness). The OP of that PR should contain links to all the PRs being
26-
backported. [Here's an example](https://github.com/rust-lang/rust/pull/64097).
27-
Anybody can make these PRs!
28-
29-
After that a reviewer needs to verify that the backport looks correct, that it's
30-
submitted to the beta branch, and then approve via `@bors: r+`. Finally, they
31-
need to follow the links to the original PRs and _remove the `beta-nominated`
32-
tag_ (people forget to do this a lot). This last step indicates that the
33-
backport has been completed, so the `beta-nominated` and `beta-accepted` tags
34-
have three states.
35-
36-
If, on the other hand, a backport is declined the `beta-nominated` label is
37-
removed, closing the procedure.
8+
Backports of PRs to the beta branch are usually only done to fix regressions.
9+
Getting a PR backported to the beta branch involves the following process:
10+
11+
1. Add the label [`beta-nominated`](https://github.com/rust-lang/rust/pulls?q=is%3Apr+label%3Abeta-nominated+-label%3Abeta-accepted) to the PR to be backported.
12+
This marks the PR as in the state that it needs attention from the appropriate team to decide if it should be backported.
13+
Anybody with triage access is free to add this label.
14+
15+
2. If the team thinks it should be backported, then they should add the [`beta-accepted`](https://github.com/rust-lang/rust/pulls?q=is%3Apr+label%3Abeta-accepted) label.
16+
Otherwise they should remove the nominated label.
17+
18+
3. Occasionally someone will make a beta rollup PR.
19+
This is often done by the release team, but it can be done by anyone.
20+
The process here is:
21+
22+
1. Create a local branch off the `beta` branch.
23+
2. Cherry-pick all of the PRs that have both [`beta-nominated` and `beta-accepted`][nominated-plus-accepted] labels.
24+
It is usually preferred to not include PRs that have not been merged in case there are any last minute changes, or it fails when running the full CI tests.
25+
3. (Recommended) Run some tests locally.
26+
It is not uncommon that the backports may not apply cleanly, or the UI tests need to be re-blessed if there are differences in the output.
27+
4. Open a PR **against the beta branch** with a title that starts with `[beta]` (so reviewers can see its specialness).
28+
5. List all of the PRs being backported in the PR description.
29+
[Here's an example](https://github.com/rust-lang/rust/pull/64097).
30+
6. Go through all of the PRs being backported and:
31+
32+
* Change the milestone to the correct value for the beta release.
33+
* Remove the `beta-nominated` label.
34+
This indicates that the backport has been completed.
35+
36+
If there are a lot of PRs, this can be done quickly by opening the [nominated + accepted][nominated-plus-accepted] query, check all the PRs being backported, and use the "Milestones" and "Label" drop-downs to modify multiple PRs in bulk.
37+
38+
This last step can be done before or after the beta PR has been merged, though it can be easy to forget if you wait for it to be merged.
39+
40+
4. A reviewer (typically from the release team) needs to verify that the backport looks correct and that it's submitted to the beta branch.
41+
They will then approve with `@bors r+ rollup=never` (to avoid it being rolled up on accident).
42+
If the author of the PR has r+ rights, and has not made significant changes while backporting, they can also self-approve the PR.
43+
44+
45+
In summary, there are three states that a PR can go through:
46+
1. `beta-nominated`: Needs the team's attention.
47+
2. `beta-nominated` + `beta-accepted`: Waiting to be backported.
48+
3. `beta-accepted`: Backport complete.
49+
50+
[nominated-plus-accepted]: https://github.com/rust-lang/rust/pulls?q=is%3Apr+is%3Aclosed+label%3Abeta-accepted+label%3Abeta-nominated
3851

3952
## Stable backporting in `rust-lang/rust`
4053

0 commit comments

Comments
 (0)