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

Fix linkcheck GitHub 429 errors #5396

Merged
merged 3 commits into from Jul 22, 2020
Merged

Fix linkcheck GitHub 429 errors #5396

merged 3 commits into from Jul 22, 2020

Conversation

rmol
Copy link
Contributor

@rmol rmol commented Jul 21, 2020

Status

Ready for review

Description of Changes

Sometimes, make docs-linkcheck can fail because it hits too many GitHub URLs in a short timeframe and runs afoul of their rate limits. This PR tells the Sphinx linkcheck plugin to ignore anything at https://github.com/freedomofpress/securedrop/issues/ as those URLs are not likely to change or disappear.

It also increases the number of linkcheck worker threads in an attempt to reduce the time this check takes.

Testing

Run make docs-linkcheck and confirm that it does not produce any 429 errors from any URL starting with https://github.com/freedomofpress/securedrop/issues/

Deployment

dev only

Checklist

If you made non-trivial code changes:

  • I have written a test plan and validated it for this PR

rmol added 2 commits July 21, 2020 15:44
The nonstandard formatting and indentation makes fixing this annoying.
We hit URLs under https://github.com/freedomofpress/securedrop/issues
more than GitHub likes, resulting in 429 Too Many Requests
errors. These URLs aren't likely to change or go missing, so ignoring
them seems a safe way to prevent spurious linkcheck failures.

Also increase the number of worker threads checking URLs, to reduce
the overall time linkcheck takes.
emkll
emkll previously approved these changes Jul 21, 2020
Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

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

lgtm:

@eloquence eloquence added this to Under Review in SecureDrop Team Board Jul 22, 2020
@zenmonkeykstop zenmonkeykstop self-assigned this Jul 22, 2020
"https://forum.securedrop.org/admin/users/list/active",
"https://weblate.securedrop.org/projects/securedrop/securedrop/#repository",
"https://github.com/freedomofpress/securedrop-debian-packages-lfs",
r"https://github.com/freedomofpress/securedrop/issues/.*",
Copy link
Contributor

Choose a reason for hiding this comment

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

No 429s for issues tickets, but I did see one for a path on the develop branch:

Warning, treated as error:
/home/user/securedrop/docs/development/tips_and_tricks.rst.rst:134:broken link: https://github.com/freedomofpress/securedrop/tree/develop/docs/diagrams (429 Client Error: too many requests for url: https://github.com/freedomofpress/securedrop/tree/develop/docs/diagrams)

It might be worth adding https://github.com/freedomofpress/securedrop/tree/.* to the list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good, passing for me locally now

@rmol rmol merged commit d2c5bef into develop Jul 22, 2020
SecureDrop Team Board automation moved this from Under Review to Done Jul 22, 2020
@rmol rmol deleted the fix-linkcheck-github-429 branch July 22, 2020 17:02
@rmol rmol mentioned this pull request Jul 22, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants