Refactor(bootstrapper): add force_prebuilt flag, remove _handle_test_mode_failure#894
Open
LalatenduMohanty wants to merge 2 commits intopython-wheel-build:mainfrom
Open
Refactor(bootstrapper): add force_prebuilt flag, remove _handle_test_mode_failure#894LalatenduMohanty wants to merge 2 commits intopython-wheel-build:mainfrom
LalatenduMohanty wants to merge 2 commits intopython-wheel-build:mainfrom
Conversation
b477c60 to
7735109
Compare
…mode_failure Move test-mode fallback logic from _build_from_source to bootstrap(). Add force_prebuilt parameter to _bootstrap_impl for prebuilt retries. Simplifies _build_from_source by removing the code for fallback handling. Closes python-wheel-build#892 Co-Authored-By: Claude <claude@anthropic.com> Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
7735109 to
17aef1b
Compare
Co-Authored-By: Claude <claude@anthropic.com> Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
17aef1b to
f31d17c
Compare
dhellmann
reviewed
Dec 19, 2025
| 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.
| 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.
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 fallback logic from _build_from_source to bootstrap().
Add force_prebuilt parameter to _bootstrap_impl for prebuilt retries.
Also added tests for prebuilt fallback path in bootstrap()
Closes #892 , Depends on #893