Skip to content

Commit 51e8279

Browse files
rd4398claude
andcommitted
fix(resolver): catch NoSuchProjectError in wheel server fallback
Fix e2e test failure in test_post_bootstrap_hook.sh by catching NoSuchProjectError when trying wheel servers. The previous fix (423d5c0) only caught ResolverException but not NoSuchProjectError which is raised when a project doesn't exist on a wheel server. Both are legitimate "not found" cases where we should try the next wheel server. Now catches both expected exceptions: - ResolverException: no matching candidates found - NoSuchProjectError: project doesn't exist on server Still lets unexpected failures propagate: - Auth failures (401) - Network errors (ConnectionError) - Plugin bugs (AttributeError, etc.) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Rohan Devasthale <rdevasth@redhat.com>
1 parent 6b06299 commit 51e8279

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/fromager/bootstrap_requirement_resolver.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import logging
1010
import typing
1111

12+
import pypi_simple.errors
1213
import resolvelib.resolvers
1314
from packaging.requirements import Requirement
1415
from packaging.version import Version
@@ -183,8 +184,11 @@ def _resolve(
183184
logger.debug(
184185
f"{req.name}: no prebuilt wheel found on {url}, trying next server"
185186
)
186-
except resolvelib.resolvers.ResolverException as e:
187-
# Only catch "no match found" exceptions - try next server
187+
except (
188+
resolvelib.resolvers.ResolverException,
189+
pypi_simple.errors.NoSuchProjectError,
190+
) as e:
191+
# Only catch expected "not found" exceptions - try next server
188192
# Let auth failures, network errors, and plugin bugs propagate
189193
logger.debug(f"{req.name}: no matching wheel on {url}: {e}")
190194
continue

0 commit comments

Comments
 (0)