Refactor(bootstrapper): add force_prebuilt flag, remove _handle_test_mode_failure#894
Open
LalatenduMohanty wants to merge 1 commit intopython-wheel-build:mainfrom
Open
Conversation
17aef1b to
f31d17c
Compare
dhellmann
reviewed
Dec 19, 2025
src/fromager/bootstrapper.py
Outdated
| build_error, | ||
| ) | ||
| try: | ||
| wheel_url, fallback_version = self._resolve_prebuilt_with_history( |
Member
There was a problem hiding this comment.
We shouldn't need to resolve again, we have the version we want, we should just be able to call _bootstrap_impl again with the force flag set to true.
src/fromager/bootstrapper.py
Outdated
| fallback_error, | ||
| exc_info=True, | ||
| ) | ||
| # Record the original build error, not the fallback error |
Member
There was a problem hiding this comment.
We need to record the original error even if the fallback is successful. We could also record the fallback error, as additional information, because it would be useful to know that we weren't able to do anything at all for the package.
Member
Author
There was a problem hiding this comment.
Have changed the code as per your suggestion.
3ffb492 to
3d7eb22
Compare
…prebuilt flag Move test-mode prebuilt fallback from _build_from_source into bootstrap(). On build failure, bootstrap() now records the error and retries via _bootstrap_impl(force_prebuilt=True), which resolves and downloads a pre-built wheel internally. This removes _handle_test_mode_failure and the req_type parameter from _build_from_source. Closes: python-wheel-build#892 Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
3d7eb22 to
6663428
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move test-mode prebuilt fallback from _build_from_source into bootstrap().
On build failure, bootstrap() now records the error and retries via
_bootstrap_impl(force_prebuilt=True), which resolves and downloads a
pre-built wheel internally. This removes _handle_test_mode_failure and
the req_type parameter from _build_from_source.
Also added tests for prebuilt fallback path in bootstrap()
Closes #892 , Depends on #893