-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Switch link checker to mdbook-linkcheck #3474
Conversation
e05180a
to
8366b8a
Compare
We could add I'll remove the link-checking behavior from the netlify deploy for now. |
2d8a99a
to
7e9373b
Compare
/milestone v0.3.10 |
d6b3f41
to
4fe7460
Compare
4fe7460
to
4300487
Compare
/milestone Next |
4300487
to
cce2159
Compare
@vincepri any reason we keep pushing this one off? It's catching regressions we're missing |
cce2159
to
469a7cc
Compare
Happy to merge whenever it's ready |
Should be ready now, I hadn't noticed the netlify failure |
@vincepri should be ready to go now, or at least review 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/milestone v0.3.10 |
Do we want the deploy/netlify preview to fail if there are broken links? It's not currently because the linkcheck is marked as optional and our netlify configuration doesn't install the link checker as part of the build. |
@detiber WDYT? |
I'm a bit torn on failing the build... In one sense it would be nice to get a heads up that things are broken and/or verify any new links added are not broken, but it also seems a bit harsh to penalize a contributor's PR if an existing link has become broken. Unless there is a way to differentiate the two, then I think it should likely remain optional. |
/lgtm That's fair. How do we anticipate getting signal that links are broken? |
For netlify notifications, it looks like it is possible to configure both Slack and email notifications. For slack, it would require getting a slack token: https://github.com/kubernetes/community/blob/13b3f6a596f3b31c668409c1a52f386f98eab93f/.github/ISSUE_TEMPLATE/slack-request.md |
What this PR does / why we need it:
Switches our link checker from https://github.com/raviqqe/liche to https://github.com/Michael-F-Bryan/mdbook-linkcheck/
This tool is directly integrated with mdbook which is nice, since it tests against rendered the rendered Markdown with our preprocessors rather than just scanning the raw files. It also supports adding headers for specific domains, which helps with avoiding rate-limiting by GitHub. It has built-in caching too, so links that have already been verified are faster.
I'm using my fork of https://github.com/japaric/trust/ which just gives us a nice succinct script to download Rust GitHub releases. We could also vendor the script. The upstream trust repo has a problem in that it requires
rustc
even if you're just using it to download a GitHub release, which I've made a PR to fix here.Removing
verify-book-links
as a part ofmake verify
so that it doesn't become PR-blocking. I'm going to make a separate PR to test-infra to make it just a separate optional job, which for now should give us good enough visibility if a PR breaks a link or if a link breaks due to reasons outside our control (external servers changing).Part of #2703