Skip to content

Commit b3ac160

Browse files
pietroalbiniMark-Simulacrum
authored andcommitted
update release process
1 parent f420591 commit b3ac160

File tree

1 file changed

+92
-84
lines changed

1 file changed

+92
-84
lines changed

src/release/process.md

Lines changed: 92 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
Here's how Rust is currently released:
44

5-
## Bump the stable version number (T-6 days, Friday the week before)
5+
## Bump the stable version number (Friday the week before)
66

77
Open a PR bumping the version number in `src/version`. `r+ rollup=never` this
8-
PR.
8+
PR (self-approve it).
99

1010
Mark it as `rollup=never`, because if it lands in a rollup as *not* the first
1111
PR then other pull requests in that rollup will be incorrectly associated with
@@ -14,56 +14,87 @@ the prior release.
1414
This is effectively when the beta branch forks -- when beta is promoted, it will
1515
be based off of the PR that landed just before this version number bump PR.
1616

17-
## Promote branches (T-3 days, Monday)
17+
## Promote branches (Monday)
1818

1919
Both promotions should happen on Monday. You can open both PRs at the same
20-
time, but make sure the stable promotion lands first.
20+
time, but prioritize landing the stable promotion first (to maximize the
21+
pre-release testing period).
2122

22-
### Beta to stable
23+
### Updating the base of the `beta` and `stable` branches
2324

24-
[Obtain AWS CLI credentials][awscli] and run this command from the [simpleinfra] repository:
25+
Run this command from the [rust-lang/release-team] repository[^auth]:
2526

2627
```
27-
./release-scripts/promote-release.py branches
28+
./scripts/start-release.py update-rust-branches
2829
```
2930

30-
Once that's done, send a PR to the freshly created beta branch of rust-lang/rust
31-
with two commits:
31+
Remember that `start-release.py` starts a job in the background, and the script
32+
will exit *before* the branches are updated. Watch the logs to see when the
33+
background job finishes before proceeding.
3234

33-
* The changes caused by running `./x.py run replace-version-placeholder`
34-
* An update of `src/ci/channel` to `beta`
35+
### `stable` PR
3536

36-
The version placeholder replacement changes must be in a separate commit so
37-
that they can be cherry picked to the master branch.
38-
39-
Also send a PR to rust-lang/rust targeting the new stable branch making the
37+
Send a PR to [rust-lang/rust] targeting the new `stable` branch making the
4038
following changes:
4139

42-
- Update `src/ci/channel` to `stable`
43-
- Update release notes to the latest available copy
44-
* e.g., `git checkout origin/master -- RELEASES.md`
40+
- Update release notes to the latest available copy:
41+
42+
- If the release notes PR was merged:
43+
44+
```
45+
git checkout origin/master -- RELEASES.md
46+
```
47+
48+
- Otherwise, manually copy `RELEASES.md` from the pending release notes PR
49+
50+
- Update `src/ci/channel` to `stable`:
51+
52+
```
53+
git checkout origin/master -- RELEASES.md
54+
```
55+
56+
Self-approve the PR with `r+ rollup=never p=1000`.
57+
58+
### `beta` PR
4559
46-
Once the PRs are sent, r+ both and give them a high `p=1000` (for stable) and
47-
`p=10` for beta.
60+
Send a PR to [rust-lang/rust] targeting the new `beta` branch with these
61+
changes:
4862
49-
After the PR is merged you'll need to start a **dev** release. [Obtain AWS CLI
50-
credentials][awscli] and run this command from the [simpleinfra] repository:
63+
* Run this command and create a **separate commit** with just its output:
64+
65+
```
66+
./x.py run replace-version-placeholder
67+
```
68+
69+
* Update `src/ci/channel` to `beta`
70+
71+
Self-approve the PR with `r+ rollup=never p=10`.
72+
73+
### Publish the pre-release on the `dev-static` environment
74+
75+
After the `stable` PR is merged you'll need to start the pre-release. Run this command from the
76+
[rust-lang/release-team] repository[^auth]:
5177
5278
```
53-
# The date here is of the actual, production, stable release. Used for the blog post.
54-
./release-scripts/promote-release.py release dev stable --release-date YYYY-MM-DD
79+
./scripts/start-release.py publish-rust-dev-stable YYYY-MM-DD
5580
```
5681
57-
## Master bootstrap update (T-2 day, Tuesday)
82+
You need to replace `YYYY-MM-DD` with the date of the release (Thursday).
83+
84+
## Master bootstrap update (Tuesday)
5885
5986
Send a PR to the master branch to:
6087
61-
- Cherry pick the commit that ran `./x.py run replace-version-placeholder`
88+
- Cherry pick the commit that ran `replace-version-placeholder`
6289
from the now merged beta branch PR. Do not re-run the tool as there might
6390
have been other stabilizations on master which were not included in the
6491
branched beta, so may not be attributed to the current release.
65-
- Run `./x.py run src/tools/bump-stage0` to update the bootstrap compiler to
66-
the beta you created yesterday.
92+
93+
- Run this to update the bootstrap compiler to the beta you created yesterday:
94+
95+
```
96+
./x.py run src/tools/bump-stage0
97+
```
6798
6899
- Remove references to the `bootstrap` and `not(bootstrap)` conditional
69100
compilation attributes. You can find all of them by installing [ripgrep] and
@@ -84,78 +115,55 @@ Send a PR to the master branch to:
84115
85116
## Release day (Thursday)
86117
87-
Decide on a time to do the release, T.
88-
89-
- **T-50m** - Run the following command in a shell with [AWS
90-
credentials][awscli] in the [simpleinfra] repository:
91-
92-
```
93-
./release-scripts/promote-release.py release prod stable
94-
```
95-
96-
That'll, in the background, schedule the `promote-release` binary to run on
97-
the production secrets (not the dev secrets). That'll sign everything, upload
98-
it, update the html index pages, and invalidate the CDN. Note that this takes
99-
about 30 minutes right now. This will also push a signed tag to rust-lang/rust.
118+
Decide on a time to do the release. Let Mara know of the time, so that she can
119+
be ready to post the release on the project's social media channels.
100120
101-
- **T-2m** - Merge blog post.
121+
As of September 2024 a release takes between 75 and 90 minutes to complete, so
122+
start the release process earlier enough to hit the time you planned.
102123
103-
- **T** - Tweet and post everything!
124+
To start the release, Run this command in the [rust-lang/release-team]
125+
repository[^auth]:
104126
105-
- Twitter [@rustlang](https://twitter.com/rustlang)
106-
- [Users forum](https://users.rust-lang.org/)
127+
```
128+
./scripts/start-release.py publish-rust-prod-stable
129+
```
107130
108-
- **T+5m** - Release and tag Cargo. From a rust-lang/rust checkout (script will
109-
checkout the stable branch automatically), run the following script from
110-
[simpleinfra].
131+
The command will start a background job to invoke [`promote-release`] targeting
132+
the production environment, and it will show the instructions to follow its
133+
logs.
111134
112-
```sh
113-
../simpleinfra/release-scripts/tag-cargo.sh
114-
```
135+
When the release process completes, merge the blog post PR and inform Mara to
136+
announce the release on social media. Finally, bask in your success 🎉
115137
116-
- **T+1hr** Send a PR to the beta branch running `./x.py run
117-
src/tools/bump-stage0` to bump the boostrap compiler to the stable you
118-
just released.
138+
## Beta stage0 update (Friday)
119139
120-
[update-thanks]: https://github.com/rust-lang/thanks/actions/workflows/ci.yml
140+
Send a PR to the beta branch updating the stage0 to the stable release you
141+
published:
121142
122-
Bask in your success.
143+
```
144+
./x run src/tools/bump-stage0
145+
```
123146
124-
## Rebuilding stable pre-releases
147+
## Appendix: Rebuilding stable pre-releases
125148
126149
If something goes wrong and we need to rebuild the stable artifacts, merge the
127150
PR on the `stable` branch of the [rust-lang/rust] repository. Once the commit
128-
is merged, issue the following command in a shell with [AWS
129-
credentials][awscli] on the [simpleinfra] repository:
151+
is merged, [authenticate with AWS][awscli] and run this command in the
152+
[rust-lang/release-team] repository:
130153
131154
```
132-
./release-scripts/promote-release.py release dev stable --bypass-startup-checks
155+
./scripts/start-release.py publish-rust-dev-stable-rebuild
133156
```
134157
135-
You'll also want to update the previously published blog post and internals post
136-
with the new information.
137-
138-
## Publishing a nightly based off a try build
139-
140-
Sometimes a PR requires testing how it behaves when downloaded from rustup, for
141-
example after a manifest change. In those cases it's possible to publish a new
142-
nightly based off that PR on dev-static.rust-lang.org.
143-
144-
Once the try build finishes grab the merge commit SHA and run the following
145-
command in a shell with [AWS credentials][awscli] on the [simpleinfra]
146-
repository:
158+
You'll also want to update the previously published pre-release announcement on
159+
the blog and internals with the new information.
147160
148-
```sh
149-
./release-scripts/promote-release.py release dev nightly $MERGE_COMMIT_SHA
150-
```
151-
152-
When the release process end you'll be able to install the new nightly with:
153-
154-
```sh
155-
RUSTUP_DIST_SERVER=https://dev-static.rust-lang.org rustup toolchain install nightly
156-
```
161+
[^auth]: Publishing releases require authentication, and only authorized
162+
members of the release team can invoke it. The command will prompt you on how
163+
to setup your environment and how to authenticate with AWS the first time you
164+
execute it.
157165
158-
[awscli]: ../infra/docs/aws-access.md#using-the-aws-cli
159-
[rust-lang/rust]: https://github.com/rust-lang/rust
160-
[simpleinfra]: https://github.com/rust-lang/simpleinfra
166+
[rust-lang/rust]: https://github.com/[rust-lang/rust]
167+
[rust-lang/release-team]: https://github.com/rust-lang/release-team
161168
[ripgrep]: https://github.com/burntsushi/ripgrep
169+
[`promote-release`]: https://github.com/rust-lang/promote-release

0 commit comments

Comments
 (0)