Failing to install build-snaps is silently ignored
Metadata
Current evaluation
Triaged as CRAFT-5323; store lookup retries exhaust on HTTP 5xx, return None, and build-snap install is silently skipped. Closed without a fix.
Resolution: closed stale
Reason: The issue was triaged and tracked internally as CRAFT-5323, but no resolving PR or commit exists; it was closed without implementation.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
Hi,
There is an interesting edge case, when installing build-snaps (and probably stage-snaps as well?) fails, but build goes on and (hopefully) fails in the different place.
There is some retry code for the store, that seems to try 5 times and bail out afterwards.
I've checked briefly the code and it seems that any error returned from the store other than `NotFound` is completely ignored and environment ends up without the selected package:
https://github.com/canonical/craft-parts/blob/2adcb0c14d19c0c7271e4feb0b0ea4c93757dbc4/craft_parts/packages/snaps.py#L125-L142
In the end the build fails, but during the plugin environment validation asking user that `go` was not found and there is no `go-deps` part that would satisfy the dependency.
### To Reproduce
The easiest way to reproduce is to wait for the store to be flaky, but it can be also emulated if getting the snap information returns different error than `404`
### part yaml
```shell
any-part:
plugin: go
source: .
build-snaps:
- go/1.23/stable
```
### Relevant log output
```shell
2026-09-16 09:28:46.479 Installing build-snaps
2026-09-16 09:28:47.483 Installing snap: bare
2026-09-16 09:28:48.431 The http error when checking the store for bare is 500 (retries left 5)
2026-09-16 09:28:48.879 The http error when checking the store for bare is 500 (retries left 4)
2026-09-16 09:28:49.515 The http error when checking the store for bare is 500 (retries left 3)
2026-09-16 09:28:49.969 The http error when checking the store for bare is 500 (retries left 2)
2026-09-16 09:28:50.391 The http error when checking the store for bare is 500 (retries left 1)
2026-09-16 09:28:53.875 The http error when checking the store for go is 500 (retries left 5)
2026-09-16 09:28:54.283 The http error when checking the store for go is 500 (retries left 4)
2026-09-16 09:28:54.697 The http error when checking the store for go is 500 (retries left 3)
2026-09-16 09:28:55.091 The http error when checking the store for go is 500 (retries left 2)
2026-09-16 09:28:55.489 The http error when checking the store for go is 500 (retries left 1)
2026-09-16 09:28:55.491 verify plugin environment for part ... build continues here unless something else fails
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| ~deepseek/deepseek-pro-latest | — | closed stale | Triaged as CRAFT-5323; store lookup retries exhaust on HTTP 5xx, return None, and build-snap install is silently skipped. Closed without a fix. | |
| stealth/space-bunny-alpha |
Impact:
55
Quick Win:
27
Complexity:
40
Confidence:
88
Actionability:
82
|
keep open | Store lookup retries for build-snaps exhaust on HTTP 5xx, return None, and snap install is silently skipped; build later fails with a misleading 'go not found' error. Triaged, tracked as CRAFT-5323, fix not yet implemented. | |
| stealth/space-bunny-alpha |
Impact:
49
Quick Win:
31
Complexity:
29
Confidence:
95
Actionability:
89
|
keep open | Store lookup retries for build-snaps exhaust on HTTP 500 errors but return no data, skipping installation and causing misleading later validation failures; triaged and awaiting a fix. | |
| stealth/space-bunny-alpha |
Impact:
57
Quick Win:
36
Complexity:
28
Confidence:
92
Actionability:
87
|
keep open | Store lookup failures after retries are ignored, so build-snaps may remain uninstalled and builds fail later with misleading missing-plugin-environment errors. Triaged as a bug. | |
| qwen/qwen3.6-35b-a3b |
Impact:
60
Quick Win:
33
Staleness:
5
Complexity:
45
Confidence:
80
Support Request:
0
|
needs triage | Build-snap installation failures are silently ignored when store returns non-404 errors, causing builds to continue without required snaps. |
Update history
| Date | Change |
|---|---|
| closed | |
| updated | |
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. |