lxd: catch CalledProcessError in _container_run
Metadata
Current evaluation
Superseded by #1647, merged as 71f48bdc9, which improved LXD error handling and propagated exit codes without duplicating nested Snapcraft errors.
Resolution: closed superseded
Reason: The author closed #1641 with “replacing with #1647.” PR #1647 was subsequently merged as commit 71f48bdc9 with the revised error-handling design.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [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`?
-----
Show a nice, clean error if a command fails in the container.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed superseded | Superseded by #1647, merged as 71f48bdc9, which improved LXD error handling and propagated exit codes without duplicating nested Snapcraft errors. | |
| stealth/space-bunny-alpha | — | closed superseded | Superseded by merged PR #1647 (71f48bdc9), which split LXD setup and nested Snapcraft error handling and propagated exit codes. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed and superseded by #1647. Reviewers wanted stderr capture, but the author avoided duplicate messages. The team agreed to split error handling for setup versus nested execution, prompting the replacement PR. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Superseded by PR #1647. Maintainers refined error handling to separate container setup commands from nested snapcraft execution, preventing duplicate output. The PR was closed in favor of the replacement. |
Update history
No update history recorded yet.
Related work
-
Superseded By:
canonical/snapcraft#1647
(confidence 100%)
The replacement PR was merged as commit 71f48bdc9 and delivered the revised LXD error handling.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1647 lxd: better surfacing of errors | snapcraft | merged | Merged in snapcraft#1647 as commit 71f48bdc9, improving LXD error handling so callers return silent, correctly coded errors without printing messages twice. | |
| #1761 lxd: ContainerConnectionError on failed launch/ start | snapcraft | closed | Superseded by #1771, merged as 1a7a4f7d0 to suppress tracebacks when LXD launch/init fails. |