Skip to content

test mode: build failure not recorded when prebuilt fallback succeeds #1166

@LalatenduMohanty

Description

@LalatenduMohanty

When a source build fails in test mode and the prebuilt fallback succeeds, the build failure is not recorded in failed_packages. This means the failure report silently omits packages that couldn't build from source.

Root cause:

In _handle_phase_error, when _handle_test_mode_failure returns a successful SourceBuildResult, the item advances to PROCESS_INSTALL_DEPS without calling _record_test_mode_failure:

fallback = self._handle_test_mode_failure(...)
if fallback is not None:
    item.build_result = fallback
    item.phase = BootstrapPhase.PROCESS_INSTALL_DEPS
    return [item]  # no failure recorded

The existing test test_build_phase_test_mode_fallback_success didn't catch this because it mocks _handle_test_mode_failure and never asserts on failed_packages.

Expected behavior: Build failures should always be recorded, even when a prebuilt fallback succeeds. Test mode exists to surface packages that can't build from source.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions