Repository navigation
Sent GITHUB_TOKEN with the request for the GitHub IP ranges - #330
Merged
Merged
Conversation
Unauthenticated requests to the GitHub API are limited to 60 an hour per IP address, and the addresses hosted CI runners share are often past that, which failed the daily remote tests on a 403 from api.github.com/meta. A token set in GITHUB_TOKEN is now sent with that request, and with no other, and the remote testing workflow passes the job's own token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQzEBLF8MTBEndj4xpCvRL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQzEBLF8MTBEndj4xpCvRL
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #330 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 45 45
Lines 2183 2191 +8
=========================================
+ Hits 2183 2191 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Summary
The 2026-10-30 daily remote tests failed with:
The GitHub API allows 60 unauthenticated requests an hour per IP address. Hosted runners share their addresses, so the allowance is often spent before our job asks. The two Azure tests from #329 passed in that run. Only the GitHub listing failed, in
test_every_published_listing_is_available_remoteandtest_resolver_resolves_public_ip_remote.Changes
_request_published_listingnow sendsAuthorization: Bearer <token>whenGITHUB_TOKENis set and not blank.api.github.com. The token never goes to AWS, GCP, Microsoft or the VPN listing..github/workflows/remote_testing.ymlsetsGITHUB_TOKEN: ${{ github.token }}. That is the job's built-in token, which raises the limit to 1,000 requests an hour per repository. No new secret and no extra permissions are needed.GITHUB_TOKEN.Production on Typhon is unlikely to hit this. Typhon fetches about once per run from its own address, and since #329 a saved copy stands in if the GitHub listing is ever refused.
Tests
requests.getintests/test_service_networks.pynow records the headers of each request.test_github_token_is_sent_to_the_github_api_onlycovers the variable unset, blank, and set. It checks the header reachesapi.github.com/metaonly when set, and that every other request is sent with no headers.pytest tests -m "not remote": 471 passed.pre-commit run --all-files: clean.Version 1.16.0 → 1.16.1.
Generated by Claude Code