Skip to content
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

ci: use mdbook-linkcheck for docs linting #4062

Merged
merged 1 commit into from
Mar 21, 2024
Merged

Conversation

conorsch
Copy link
Contributor

Runs mdbook-linkcheck [0] on PRs, ensuring that docs are checked for broken links prior to merge. We don't want to slow down per-PR CI runs, so it's important these steps run in parallel, from a warm cache. The cargo test workflow takes ~5m, so as long as we're under that, we should be good.

There's another subtle change in here: we reduce the number of CI vCPUs dedicated to these docs-building jobs, ensuring there's more compute available for the CPU-intensive jobs like cargo test. This allows more CI runs in parallel as multiple PRs are modified concurrently. Overall, the per-PR CPU reservation has changed from 80 -> 68. After observing the effect on CI runtimes, I suspect we can finetune further, and even bump up cargo test up to a 32-cpu runner if we gain back enough headroom.

Refs #3994, which recommended the use of mdbook-linkcheck.

[0] https://github.com/Michael-F-Bryan/mdbook-linkcheck

@conorsch conorsch added the A-CI/CD Relates to continuous integration & deployment of Penumbra label Mar 20, 2024
Runs `mdbook-linkcheck` [0] on PRs, ensuring that docs are checked for
broken links prior to merge. We don't want to slow down per-PR CI runs,
so it's important these steps run in parallel, from a warm cache.
The cargo test workflow takes ~5m, so as long as we're under that,
we should be good.

There's another subtle change in here: we reduce the number of CI vCPUs
dedicated to these docs-building jobs, ensuring there's more compute
available for the CPU-intensive jobs like cargo test. This allows more
CI runs in parallel as multiple PRs are modified concurrently. Overall,
the per-PR CPU reservation has changed from 80 -> 68. After observing
the effect on CI runtimes, I suspect we can finetune further, and even
bump up cargo test up to a 32-cpu runner if we gain back enough
headroom.

Refs #3994, which recommended the use of mdbook-linkcheck.

[0] https://github.com/Michael-F-Bryan/mdbook-linkcheck
@cratelyn cratelyn added this to the Sprint 2 milestone Mar 21, 2024
@conorsch conorsch merged commit 80a2c72 into main Mar 21, 2024
7 checks passed
@conorsch conorsch deleted the 3994-mdbook-linkcheck branch March 21, 2024 17:35
conorsch added a commit that referenced this pull request Mar 21, 2024
Follow-up to #4062, which broke the deploy-docs workflow. By introducing
mdbook-linkcheck, we inadvertently changed the output dir structure
emitted by `mdbook build`: rather than `docs/guide/book/<docroot>`,
we now have `docs/guide/book/html/<docroot/` and
`docs/guide/book/linkcheck/`. The same is true of the protocol docs.
@conorsch conorsch mentioned this pull request Mar 21, 2024
conorsch added a commit that referenced this pull request Mar 21, 2024
Follow-up to #4062, which broke the deploy-docs workflow. By introducing
mdbook-linkcheck, we inadvertently changed the output dir structure
emitted by `mdbook build`: rather than `docs/guide/book/<docroot>`,
we now have `docs/guide/book/html/<docroot/` and
`docs/guide/book/linkcheck/`. The same is true of the protocol docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI/CD Relates to continuous integration & deployment of Penumbra
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants