-
Notifications
You must be signed in to change notification settings - Fork 515
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
Linkcheck only changed files (except for cron jobs) #913
Conversation
$ cargo install mdbook-linkcheck --version '^0.7.1'
Updating crates.io index
error: could not find `mdbook-linkcheck` in registry `https://github.com/rust-lang/crates.io-index` with version `^0.7.1`
The command "cargo install mdbook-linkcheck --version '^0.7.1'" failed and exited with 101 during . Are we waiting on an mdbook-linkcheck release? |
@camelid Yes, and also good catch on the endpoint... I misread the docs. |
We could use a commit hash version of mdbook-linkcheck until there's a point release; that way we can test to make sure the setup is working properly. What do you think? |
Hmm... somehow we are still messing up the git commit ranges, so there is something I don't understand. However, hopefully the current version works correctly. |
|
Indeed, it does seem to work properly this way. |
Ok, I've squashed... I'm actually ok with just merging this, even though it will cause us to use master mdbook-linkcheck. |
Do you want to pin to a particular commit though? |
Ah, yeah, that's a good idea. |
I think this is ready! 🎉 |
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.
This is clear improvement for the CI workflow, though it would be awesome if we could somehow get rid of GitHub's ratelimits.
I don't really feel comfortable approving the shell script though, I'd prefer if someone else reviews it
I wouldn't say I'm "confident" - more than I'm pretty sure it'll work, and we have a regular cronjob to check all the links anyway. Maybe @jyn514 could review the script? |
Also: worst-case scenario, we have a couple broken links :) |
Right. I also think this is pretty low-risk, but since we have very few PRs open right now, this can wait few hours/days for someone else to review |
Co-authored-by: Joshua Nelson <[email protected]>
Co-authored-by: Joshua Nelson <[email protected]>
I'm glad we added the assert! Not sure why it's failing though. |
Co-authored-by: Joshua Nelson <[email protected]>
Co-authored-by: Camelid <[email protected]>
Thanks so much for tackling this! |
Closes #886
In this PR, we change the CI setup to only check files that have changed in the
most recent git commit. This means that changes in PRs are less likely to get
blocked on unrelated breakage (it's still possible if that breakage happens to
be in the same file).
On the other hand, we do want to periodically check all files. Currently, there
is a cron job that runs every day. We change the CI script to check if the
Travis run is a cron job and if so do a full link check. The hope is that by
having the cron job run often enough and preserving the linkcheck cache, we can
continue to find breakage relatively soon while avoiding the 429 Too Many
Requests issues we've been seeing.
This is currently blocked on a new mdbook-linkcheck release.