Skip to content

Commit eee9566

Browse files
committed
fix(ci): wire GITHUB_TOKEN into the tox test job
test_real_download_on_cache_miss makes a real, unauthenticated api.github.com call to resolve tflint's latest-releases listing. GITHUB_TOKEN was never actually forwarded into the pytest job's environment - tox.ini's 'pass_env = GITHUB_*' can only pick up a variable that's already there, and reusable-tox.yml never set it. With a 5-python x 4-OS matrix (20 jobs) all potentially sharing GitHub-hosted runners' pooled egress IPs, unauthenticated requests (60/hr per IP, shared with unrelated concurrent traffic) are a well-known source of exactly this kind of intermittent, job-specific failure - matches what was observed: a fast (~0.3s) failure on one matrix cell (pytest-3.12) while the rest of the matrix passed. This wires in the same GITHUB_TOKEN auto-authentication the project already documents as supported for version resolution (README.md, 'Most hooks: Pin a specific tool version') and already uses for Docker image builds - it was simply never connected for this job. Assisted-by: Sisyphus:claude-sonnet-5 claude
1 parent 08768e8 commit eee9566

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/reusable-tox.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,13 @@ jobs:
311311
id: tox-run
312312
shell: bash
313313
env:
314+
# Consumed by tools/install/_common.sh (via `pass_env = GITHUB_*`
315+
# in tox.ini) to authenticate GitHub API calls made while
316+
# resolving `--tool-version` pins - without it, requests are
317+
# unauthenticated and share GitHub's low per-IP rate limit
318+
# across every job in this workflow's matrix, which is exactly
319+
# what test_real_download_on_cache_miss can hit.
320+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
314321
INPUT_TOX_RUN_POSARGS: ${{ inputs.tox-run-posargs }}
315322
run: |-
316323
tox_common_args=(

0 commit comments

Comments
 (0)