Repository navigation
Conversation
Add GitHub token support and retry logic for release fetching
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the intermittent failure of the "Manifest documentation sync" scheduled workflow (sync job, step "Generate preview from public sources", exit code 1). Runs #3 (Nov 25) and #5 (Nov 27) failed and #2 and #4 passed on the same commit 3dc6fd8.
Likely cause:
release()inscripts/sync-docs.pycalled the GitHub releases API with no token and re-raised any HTTP error other than 404, so a 403 rate limit or a 5xx on a shared runner IP crashed the script. This is inferred from the pattern and the code. The run logs were not readable without repo login.Changes:
.github/workflows/manifest-docs.yml: passGITHUB_TOKEN: ${{ github.token }}to the "Generate preview from public sources" step. The existingcontents: readpermission is enough.scripts/sync-docs.py: sendAuthorization: BearerwhenGITHUB_TOKENis set, and retry up to 3 attempts with a short sleep on 403/429/5xx. 404 still returns None. Other errors still raise.No change to generated output, permissions, secrets, publishing or settings. Local check: scripts/test-sync-docs.py passes (13 tests) and an unauthenticated preview run completes.