Problem
GitHubTagProvider hardcodes its API endpoint as a class variable:
host = "github.com:443"
api_url = "https://api.{self.host}/repos/{self.organization}/{self.repo}/tags"
This can't be overridden per-instance, so every use hits the real GitHub API. In CI, fork PRs can't use GITHUB_TOKEN (GitHub security restriction), leaving tests subject to the shared 60 req/hr unauthenticated rate limit.
GitLabTagProvider already supports this — it accepts a server_url constructor parameter.
Proposed Solution
-
Add a server_url parameter to GitHubTagProvider.__init__(), defaulting to https://api.github.com. Derive api_url from it, matching the GitLab pattern.
-
Update the stevedore_github.py e2e plugin to accept a mock URL (e.g. via env var).
-
Update test_bootstrap_cooldown_github.sh to start a local HTTP server serving static tag JSON, using the existing local server pattern from e2e/common.sh.
This eliminates ~16 GitHub API calls per CI run (4 paginated pages × 4 parallel ci_bootstrap_suite jobs) and makes the test deterministic regardless of GitHub API availability.
Context
- Rate limiting:
- Fork PRs cannot use
GITHUB_TOKEN, so mocking is the only reliable fix for CI
GitLabTagProvider already has server_url parameter — this brings parity
Files
src/fromager/resolver.py — GitHubTagProvider
e2e/github_override_example/src/package_plugins/stevedore_github.py
e2e/test_bootstrap_cooldown_github.sh
Problem
GitHubTagProviderhardcodes its API endpoint as a class variable:This can't be overridden per-instance, so every use hits the real GitHub API. In CI, fork PRs can't use
GITHUB_TOKEN(GitHub security restriction), leaving tests subject to the shared 60 req/hr unauthenticated rate limit.GitLabTagProvideralready supports this — it accepts aserver_urlconstructor parameter.Proposed Solution
Add a
server_urlparameter toGitHubTagProvider.__init__(), defaulting tohttps://api.github.com. Deriveapi_urlfrom it, matching the GitLab pattern.Update the
stevedore_github.pye2e plugin to accept a mock URL (e.g. via env var).Update
test_bootstrap_cooldown_github.shto start a local HTTP server serving static tag JSON, using the existing local server pattern frome2e/common.sh.This eliminates ~16 GitHub API calls per CI run (4 paginated pages × 4 parallel
ci_bootstrap_suitejobs) and makes the test deterministic regardless of GitHub API availability.Context
GITHUB_TOKEN, so mocking is the only reliable fix for CIGitLabTagProvideralready hasserver_urlparameter — this brings parityFiles
src/fromager/resolver.py—GitHubTagProvidere2e/github_override_example/src/package_plugins/stevedore_github.pye2e/test_bootstrap_cooldown_github.sh