Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
rd4398
left a comment
There was a problem hiding this comment.
Overall this is really solid PR and the core of the change is right. I verified the settings validation too: all four source: + legacy pre_built mixing combinations correctly raise, so the precedence change in PackageBuildInfo.pre_built is safe.
I have added few comments/suggestions. Let me know what do you think.
690ff3e to
e16b3c4
Compare
Resolve and download fresh prebuilt wheels through the selected source resolver. Preserve local wheel cache reuse, legacy prebuilt downloads, prebuilt hooks, and the test-mode fallback. Add focused coverage for both configured profiles, build-order replay, and legacy behavior. Closes python-wheel-build#1208 Co-Authored-By: Codex <[email protected]> Signed-off-by: Shanmukh Pawan <[email protected]>
e16b3c4 to
c9cc5dd
Compare
rd4398
left a comment
There was a problem hiding this comment.
Thanks for addressing the feedback! The changes look good to me. I am approving the PR. Please file follow-up issues and resolve threads once done.
|
Looked through the resolver, download, preparation, and prebuilt-wheel paths end to end. The DownloadedSource/DownloadKind boundary makes the artifact handling much clearer, and the legacy compatibility and cache behavior are well covered. No blocking concerns from me. |
|
One clarifying question I have (and this is a nit not a blocker) - DownloadedSource appears to be introduced in this MR, but its docstring says versionadded:: 0.96.0, while the other new APIs use 0.102.0. Should this be updated to 0.102.0? |
| ) | ||
| unpack_dir = _create_unpack_dir(ctx.work_dir, req, resolved_version) | ||
| if ctx.package_build_info(req).source_resolver is not None: | ||
| server.update_wheel_mirror(ctx, preferred_prebuilt_wheel=wheel_filename) |
There was a problem hiding this comment.
With this code we will choose one wheel file, but then use and serve a different copy.
- Imagine two folders contain pkg-1.0.whl. The filenames match, but one copy has different code or dependencies.
- Bootstrap selects the copy served by the local package server. The downloader finds the same filename in another folder and reuses that copy without checking its contents.
- This PR then makes the local server serve that other copy too. Builds can silently receive different code or dependencies.
The fix is to reuse the exact file that was selected, rather than assuming matching filenames mean matching contents.
There was a problem hiding this comment.
The earlier part happens in wheels.py, lines 510–519: an existing same-named file is reused without downloading the selected URL. That behavior predates this PR
@jenlevy , this work is on feature branch so there is no correct version number currently when we merge to main we will update the version through these code changes. |
Summary
pypi-prebuiltandhook-prebuiltas prebuilt packages in bootstrap, the dependency graph, and build order.download()contract.pre_builtbehavior, and test-mode fallback.Validation
git diff --checkpassed.Closes #1208