Skip to content

fix: prevent hitting github.com rate limits when bazel is fetching dependencies#8863

Merged
basvandijk merged 5 commits intomasterfrom
basvandijk/handle-github-rate-limiting-errors-on-namespace
Feb 15, 2026
Merged

fix: prevent hitting github.com rate limits when bazel is fetching dependencies#8863
basvandijk merged 5 commits intomasterfrom
basvandijk/handle-github-rate-limiting-errors-on-namespace

Conversation

@basvandijk
Copy link
Collaborator

@basvandijk basvandijk commented Feb 15, 2026

We keep frequently hitting HTTP 500 errors when bazel is fetching dependencies from github.com. These seem to happen more frequently on Namespace.so runners.

The hypothesis is that we're hitting github.com rate limits which have a higher probability of triggering on Namespace runners since they share egress IPs across multiple tenants. So all Namespace customers fetching from github.com (releases, archives) contribute to the same rate-limit bucket.

To fix this we:

  • Install a ~/.netrc containing the GitHub token which bazel will use to authenticate with github.com to raise the rate limit from ~60 req/hr (unauthenticated, per-IP) to ~15000 req/hr (authenticated, per-token).
  • Remove the --experimental_repository_downloader_retries=3 override and use the default of 5 retries.
  • For debugging we log the current GitHub rate-limits.
  • For debugging we also cat /tmp/bazel-cache.bazelrc to know what cache settings Namespace installs.

@basvandijk basvandijk added the CI_ALL_BAZEL_TARGETS Runs all bazel targets and uploads them to S3 label Feb 15, 2026
@github-actions github-actions bot added the fix label Feb 15, 2026
@basvandijk basvandijk marked this pull request as ready for review February 15, 2026 14:21
@basvandijk basvandijk requested a review from a team as a code owner February 15, 2026 14:21
@github-actions github-actions bot added the @idx label Feb 15, 2026
@basvandijk basvandijk merged commit 8d18948 into master Feb 15, 2026
46 checks passed
@basvandijk basvandijk deleted the basvandijk/handle-github-rate-limiting-errors-on-namespace branch February 15, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI_ALL_BAZEL_TARGETS Runs all bazel targets and uploads them to S3 fix @idx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant