Skip to content

Fix tests by adding markdown tags #922

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/compiler/prioritization.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Finally, the meeting agenda can be generated. Clone and build [`triagebot`][tria

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

```
```console
$ cargo run --bin prioritization-agenda
```
Comment on lines +160 to 162
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark: I usually use bash for these, not that it really matters, I think

Copy link
Member

@tshepang tshepang Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bash (or sh) gives these wrong highlighting... I would say it should only be used for shell snippets, not command invocations

I would console (as done here) or text them


Expand Down
6 changes: 3 additions & 3 deletions src/compiler/proposals-and-stabilization.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,21 @@ These types of procedural comments can be left on the issue (it's also good to l
Zulip). See the previous section. To facilitate a machine parsable scanning of the concerns
please use the following syntax to formally register a concern:

```
```console
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: these are probably better as text, because they're rustbot github comments

@rustbot concern reason-for-concern

<long description of the concern>
```

And the following syntax to lift a concern when resolved:

```
```console
@rustbot resolve reason-for-concern
```

MCPs can be seconded using:

```
```console
@rustbot second
```

Expand Down
10 changes: 7 additions & 3 deletions src/crates-io/crate-removal.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ whether we have to comply with it.

* Remove it from the database:

heroku run -a crates-io -- target/release/crates-admin delete-crate [crate-name]
```console
heroku run -a crates-io -- target/release/crates-admin delete-crate [crate-name]
```

or

heroku run -a crates-io -- target/release/crates-admin delete-version [crate-name] [version-number]
```console
heroku run -a crates-io -- target/release/crates-admin delete-version [crate-name] [version-number]
```

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

* Invalidate the CloudFront cache:

```
```console
aws cloudfront create-invalidation --distribution-id EJED5RT0WA7HA --paths '/*'
```

Expand Down
40 changes: 20 additions & 20 deletions src/crates-io/db-maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ can use:

2. Scale the background worker to 0 instances:

```
```console
heroku ps:scale -a crates-io background_worker=0
```

Expand All @@ -58,7 +58,7 @@ can use:

3. Configure the application to be in read-only mode without the follower:

```
```console
heroku config:set -a crates-io READ_ONLY_MODE=1 DB_OFFLINE=follower
```

Expand All @@ -69,37 +69,37 @@ can use:

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

```
```console
heroku ps:wait -a crates-io
```

3. Run the database maintenance:

```
```console
heroku pg:maintenance:run --force -a crates-io
```

1. Wait for the maintenance to finish:

```
```console
heroku pg:wait -a crates-io
```

3. Confirm all the databases are online:

```
```console
heroku pg:info -a crates-io
```

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

```
```console
echo "SELECT pg_is_in_recovery();" | heroku pg:psql -a crates-io DATABASE
```

3. Switch off read-only mode:

```
```console
heroku config:unset -a crates-io READ_ONLY_MODE
```

Expand All @@ -110,7 +110,7 @@ can use:

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

```
```console
heroku ps:wait -a crates-io
```

Expand All @@ -124,19 +124,19 @@ can use:

3. Scale the background worker up again:

```
```console
heroku ps:scale -a crates-io background_worker=1
```

3. Confirm the follower database is available:

```
```console
echo "SELECT 1;" | heroku pg:psql -a crates-io READ_ONLY_REPLICA
```

3. Enable connections to the follower:

```
```console
heroku config:unset -a crates-io DB_OFFLINE
```

Expand All @@ -156,48 +156,48 @@ load by doing this.

1. Configure the application to operate without the follower:

```
```console
heroku config:set -a crates-io DB_OFFLINE=follower
```

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

```
```console
heroku ps:wait -a crates-io
```

1. Start the database maintenance:

```
```console
heroku pg:maintenance:run --force -a crates-io READ_ONLY_REPLICA
```

1. Wait for the maintenance to finish:

```
```console
heroku pg:wait -a crates-io READ_ONLY_REPLICA
```

1. Confirm the follower database is ready:

```
```console
heroku pg:info -a crates-io
```

1. Confirm the follower database is responding to queries:

```
```console
echo "SELECT 1;" | heroku pg:psql -a crates-io READ_ONLY_REPLICA
```

1. Enable connections to the follower:

```
```console
heroku config:unset -a crates-io DB_OFFLINE
```

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

```
```console
heroku ps:wait -a crates-io
```
20 changes: 10 additions & 10 deletions src/docs-rs/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ clogging up the queue and preventing other crates to build. In this case it's
possible to temporarily remove the crate from the queue until the docs.rs's bug
is fixed. To do that, log into the machine and open a PostgreSQL shell with:

```
```console
$ psql
```

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

```
```psql
UPDATE queue SET attempt = 100 WHERE name = '<CRATE_NAME>';
```

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

```
```psql
UPDATE queue SET attempt = 0 WHERE name = '<CRATE_NAME>';
```

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

```
```console
CRATESFYI_TOOLCHAIN=nightly-YYYY-MM-DD
```

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

```
```console
systemctl restart docs.rs
```

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

```
```console
cratesfyi queue add <crate> <version>
```

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

```
```console
psql
```

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

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

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

```
```console
cratesfyi database delete-crate CRATE_NAME
```

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

```
```console
cratesfyi database blacklist add <CRATE_NAME>
```

Expand Down
6 changes: 3 additions & 3 deletions src/docs-rs/self-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ To help contain what crates' build scripts can access, documentation builds run

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:

```
```console
USE_LXC_BRIDGE="true"
LXC_BRIDGE="lxcbr0"
LXC_ADDR="10.0.3.1"
Expand All @@ -87,7 +87,7 @@ LXC_DOMAIN=""

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

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

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.

```
```console
CRATESFYI_PREFIX=/cratesfyi-prefix
CRATESFYI_DATABASE_URL=postgresql://cratesfyi:password@localhost
CRATESFYI_CONTAINER_NAME=cratesfyi-container
Expand Down
2 changes: 1 addition & 1 deletion src/infra/docs/aws-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ To use the script, clone the [rust-lang/simpleinfra][simpleinfra] repository in
a directory. Then, every time you need to use the AWS CLI run this command in
your shell:

```
```console
eval $(~/PATH/TO/SIMPLEINFRA/aws-creds.py)
```

Expand Down
6 changes: 3 additions & 3 deletions src/infra/docs/bastion.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ To log into a server through the bastion, use one of the following methods:

- Use SSH's `-J` flag:

```
```console
ssh -J <username>@bastion.infra.rust-lang.org <username>@servername.infra.rust-lang.org
```

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

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

```
```console
Host servername.infra.rust-lang.org
ProxyJump <username>@bastion.infra.rust-lang.org
```

- Use SSH:

```
```console
ssh <username>@servername.infra.rust-lang.org
```

Expand Down
6 changes: 3 additions & 3 deletions src/infra/docs/crater-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The agent is managed by the `container-crater-agent.service` systemd unit. That
means it's possible to start, stop and restart it with the usual systemctl
commands:

```
```console
systemctl stop container-crater-agent.service
systemctl start container-crater-agent.service
systemctl restart container-crater-agent.service
Expand All @@ -36,7 +36,7 @@ systemctl restart container-crater-agent.service
Logs of the agents are forwarded and collected by journald. To see them you can
use journalctl:

```
```console
journalctl -u container-crater-agent.service
```

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

```
```console
systemctl start docker-images-update.service
```

Expand Down
3 changes: 1 addition & 2 deletions src/infra/docs/dev-desktop-github-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ In our case, we just abort (`exit(0)`) for everything but `get`, as we regenerat

The actual arguments are passed via stdin and usually look like

```
```console
protocol=https
host=github.com
path=your_repo.git
```

Loading