repo: handle invalid snaps
Metadata
Current evaluation
Merged changes handling invalid snaps in build-snaps with a clear error message. Adds retries to information fetching for improved network failure debugging. Approved after resolving a minor CI typo.
Suggested action: —
No scores available.
Issue body
Handle invalid snaps listed under `build-snaps`, provide a nice error. Also add retries to the information fetching logic to be able to have easier debugging information when the network goes wrong.
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged changes handling invalid snaps in build-snaps with a clear error message. Adds retries to information fetching for improved network failure debugging. Approved after resolving a minor CI typo. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Implements error handling for invalid build-snaps and adds retries to information fetching for better network error debugging. After resolving a static check failure, the changes were approved and merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged changes handling invalid snaps in build-snaps with a clear error. Adds retries to info fetching for better network debugging. A static check failure was fixed by correcting a typo before merge. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2492 store: handle invalid snap file errors | snapcraft | merged | Merged changes implementing error handling for corrupt or invalid snap files during package data extraction for signing or push. Approved by reviewer, passed CI checks, and successfully integrated to master, resolving SNAPCRAFT-GE. | |
| #1499 repo: make errors based on SnapcraftError | snapcraft | merged | Merged a fix preventing repo-based errors from triggering tracebacks outside debug mode by inheriting from SnapcraftError. Approved by two reviewers, passed CI, and resolves an oversight from PR #1436. | |
| #1692 fix: refresh build snaps if already installed | craft-parts | open | Refreshes build snaps when already installed to reflect channel changes, fixing #496. Has 2 approvals, 1 unresolved review comment, and mostly passing CI. | |
| #3974 snap config: catch more errors when config cannot be retrieved | snapcraft | merged | Merged improvements to snap configuration error handling. Follows up on PR #3971 to catch additional retrieval failures reported by users. Approved by one reviewer, passed CI checks, and updated four files (+30/-10). | |
| #1325 cli: proper error for failed snap command | snapcraft | merged | Merged: returns a proper error code when a snap command fails. Approved by one reviewer with no unresolved comments. Changes span two files (+15/-2). | |
| #2079 repo: catch error updating the package cache | snapcraft | merged | Merged. Catches apt package cache update errors like hash mismatches and host resolution failures. Fixes #2029, #2030, and LP: #1747715 by handling exceptions, clearing the index on hash failures, and allowing Snapcraft to proceed. Includes test updates. | |
| #2507 build providers: improve handling in snap logic | snapcraft | merged | Merged. Improved snap provider logic by cleaning up channel warnings, removing unnecessary sudo calls, and silencing noisy refresh hold commands. Approved, passed CI, and modified 5 files (+131/-73 lines). | |
| #145 inspectors/snap: fix snap refresh inspector | fetch-service | merged | Merged following two approvals and passing CI. The snap refresh inspector was fixed by enforcing stricter artifact format verification, correctly assigning the inspector name, and registering the component across nine files. | |
| #591 Improve error reporting | snapcraft | merged | Merged after improving error reporting to log errors before exiting with status 1. Tests updated and specific handling added for uploading non-existent snaps. Resolved following maintainer review and commit message adjustment. | |
| #3502 snaps: do not validate snaps before install/refresh (Fixes LP#1901733) | snapcraft | merged | Merged into master. Removes redundant snap validation before install and refresh, as the store API already handles branch checks. Approved by two reviewers, passed CI, and resolves Launchpad bug #1901733. |