Skip to content

fix(build): reuse pre-built wheels that carry a build number - #1359

Merged
mergify[bot] merged 1 commit into
mainfrom
fix/prebuilt-ignore-changelog-build-tag
Oct 5, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
fix/prebuilt-ignore-changelog-build-tag

Conversation

@smoparth

@smoparth smoparth commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Pre-built packages have an empty changelog build tag, which the reuse check treated as 0. A publisher build number higher than 0 then failed the job instead of downloading the wheel. Skip that comparison for pre-built packages and keep it for wheels Fromager builds.

closes #1358

Pull Request Description

What

Why

@smoparth
smoparth requested a review from a team as a code owner October 5, 2026 13:22
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
AGENTS.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: python-wheel-build/fromager/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6acad366-66e7-4eb5-8228-f5e9db187c09
📥 Commits

Reviewing files that changed from the base of the PR and between 148e372 and 7db7b5a.

📒 Files selected for processing (1)
  • tests/test_cooldown.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

_is_wheel_built now skips build-tag validation for prebuilt packages. Non-prebuilt packages retain the existing tag comparison and mismatch handling. Tests cover selecting the higher-numbered publisher wheel from a package wheel server and reusing a build-tagged wheel from the job cache.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 7db7b

Pre-built wheels that carry a publisher-assigned build number can now be reused instead of failing the build. Wheels Fromager builds keep their existing checks. No merge-blocking risk was identified.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the change: reusing pre-built wheels that have a publisher-assigned build number.
Description check ✅ Passed The description explains why pre-built wheels with build numbers failed the reuse check and how the change addresses the issue.
Linked Issues check ✅ Passed [ #1358 ] _is_wheel_built() now skips changelog build-tag calculation and comparison for pbi.pre_built packages. This allows publisher-assigned build numbers without raising the prior ValueError…
Out of Scope Changes check ✅ Passed The implementation and tests only change wheel reuse behavior for pre-built packages and preserve the existing behavior for other packages. These changes directly support issue #1358; no unrelated cha…
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@mergify mergify Bot added the ci label Oct 5, 2026
Comment thread src/fromager/commands/build.py
rd4398
rd4398 previously approved these changes Oct 5, 2026

@rd4398 rd4398 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! I will leave final approval to @LalatenduMohanty

Pre-built packages have an empty changelog build tag, which the reuse
check treated as 0. A publisher build number higher than 0 then failed
the job instead of downloading the wheel. Skip that comparison for
pre-built packages and keep it for wheels Fromager builds.

Co-Authored-By: Grok <grok@x.ai>
Signed-off-by: Shanmukh Pawan <smoparth@redhat.com>
@LalatenduMohanty

Copy link
Copy Markdown
Member

Corrected #1358 — the failure was from a separate package index (wheel_server_url), not the reuse cache. The if not pbi.pre_built gate is the right fix. Filed #1360 for centralizing build tag matching as a follow-up.

@mergify
mergify Bot merged commit dd034d8 into main Oct 5, 2026
43 checks passed
@mergify

mergify Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@smoparth
smoparth deleted the fix/prebuilt-ignore-changelog-build-tag branch October 5, 2026 18:16

This branch was successfully deployed

1 active deployment
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.

_is_wheel_built() raises fatal ValueError for pre-built packages with build tags after #1273

3 participants