Skip to content

Broken Link to the high-level overview #721

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

Merged
merged 1 commit into from
May 27, 2020

Conversation

Michael-F-Bryan
Copy link
Contributor

I'm about to release version 0.6.0 of mdbook-linkcheck and found this broken link while testing it on the rustc dev guide.

Hopefully I'm correct in guessing high-level-overview.md was renamed to overview.md. If not, let me know and I'll update it accordingly.

@Michael-F-Bryan
Copy link
Contributor Author

This version has switched to a different backend for linkchecking (the linkcheck crate) which uses async IO to check links concurrently.

While testing it locally I got a lot of 429 Too Many Requests errors from GitHub. The rustc guide has a lot more GitHub links than your average book, have you seen this before?

@JohnTitor
Copy link
Member

While testing it locally I got a lot of 429 Too Many Requests errors from GitHub. The rustc guide has a lot more GitHub links than your average book, have you seen this before?

Yeah, we've seen that failures on toolstate check as well and currently we don't have any workaround iirc :/

@Michael-F-Bryan
Copy link
Contributor Author

Michael-F-Bryan commented May 27, 2020

My approach was to run the linkcheck multiple times. That way it'll cache the first X requests and after two or three runs it'll work its way through all GitHub links.

I'm guessing you could generate an API token and use mdbook-linkcheck's variable interpolation to attach a Authorization: Basic $API_TOKEN header to hopefully get a higher rate limit. But then because mdbook-linkcheck doesn't have a way of saying "only set this header when interpolation succeeds", everyone wanting to develop the guide would need to have a token and set the $API_TOKEN variable.

Edit: I've played around with how variables are interpolated when resolving headers so an interpolation failure isn't fatal (Michael-F-Bryan/mdbook-linkcheck@0828632). This unlocks the Authorization: Basic $API_TOKEN approach for avoiding 429's mentioned earlier.

@JohnTitor
Copy link
Member

Sounds good! Let's continue the discussion about the 429 failures on Zulip: https://rust-lang.zulipchat.com/#narrow/stream/196385-t-compiler.2Fwg-rustc-dev-guide/topic/toolstate

@JohnTitor JohnTitor merged commit 6d5e074 into rust-lang:master May 27, 2020
@Michael-F-Bryan Michael-F-Bryan deleted the broken-links branch May 28, 2020 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants