Skip to content

Commit 0bc0356

Browse files
authored
Merge pull request #922 from apiraino/fix-tests-round-1
2 parents 88f9108 + 7bd597c commit 0bc0356

22 files changed

+90
-85
lines changed

src/compiler/prioritization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Finally, the meeting agenda can be generated. Clone and build [`triagebot`][tria
157157

158158
[triagebot]: https://github.com/rust-lang/triagebot
159159

160-
```
160+
```console
161161
$ cargo run --bin prioritization-agenda
162162
```
163163

src/compiler/proposals-and-stabilization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,21 @@ These types of procedural comments can be left on the issue (it's also good to l
8383
Zulip). See the previous section. To facilitate a machine parsable scanning of the concerns
8484
please use the following syntax to formally register a concern:
8585

86-
```
86+
```text
8787
@rustbot concern reason-for-concern
8888
8989
<long description of the concern>
9090
```
9191

9292
And the following syntax to lift a concern when resolved:
9393

94-
```
94+
```text
9595
@rustbot resolve reason-for-concern
9696
```
9797

9898
MCPs can be seconded using:
9999

100-
```
100+
```text
101101
@rustbot second
102102
```
103103

src/crates-io/crate-removal.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ whether we have to comply with it.
1212

1313
* Remove it from the database:
1414

15-
heroku run -a crates-io -- target/release/crates-admin delete-crate [crate-name]
15+
```console
16+
heroku run -a crates-io -- target/release/crates-admin delete-crate [crate-name]
17+
```
1618

1719
or
1820

19-
heroku run -a crates-io -- target/release/crates-admin delete-version [crate-name] [version-number]
21+
```console
22+
heroku run -a crates-io -- target/release/crates-admin delete-version [crate-name] [version-number]
23+
```
2024

2125
* Remove the crate or version from the index. To remove an entire crate, remove
2226
the entire crate file. For a version, remove the line corresponding to the
@@ -26,7 +30,7 @@ whether we have to comply with it.
2630

2731
* Invalidate the CloudFront cache:
2832

29-
```
33+
```console
3034
aws cloudfront create-invalidation --distribution-id EJED5RT0WA7HA --paths '/*'
3135
```
3236

src/crates-io/db-maintenance.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ can use:
4141

4242
2. Scale the background worker to 0 instances:
4343

44-
```
44+
```console
4545
heroku ps:scale -a crates-io background_worker=0
4646
```
4747

@@ -58,7 +58,7 @@ can use:
5858
5959
3. Configure the application to be in read-only mode without the follower:
6060

61-
```
61+
```console
6262
heroku config:set -a crates-io READ_ONLY_MODE=1 DB_OFFLINE=follower
6363
```
6464

@@ -69,37 +69,37 @@ can use:
6969

7070
3. Wait for the application to be redeployed with the new configuration:
7171

72-
```
72+
```console
7373
heroku ps:wait -a crates-io
7474
```
7575

7676
3. Run the database maintenance:
7777

78-
```
78+
```console
7979
heroku pg:maintenance:run --force -a crates-io
8080
```
8181

8282
1. Wait for the maintenance to finish:
8383

84-
```
84+
```console
8585
heroku pg:wait -a crates-io
8686
```
8787

8888
3. Confirm all the databases are online:
8989

90-
```
90+
```console
9191
heroku pg:info -a crates-io
9292
```
9393

9494
3. Confirm the primary database fully recovered (should output `false`):
9595

96-
```
96+
```console
9797
echo "SELECT pg_is_in_recovery();" | heroku pg:psql -a crates-io DATABASE
9898
```
9999

100100
3. Switch off read-only mode:
101101

102-
```
102+
```console
103103
heroku config:unset -a crates-io READ_ONLY_MODE
104104
```
105105

@@ -110,7 +110,7 @@ can use:
110110

111111
3. Wait for the application to be redeployed with the new configuration:
112112

113-
```
113+
```console
114114
heroku ps:wait -a crates-io
115115
```
116116

@@ -124,19 +124,19 @@ can use:
124124

125125
3. Scale the background worker up again:
126126

127-
```
127+
```console
128128
heroku ps:scale -a crates-io background_worker=1
129129
```
130130

131131
3. Confirm the follower database is available:
132132

133-
```
133+
```console
134134
echo "SELECT 1;" | heroku pg:psql -a crates-io READ_ONLY_REPLICA
135135
```
136136

137137
3. Enable connections to the follower:
138138

139-
```
139+
```console
140140
heroku config:unset -a crates-io DB_OFFLINE
141141
```
142142

@@ -156,48 +156,48 @@ load by doing this.
156156

157157
1. Configure the application to operate without the follower:
158158

159-
```
159+
```console
160160
heroku config:set -a crates-io DB_OFFLINE=follower
161161
```
162162

163163
1. Wait for the application to be redeployed with the new configuration:
164164

165-
```
165+
```console
166166
heroku ps:wait -a crates-io
167167
```
168168

169169
1. Start the database maintenance:
170170

171-
```
171+
```console
172172
heroku pg:maintenance:run --force -a crates-io READ_ONLY_REPLICA
173173
```
174174

175175
1. Wait for the maintenance to finish:
176176

177-
```
177+
```console
178178
heroku pg:wait -a crates-io READ_ONLY_REPLICA
179179
```
180180

181181
1. Confirm the follower database is ready:
182182

183-
```
183+
```console
184184
heroku pg:info -a crates-io
185185
```
186186

187187
1. Confirm the follower database is responding to queries:
188188

189-
```
189+
```console
190190
echo "SELECT 1;" | heroku pg:psql -a crates-io READ_ONLY_REPLICA
191191
```
192192

193193
1. Enable connections to the follower:
194194

195-
```
195+
```console
196196
heroku config:unset -a crates-io DB_OFFLINE
197197
```
198198

199199
1. Wait for the application to be redeployed with the new configuration.
200200

201-
```
201+
```console
202202
heroku ps:wait -a crates-io
203203
```

src/docs-rs/maintenance.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ clogging up the queue and preventing other crates to build. In this case it's
77
possible to temporarily remove the crate from the queue until the docs.rs's bug
88
is fixed. To do that, log into the machine and open a PostgreSQL shell with:
99

10-
```
10+
```console
1111
$ psql
1212
```
1313

1414
Then you can run this SQL query to remove the crate:
1515

16-
```
16+
```psql
1717
UPDATE queue SET attempt = 100 WHERE name = '<CRATE_NAME>';
1818
```
1919

2020
To add the crate back in the queue you can run in the PostgreSQL shell this
2121
query:
2222

23-
```
23+
```psql
2424
UPDATE queue SET attempt = 0 WHERE name = '<CRATE_NAME>';
2525
```
2626

@@ -32,13 +32,13 @@ nightly and instead pin a specific release. To do that you need to edit the
3232
`/home/cratesfyi/.docs-rs-env` file, adding or changing this environment
3333
variable:
3434

35-
```
35+
```console
3636
CRATESFYI_TOOLCHAIN=nightly-YYYY-MM-DD
3737
```
3838

3939
Once the file changed docs.rs needs to be restarted:
4040

41-
```
41+
```console
4242
systemctl restart docs.rs
4343
```
4444

@@ -50,7 +50,7 @@ restart docs.rs again.
5050
If a bug was recently fixed, you may want to rebuild a crate so that it builds with the latest version.
5151
From the docs.rs machine:
5252

53-
```
53+
```console
5454
cratesfyi queue add <crate> <version>
5555
```
5656

@@ -109,14 +109,14 @@ cratesfyi=> UPDATE queue SET priority = 1 WHERE name LIKE 'group-%';
109109
After an outage you might want to add all the failed builds back to the queue.
110110
To do that, log into the machine and open a PostgreSQL shell with:
111111

112-
```
112+
```console
113113
psql
114114
```
115115

116116
Then you can run this SQL query to add all the crates failed after `YYYY-MM-DD
117117
HH:MM:SS` back in the queue:
118118

119-
```
119+
```psql
120120
UPDATE queue SET attempt = 0 WHERE attempt >= 5 AND build_time > 'YYYY-MM-DD HH:MM:SS';
121121
```
122122

@@ -126,7 +126,7 @@ Sometimes it might be needed to remove all the content related to a crate from
126126
docs.rs (for example after receiving a DMCA). To do that, log into the server
127127
and run:
128128

129-
```
129+
```console
130130
cratesfyi database delete-crate CRATE_NAME
131131
```
132132

@@ -139,7 +139,7 @@ Occasionally it might be needed to prevent a crate from being built on docs.rs,
139139
for example if we can't legally host the content of those crates. To add a
140140
crate to the blacklist, preventing new builds for it, you can run:
141141

142-
```
142+
```console
143143
cratesfyi database blacklist add <CRATE_NAME>
144144
```
145145

src/docs-rs/self-hosting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ To help contain what crates' build scripts can access, documentation builds run
7373

7474
You'll also need to configure networking for the container. The following is a sample `/etc/default/lxc-net` that enables NAT networking for the container:
7575

76-
```
76+
```console
7777
USE_LXC_BRIDGE="true"
7878
LXC_BRIDGE="lxcbr0"
7979
LXC_ADDR="10.0.3.1"
@@ -87,7 +87,7 @@ LXC_DOMAIN=""
8787

8888
In addition, you'll need to set the container's configuration to use this. Add the following lines to `/cratesfyi-prefix/cratesfyi-container/config`:
8989

90-
```
90+
```console
9191
lxc.net.0.type = veth
9292
lxc.net.0.link = lxcbr0
9393
```
@@ -132,7 +132,7 @@ To ensure that the docs.rs server is configured properly, we need to set a few e
132132

133133
Write the following into `/home/cratesfyi/.cratesfyi.env`. If you have a GitHub access token that the site can use to collect repository information, add it here, but otherwise leave it blank. The variables need to exist, but they can be blank to skip that collection.
134134

135-
```
135+
```console
136136
CRATESFYI_PREFIX=/cratesfyi-prefix
137137
CRATESFYI_DATABASE_URL=postgresql://cratesfyi:password@localhost
138138
CRATESFYI_CONTAINER_NAME=cratesfyi-container

src/infra/docs/aws-access.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ To use the script, clone the [rust-lang/simpleinfra][simpleinfra] repository in
6969
a directory. Then, every time you need to use the AWS CLI run this command in
7070
your shell:
7171

72-
```
72+
```console
7373
eval $(~/PATH/TO/SIMPLEINFRA/aws-creds.py)
7474
```
7575

src/infra/docs/bastion.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ To log into a server through the bastion, use one of the following methods:
1616

1717
- Use SSH's `-J` flag:
1818

19-
```
19+
```console
2020
ssh -J <username>@bastion.infra.rust-lang.org <username>@servername.infra.rust-lang.org
2121
```
2222

2323
- Configure your SSH client to always jump through the bastion when connecting to a host:
2424

2525
- Add this snippet to your SSH configuration file (usually located in `~/.ssh/config`):
2626

27-
```
27+
```console
2828
Host servername.infra.rust-lang.org
2929
ProxyJump <username>@bastion.infra.rust-lang.org
3030
```
3131

3232
- Use SSH:
3333

34-
```
34+
```console
3535
ssh <username>@servername.infra.rust-lang.org
3636
```
3737

src/infra/docs/crater-agents.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The agent is managed by the `container-crater-agent.service` systemd unit. That
2525
means it's possible to start, stop and restart it with the usual systemctl
2626
commands:
2727

28-
```
28+
```console
2929
systemctl stop container-crater-agent.service
3030
systemctl start container-crater-agent.service
3131
systemctl restart container-crater-agent.service
@@ -36,7 +36,7 @@ systemctl restart container-crater-agent.service
3636
Logs of the agents are forwarded and collected by journald. To see them you can
3737
use journalctl:
3838

39-
```
39+
```console
4040
journalctl -u container-crater-agent.service
4141
```
4242

@@ -46,7 +46,7 @@ The container is updated automatically every 5 minutes (provided a newer image
4646
is present). If you need to update them sooner you can manually start the
4747
updater service by running this command:
4848

49-
```
49+
```console
5050
systemctl start docker-images-update.service
5151
```
5252

src/infra/docs/dev-desktop-github-app.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ In our case, we just abort (`exit(0)`) for everything but `get`, as we regenerat
4848

4949
The actual arguments are passed via stdin and usually look like
5050

51-
```
51+
```console
5252
protocol=https
5353
host=github.com
5454
path=your_repo.git
5555
```
56-

0 commit comments

Comments
 (0)