← Back to issue list

fix: fail fast when snap store retries are exhausted for build-snaps

View original Github issue

Metadata

Project
craft-parts
Number
#1739
Type
pull request
State
merged
Author
copilot-swe-agent
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #1739; re-raises final non-404 HTTPError after snap store retry exhaustion, preventing silent build-snaps installation skip and surfacing real store failure.

Resolution: closed resolved

Reason: PR #1739 was merged, fixing #1723 by modifying install_snaps to raise the final non-404 HTTPError once retries are exhausted instead of dropping the error and continuing.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Transient snap store failures during `build-snaps` resolution were retried, but after the last non-404 failure the error was dropped and installation continued without the requested snap. That left the build to fail later with a misleading missing-tool error instead of surfacing the actual store failure. - **Behavior change** - Preserve the existing retry loop for snap store lookups. - Continue mapping `404` to `SnapUnavailable`. - Re-raise the final non-404 `HTTPError` once retries are exhausted so snap installation stops at the real failure point. - **Regression coverage** - Add a unit test covering repeated `500` responses from the snap store. - Assert that `install_snaps()` retries 5 times and then raises, instead of silently skipping installation. - **Effect on callers** - `build-snaps` installation now fails immediately on persistent store-side errors. - Successful resolution paths and existing base-snap channel handling remain unchanged. ```python except exceptions.HTTPError as http_error: if http_error.response.status_code == HTTPStatus.NOT_FOUND: raise errors.SnapUnavailable(...) from http_error retry_count -= 1 if retry_count == 0: raise ``` <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes #1723

Evaluation history

Date Model Scores Action Summary
~deepseek/deepseek-pro-latest — closed resolved Merged PR #1739; re-raises final non-404 HTTPError after snap store retry exhaustion, preventing silent build-snaps installation skip and surfacing real store failure.
~deepseek/deepseek-pro-latest
Impact: 50
Quick Win: 32
Complexity: 25
Confidence: 90
Actionability: 85
needs review Re-raises final non-404 HTTPError after snap store retries exhausted so build-snaps fail fast; adds repeated-500 regression test. Approved, CI pending.
~deepseek/deepseek-pro-latest
Impact: 55
Quick Win: 32
Complexity: 25
Confidence: 80
Actionability: 78
needs review Re-raises final non-404 HTTPError after snap store retries exhausted; adds regression test for repeated 500s. Approved, CI pending.
~deepseek/deepseek-pro-latest
Impact: 55
Quick Win: 40
Complexity: 15
Confidence: 90
Actionability: 85
needs review Re-raises the final non-404 HTTPError once snap store retries are exhausted so build-snaps installation fails fast instead of silently skipping; adds a repeated-500 regression test. Approved, CI passing with slow tests pending.
stealth/space-bunny-alpha
Impact: 38
Quick Win: 19
Complexity: 18
Confidence: 74
Actionability: 62
needs review Re-raises the final non-404 HTTPError once snap store retries are exhausted in build-snaps resolution (was silently returning None), plus a unit test for repeated 500s. Approved, but the Minimum dependencies CI job is failing.
stealth/space-bunny-alpha
Impact: 47
Quick Win: 26
Complexity: 22
Confidence: 93
Actionability: 72
needs review Re-raises persistent non-404 snap-store HTTP errors after five attempts and adds a 500-response regression test. Approved with no unresolved comments, but the minimum-dependencies test suite is failing.
qwen/qwen3.6-35b-a3b
Impact: 65
Quick Win: 34
Complexity: 25
Confidence: 85
Actionability: 70
needs review Re-raises HTTPError after snap store retries exhausted instead of silently dropping it. Clean diff, mostly passing CI (one title-format check failing), awaiting first review.

Update history

Date Change
merged
updated
updated
updated
updated
updated
updated
updated
created

Related work

  • Related To: craft-parts#1723 (confidence 100%)

    This PR directly addresses #1723 as stated in its body (Fixes #1723).

Related issues

Issue Project State Summary Similarity
#1815 repo: handle invalid snaps snapcraft merged Merged PR #1815 in commit 89ce40718: invalid build-snaps now emit clear errors, and snap information fetches retry after network failures.
71%
#751 Silent failure on certain store issues craft-parts open Transient snap-store HTTP 500s exhaust five retries in get_store_snap_info and return None, silently skipping required build-snaps; the triaged bug remains in current code.
71%
#1632 fix: wait when retrying snap store; fail install loudly craft-parts open Fixes silent snap install failures when store queries timeout by removing the store-query gate and adding retries with sleep. Awaiting review; lint check failing, 2 unresolved review comments.
70%