build providers: initial support for LXD
Metadata
Current evaluation
Merged initial LXD build provider support for snapcraft, enabling the --use-lxd flag for lifecycle steps and cleaning. Passes CI. Reviewers noted minor dependency and container setup edge cases, which were clarified or deferred.
Suggested action: —
No scores available.
Issue body
Allow running snapcraft with --use-lxd for all the lifecycle steps and
cleaning.
LP: #1805221
Signed-off-by: Sergio Schvezov <sergio.schvezov@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 |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged initial LXD build provider support for snapcraft, enabling the --use-lxd flag for lifecycle steps and cleaning. Passes CI. Reviewers noted minor dependency and container setup edge cases, which were clarified or deferred. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged initial LXD build provider support, enabling the --use-lxd flag for lifecycle steps. Reviewers noted dependency warnings, container errors, and CLI quirks. Maintainer acknowledged needed refactoring for bases compatibility. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to add initial LXD support to snapcraft build providers via the --use-lxd flag. Comments noted dependency conflicts, UI inconsistencies, and container errors. Maintainer acknowledged issues and planned refactoring. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2647 build providers: catch LXD socket error | snapcraft | merged | Merged to catch LXD socket errors in build providers, resolving SNAPCRAFT-WA. Approved by reviewer, passed CI checks, and integrated with a 14-line addition and 6-line deletion across three files. Minor test coverage decrease noted but did not block merge. | |
| #2621 build providers: support injection for LXD | snapcraft | merged | Merged after approval and passing CI. Implements LXD injection support via snapd's new file API, removes legacy mounts, and refactors code for better separation of concerns across 12 files. | |
| #3725 tests: use lxd in clean provider test | snapcraft | merged | Merged into snapcraft/7.0. Enables LXD in provider cleaning tests to align with destructive mode testing. Approved by one reviewer, passed CI checks, and maintained existing code coverage. | |
| #3962 Setup snapd for snapcraft_legacy providers | snapcraft | merged | Merged a fix for failing spread tests caused by missing snapd sockets in LXD containers. The change adopts snapd initialization logic from craft-providers to properly start the service, resolving connection errors. Approved and passed CI. | |
| #2222 lxd: support new style snap injection | snapcraft | merged | Merged after implementing new style snap injection for LXD. Refactored provider logic, normalized code, and removed test duplication. Approved by two reviewers, passed CI, and verified via edge channel testing. | |
| #3115 build providers: ignore missing LXD instance when cleaning project | snapcraft | merged | 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. | |
| #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. | |
| #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. | |
| #403 build(deps): bump craft-providers to 1.19.2 | rockcraft | merged | Merged bumping craft-providers to 1.19.2. Fixes LXD startup failures from base tag changes and enforces disk device requirements in the default LXD profile. Approved by two reviewers with passing CI. | |
| #2964 build providers: remove LXD specific env setup | snapcraft | merged | Merged. Removes LXD-specific environment setup from build providers since Provider._get_env_command already handles it. Approved by reviewer, passed CI, and successfully integrated. |