You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove dead cache-server fallback from BootstrapRequirementResolver #1297
PR #1289 introduced AgeFallback.NEWEST for multi-version mode, which always returns at least one candidate. This made the cache-server fallback in BootstrapRequirementResolver._resolve_and_extend() unreachable dead code.
The dead fallback creates a misleading picture — it looks like multi-version resolution has a three-layer fallback chain when it actually has one.
Why it's dead code
AgeFallback.NEWEST takes candidates_list[0], and candidates_list is always non-empty because BaseProvider.find_matches() raises on empty. So find_all_matching_from_provider() never returns [] in multi-version mode, and this block never executes:
Before #1289, multi-version mode used the equivalent of AgeFallback.NONE (returned [] when all candidates were too old), so the cache fallback was reachable. NEWEST replaced that role.
What to remove
src/fromager/bootstrap_requirement_resolver.py
cache_wheel_server_url parameter and attribute from __init__
The dead fallback block in _resolve_and_extend()
The entire _resolve_from_cache_server() method
The finders import (only used by that method)
Simplify the warning log to drop the cache_wheel_server_url reference
src/fromager/bootstrapper/_bootstrapper.py
Remove cache_wheel_server_url=... from the BootstrapRequirementResolver() call
tests/test_bootstrap_requirement_resolver.py
Delete tests that exercise the dead fallback in TestResolveFromCacheServer
Activity
jenlevy commentedon Oct 6, 2026
#1346 addressed in the PR (merged)