Skip to content

PYTHON-5847 Fix intermittent linkcheck failures due to rate-limiting - #2833

Merged
blink1073 merged 4 commits into
mongodb:masterfrom
blink1073:PYTHON-5847
Jun 3, 2026
Merged

blink1073 merged 4 commits into
mongodb:masterfrom
blink1073:PYTHON-5847

Conversation

@blink1073

@blink1073 blink1073 commented Jun 2, 2026 •

Copy link
Copy Markdown
Member

PYTHON-5847

Changes in this PR

Updates doc/conf.py and the linkcheck CI job to reduce intermittent linkcheck failures:

  • Set linkcheck_workers = 1 to serialize requests to dochub.mongodb.org and avoid rate-limiting
  • Set linkcheck_timeout = 60 to give slow redirects more time before retrying
  • Remove GitHub links from linkcheck_ignore — they are now checked properly instead of skipped
  • Add linkcheck_anchors_ignore_for_url to skip anchor validation on GitHub URLs (anchors are rendered client-side and are unreliable to check)
  • Add linkcheck_request_headers to pass a GitHub token when checking GitHub links, avoiding rate-limiting
  • Pass GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} to the linkcheck workflow step so the token is available

Test Plan

Run the docs-linkcheck CI job a few times to confirm no more timeout or rate-limit failures on dochub or GitHub links.

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)?
  • Is there test coverage?
  • Is any followup work tracked in a JIRA ticket? If so, add link(s).

Checklist for Reviewer

  • Does the title of the PR reference a JIRA Ticket?
  • Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
  • Is all relevant documentation (README or docstring) updated?

…miting

Set linkcheck_workers=1 to serialize requests to dochub.mongodb.org and
increase linkcheck_timeout=60 to give slow redirects more room before retrying.
@blink1073
blink1073 requested a review from a team as a code owner June 2, 2026 01:29
@blink1073
blink1073 requested a review from aclark4life June 2, 2026 01:29
@blink1073
blink1073 marked this pull request as draft June 2, 2026 01:34
@blink1073

Copy link
Copy Markdown
Member Author

Draft until I rerun the link checker a few times

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@blink1073

Copy link
Copy Markdown
Member Author

Okay, it passed 4 times in a row.

@blink1073
blink1073 marked this pull request as ready for review June 2, 2026 11:47
@blink1073 blink1073 changed the title PYTHON-5847 Fix intermittent linkcheck failures due to dochub rate-limiting PYTHON-5847 Fix intermittent linkcheck failures due to rate-limiting Jun 2, 2026

@aclark4life aclark4life left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Woo hoo!

@blink1073
blink1073 merged commit 733e8b1 into mongodb:master Jun 3, 2026
131 checks passed
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.

3 participants