Skip to content

Conversation

@LalatenduMohanty
Copy link
Member

@LalatenduMohanty LalatenduMohanty commented Dec 19, 2025

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

Co-Authored-By: Claude <claude@anthropic.com>

@LalatenduMohanty LalatenduMohanty requested a review from a team as a code owner December 19, 2025 19:37
@mergify mergify bot added the ci label Dec 19, 2025
…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>
Co-Authored-By: Claude <claude@anthropic.com>

Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
build_error,
)
try:
wheel_url, fallback_version = self._resolve_prebuilt_with_history(
Copy link
Member

Choose a reason for hiding this comment

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

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
Copy link
Member

Choose a reason for hiding this comment

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

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.

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.

Clean ups in --test-mode code

2 participants