← Back to issue list

build providers: ignore missing LXD instance when cleaning project

View original Github issue

Metadata

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

Current evaluation

Merged PR #3115 (commit 8ce59011a) makes project cleanup ignore missing LXD instances deleted manually.

Resolution: closed resolved

Reason: PR #3115 was approved and merged, adding handling for pylxd's NotFound exception during project cleanup.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When cleaning a project, there may be no underlying container if the user deleted it manually. Catch pylxd's NotFound exception. Fixes SNAPCRAFT-1DB 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 #3115 (commit 8ce59011a) makes project cleanup ignore missing LXD instances deleted manually.
stealth/space-bunny-alpha — closed resolved Merged PR #3115 catches pylxd.NotFound during project cleanup, allowing builds to proceed when an LXD instance was manually deleted.
qwen/qwen3.6-35b-a3b — — Merged fix for SNAPCRAFT-1DB that catches the pylxd.NotFound exception during project cleanup, preventing failures when the LXD instance is manually deleted. Approved and passed CI.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Resolves SNAPCRAFT-1DB by catching pylxd.NotFound exceptions during project cleanup, preventing failures when underlying LXD instances are manually deleted.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2529 build providers: idempotent destroy for LXD snapcraft merged Merged PR #2529 made LXD cleanup idempotent, preventing missing-container errors from masking launch failures; landed as commit 1b2905885.
71%
#1488 lxd: always remove existing device for project folder snapcraft merged Merged PR #1488 in commit 11450b469, ensuring an existing LXD device for the project folder is always removed; it followed up the path fix in #1483.
71%
#2936 build providers: clean up LXD startup message snapcraft merged Merged PR snapcraft#2936 (commit bc605d706) trimmed the misleading LXD cloud-init startup log message, removing an implementation detail that users misread as data being sent to the cloud.
71%
#2964 build providers: remove LXD specific env setup snapcraft merged Merged PR #2964 as ed63a021b, removing redundant LXD environment setup because Provider._get_env_command already handles the build environment.
71%
#419 providers: gracefully handle when LXD not installed (CRAFT-329) charmcraft merged Merged #419 to handle missing LXD: builds now require the provider, while cleanup safely skips container operations when LXD is unavailable.
70%