lxd: clean with no parts should only delete
Metadata
Current evaluation
Merged. Updates snapcraft LXD handling so running clean without arguments only deletes container resources instead of executing commands inside them. Approved by one reviewer and merged.
Suggested action: —
No scores available.
Issue body
There's no reason to ever run commands inside a LXD container when `SNAPCRAFT_CONTAINER_BUILDS=1 snapcraft clean` is run without any arguments.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Updates snapcraft LXD handling so running clean without arguments only deletes container resources instead of executing commands inside them. Approved by one reviewer and merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a change to snapcraft that skips command execution inside LXD containers when running clean without arguments. The update ensures the operation only deletes artifacts, removing unnecessary container overhead. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Resolved unnecessary LXD container command execution during snapcraft clean by skipping container operations when no parts are specified. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1762 lxd: delete container only if parts is empty | snapcraft | merged | Merged fix resolving bug 1734145 by updating LXD container cleanup logic to only delete containers when parts are empty. Approved by one reviewer, passed CI checks, and modified two files. | |
| #1655 lxd: distinguish argless clean from clean -s pull | snapcraft | merged | Merged fix for bug 1727445 distinguishing argless snapcraft clean from snapcraft clean -s pull in LXD. Approved by one reviewer, passed CI, and verified via manual testing. Changes span three files with a minimal diff. | |
| #1364 lxd: Inject snapcraft and core snaps into the container | snapcraft | merged | Merged. Injects the host's snapcraft and core snaps into LXD containers to ensure build version consistency. Approved by one reviewer, modifying nine files with 360 additions and 46 deletions. | |
| #1403 lxd: Only remove container if one exists | snapcraft | merged | Merged following two reviewer approvals and passing CI. The update resolves duplicate exceptions during failed LXD container creation by adding a conditional check before attempting container removal. | |
| #1230 lxd: refactor Cleanbuilder into Containerbuild and add Project. | snapcraft | merged | Merged. Refactored Cleanbuilder into a Containerbuild base class and introduced a Project class to manage persistent LXD containers for snap builds. Approved after code review and test fixes. | |
| #1739 lxd: refresh remote container | snapcraft | merged | Fixes snapcraft refresh to correctly target the remote LXD container specified in SNAPCRAFT_CONTAINER_BUILDS instead of defaulting to local. Merged after approval and successful testing. | |
| #412 clean: introduce clean command (CRAFT-62) | charmcraft | merged | Merged. Introduces a clean command to remove LXD containers built by Charmcraft and adds a caplog filter fixture for testing. Approved by two reviewers, the update modifies five files with 116 additions and 4 deletions. | |
| #1263 lxd: pass through commands into the container | snapcraft | merged | Merged a pull request enabling snapcraft to pass build commands into LXD containers. The change allows remote builds to execute within the container environment, addressing path mounting issues during remote snap creation. Approved by one reviewer, though coverage decreased slightly. | |
| #1627 lxd: split container classes into different files | snapcraft | merged | Merged refactoring splitting LXD container classes from lxd.py into separate modules. Improves organization, moves Cleanbuilder methods, de-duplicates env vars, and fixes mocking imports. No functional changes. Approved by two reviewers and passed CI. | |
| #1519 lxd: use a unique temporary folder | snapcraft | merged | Merged to resolve parallel snapcraft cleanbuild failures by moving the temporary folder initialization to the constructor. Removed the is_snap condition, relocated tests, and passed CI review. Modified 5 files. |