lxd: refactor Cleanbuilder into Containerbuild and add Project.
Metadata
Current evaluation
Merged PR #1230 (ce66ca561) replaced Cleanbuilder with a Containerbuild base class and added Project to create and reuse project-named LXD containers.
Resolution: closed resolved
Reason: The pull request was merged as commit ce66ca561, introducing the LXD Containerbuild and Project refactor.
Evaluated by: mr-cal-bot
No scores available.
Issue body
I refactored the Cleanbuilder class into a new base class, Containerbuild and introduced a new class, Project, which creates and re-uses a persistent container named after the project (snap). The "snap" as well as the argumentless command now prompts the user for a containerized build (which in the future will mount folders from the host into the container instead of building off a tarball).
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1230 (ce66ca561) replaced Cleanbuilder with a Containerbuild base class and added Project to create and reuse project-named LXD containers. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1230 (ce66ca561) replaced Cleanbuilder with a Containerbuild base class and added Project to create and reuse project-named LXD containers. | |
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a refactoring that extracts Cleanbuilder into a Containerbuild base class and introduces a Project class for persistent container builds. Minor implementation, CLA, and test issues were resolved prior to merge. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1627 lxd: split container classes into different files | snapcraft | merged | Merged in snapcraft#1627 via d2118855c, splitting LXD container classes into separate modules, relocating Cleanbuilder methods and deduplicating environment setup without functional changes. | |
| #328 New command cleanbuild (using lxd) | snapcraft | merged | Merged via2f6116267 (branch feature/1480144/cleanbuild-lxd): adds the cleanbuild command building in LXD containers, dropping pylxd due to API/Python 3 breakage. Later fixes followed in #1610, #1807 and #2404. | |
| #1762 lxd: delete container only if parts is empty | snapcraft | merged | Merged PR #1762 (dbce9a058), changing LXD cleanup to delete a build container only after all parts are removed, preserving it for targeted cleans and making repeated cleans safe. | |
| #1644 lxd: fix the push in container builds | snapcraft | merged | Merged PR #1644 fixed LXD container-build artifact pushes; the change landed as commit d4a34e07d. | |
| #1587 lifecycle: clean after deleting container | snapcraft | merged | Merged PR #1587 (commit daca4618b): LXD cleanup logic moved into lxd.py's clean() so `snapcraft clean` removes leftover build containers, addressing the forum-reported container-build clean issue. | |
| #1655 lxd: distinguish argless clean from clean -s pull | snapcraft | merged | Merged in snapcraft#1655 (ed32603c7), fixing LXD cleanup so bare clean removes build containers while clean -s pull preserves or recreates them. | |
| #1456 clean up stale containers | snapcraft | closed | Stale LXD build-container cleanup was implemented in merged PR #1587 (commit daca4618b), moving cleanup into the LXD clean lifecycle. | |
| #1263 lxd: pass through commands into the container | snapcraft | merged | Merged #1263 as commit e0f28bd5c, routing snap-building and parts commands through LXD containers so remote/cleanbuild commands run inside the container environment. |