lxd: fix the push in container builds
Metadata
Current evaluation
Merged pull request fixing LXD container push builds. Approved by one reviewer, the change refactored test cases for better coverage and updated build logic. Review comments highlighted the need for Travis integration and broader testing beyond unit tests.
Suggested action: —
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`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged pull request fixing LXD container push builds. Approved by one reviewer, the change refactored test cases for better coverage and updated build logic. Review comments highlighted the need for Travis integration and broader testing beyond unit tests. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix for LXD push failures during container builds. The update refactored unit tests to properly cover Cleanbuilder and Project code paths by separating test classes and renaming helper methods, ensuring adequate coverage before merge. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for LXD push failures in container builds. The update refactors unit tests to properly isolate Cleanbuilder and Project test cases, resolving inheritance coverage gaps. CI validation requires PR #1625. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1415 tests: run the tests in travis using LXD containers | snapcraft | merged | Merged changes to run Travis CI tests using LXD containers. The update modifies five files, adding 166 lines and removing 12, after receiving reviewer approval. | |
| #1807 tests: run test_cleanbuild in LXD on Travis | snapcraft | merged | Merged following CI errors and reviewer feedback. Adjusted to run test_cleanbuild in LXD on Travis, reverting a problematic commit to isolate the cleanbuild fix. | |
| #327 Clean up the lxc building in travis | snapcraft | merged | Merged after rebase and approval. The changes cleaned up the LXC build configuration in Travis CI, reducing dependencies. Originally an experiment, the commit was refined and integrated into the codebase. | |
| #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. | |
| #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. | |
| #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. | |
| #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. | |
| #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. | |
| #1758 tests: move the ppa test trigger to lxd | snapcraft | merged | Merged changes moving the PPA test trigger from Docker to LXD to streamline future debugging. The original failure was valid, but the environment shift improves test maintainability. Approved by reviewers and passed all CI checks. | |
| #2095 lxd: proper error classes for container errors | snapcraft | merged | Merged after approval. Refactored LXD container errors into dedicated classes, relocated them to the LXD module, and fixed architecture retrieval error handling. Added corresponding unit tests. Resolves Launchpad bugs #1734233 and #1734235. |