Skip to content

ci: authenticate and retry release lookup in manifest docs sync - #4

Open
elbayoumi wants to merge 2 commits into
mainfrom
fix/manifest-sync-auth
Open

elbayoumi wants to merge 2 commits into
mainfrom
fix/manifest-sync-auth

Conversation

@elbayoumi

Copy link
Copy Markdown
Contributor

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() in scripts/sync-docs.py called 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: pass GITHUB_TOKEN: ${{ github.token }} to the "Generate preview from public sources" step. The existing contents: read permission is enough.
  • scripts/sync-docs.py: send Authorization: Bearer when GITHUB_TOKEN is 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.

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.

1 participant