← Back to issue list

lifecycle: raise detailed error if mksquashfs fails

View original Github issue

Metadata

Project
snapcraft
Number
#2895
Type
pull request
State
merged
Author
cjp256
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #2895 (d76f73481): mksquashfs failures now raise RuntimeError containing command output instead of only logging it.

Resolution: closed resolved

Reason: PR #2895 was approved and merged; commit d76f73481 added mksquashfs command output to the raised RuntimeError, making failures diagnosable.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Sentry is full of bug reports related to RuntimeError for failing to execute mksquashfs. However, there is no clue as to the failure, because snapcraft just prints it to logger. Instead of logging the error, include the output as part of the raised RuntimeError. If we can get a better idea of the nature of the failures, we can further refine handling here. Signed-off-by: Chris Patterson <chris.patterson@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #2895 (d76f73481): mksquashfs failures now raise RuntimeError containing command output instead of only logging it.
stealth/space-bunny-alpha — closed resolved Merged in canonical/snapcraft#2895 (d76f73481): mksquashfs failures now raise RuntimeError with command output instead of only logging it.
qwen/qwen3.6-35b-a3b — — Merged improvements to error handling when mksquashfs fails. Command output is now included in the raised RuntimeError instead of only logging, aiding debugging of frequent Sentry reports. Approved and passed CI checks.
qwen3.6-35b-a3b-mtp-q6 — — Merged changes improving mksquashfs failure handling by embedding command output in the raised RuntimeError instead of only logging it, enabling faster debugging of reported issues.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1481 cli: better error message for missing mksquashfs snapcraft merged Merged PR #1481 (commit 806fd9215), adding a clearer CLI error when mksquashfs is missing; OS-specific installation help remained future work.
72%