Skip to content

fix(resolver): make GitHubTagProvider server URL configurable#1121

Closed
LalatenduMohanty wants to merge 1 commit intopython-wheel-build:mainfrom
LalatenduMohanty:fix/github-tag-provider-server-url
Closed

fix(resolver): make GitHubTagProvider server URL configurable#1121
LalatenduMohanty wants to merge 1 commit intopython-wheel-build:mainfrom
LalatenduMohanty:fix/github-tag-provider-server-url

Conversation

@LalatenduMohanty
Copy link
Copy Markdown
Member

Add a server_url parameter to GitHubTagProvider, matching the existing GitLabTagProvider pattern. The e2e test now uses a local mock server instead of hitting the real GitHub API, avoiding rate-limit failures in CI (especially for fork PRs without GITHUB_TOKEN).

Closes: #1119

@LalatenduMohanty LalatenduMohanty requested a review from a team as a code owner May 6, 2026 17:58
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 21739646-9077-4057-bacc-c9232938b0d2

📥 Commits

Reviewing files that changed from the base of the PR and between b5b31d9 and f6681de.

📒 Files selected for processing (8)
  • e2e/common.sh
  • e2e/github_override_example/mock_api/serve.py
  • e2e/github_override_example/mock_api/tags.json
  • e2e/github_override_example/src/package_plugins/stevedore_github.py
  • e2e/test_bootstrap_cooldown_github.sh
  • pyproject.toml
  • src/fromager/resolver.py
  • tests/test_resolver.py

📝 Walkthrough

Walkthrough

Adds a configurable GitHub API server URL to GitHubTagProvider and propagates it through the e2e plugin via the GITHUB_API_URL environment variable. Introduces a minimal local mock GitHub API server (serve.py) and static tags fixture (tags.json), and updates the e2e bootstrap to start and clean up that mock server. Updates tests to expect the new API URL form and cache_key that include the server URL. Replaces local wheel server management with a generic background server framework in e2e/common.sh. Adds a per-file Ruff ignore for the mock server script.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: making GitHubTagProvider server URL configurable, which is the core objective of this PR.
Description check ✅ Passed The description is directly related to the changeset, mentioning the server_url parameter addition and e2e mock server integration to address CI rate-limit failures.
Linked Issues check ✅ Passed All requirements from issue #1119 are met: server_url parameter added to GitHubTagProvider with correct default, stevedore_github.py updated to accept GITHUB_API_URL, mock server implementation added, and e2e test bootstrapping updated.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing the requirements in #1119. The test fixture updates in test_resolver.py align with the API endpoint changes necessitated by the server_url implementation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mergify mergify Bot added the ci label May 6, 2026
@LalatenduMohanty LalatenduMohanty force-pushed the fix/github-tag-provider-server-url branch 2 times, most recently from a95ca0b to e74b5af Compare May 6, 2026 18:54
Add a server_url parameter to GitHubTagProvider, matching the existing
GitLabTagProvider pattern. The e2e test now uses a local mock server
instead of hitting the real GitHub API, avoiding rate-limit failures
in CI (especially for fork PRs without GITHUB_TOKEN).

Also extracts a reusable start_background_server helper in common.sh
to deduplicate the server lifecycle pattern across e2e tests.

Closes: python-wheel-build#1119
Co-Authored-By: Claude <claude@anthropic.com>
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
@LalatenduMohanty LalatenduMohanty force-pushed the fix/github-tag-provider-server-url branch from e74b5af to f6681de Compare May 6, 2026 19:01
@LalatenduMohanty
Copy link
Copy Markdown
Member Author

Closing — fork PRs do get a read-only GITHUB_TOKEN (confirmed in #1122), which is sufficient for the GitHub API tag reads (5,000 req/hr). The rate-limiting concern is not a real problem, so the mock server approach adds complexity without enough benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make GitHubTagProvider server URL configurable to enable mock testing

1 participant