← Back to issue list

build providers: initial support for LXD

View original Github issue

Metadata

Project
snapcraft
Number
#2509
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #2509 (commit 067024732) adding initial LXD build-provider support: `snapcraft --use-lxd` runs all lifecycle steps and clean inside an LXD container. Released via beta/lxd channel; LP bug #1805221 closed.

Resolution: closed resolved

Reason: The PR was approved by 2 reviewers and merged to master as commit 067024732 ("build providers: initial support for LXD (#2509)"), which introduced the _lxd provider (_lxd.py) and --use-lxd support for lifecycle and clean steps, resolving LP bug #1805221. Follow-up work included #2529 (idempotent destroy) and #2535 (pylxd warnings).

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Merged PR #2509 (commit 067024732) adding initial LXD build-provider support: `snapcraft --use-lxd` runs all lifecycle steps and clean inside an LXD container. Released via beta/lxd channel; LP bug #1805221 closed.
stealth/space-bunny-alpha — closed resolved Merged PR #2509 via commit 067024732, adding initial LXD build-provider support so --use-lxd runs all lifecycle steps and cleaning.
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.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft (launchpad)#1805221 (confidence 95%)

    LP bug 'Build environment with lxd (--use-lxd)' referenced in the commit message; closed by this work.

  • Likely Fixed By: snapcraft#2529 (confidence 70%)

    Follow-up: idempotent container destroy for LXD, addressing instance cleanup issues raised in review.

  • Related To: snapcraft#2535 (confidence 65%)

    Follow-up commit e5fc29a9c removing pylxd attribute warnings in the new LXD provider.

Related issues

Issue Project State Summary Similarity
#1805221 Build environment with lxd (--use-lxd) snapcraft (launchpad) closed LXD build-provider support was implemented and merged in snapcraft PR #2509 (commit 067024732, "build providers: initial support for LXD"), making `snapcraft --use-lxd` run lifecycle steps and clean in an LXD container. Bug closed.
87%
#2621 build providers: support injection for LXD snapcraft merged Merged as d59622a81, adding LXD snap injection through snapd's file API, replacing mount-based injection with file pushes, and refactoring provider concerns.
77%
#9 providers: add build provider support (CRAFT-28) rockcraft merged Merged build-provider support via commit be6dec45, integrating craft-providers to run builds on LXD. User messages and provider log retrieval were deferred to follow-up work.
76%
#3725 tests: use lxd in clean provider test snapcraft merged Merged PR #3725 (commit 61aaff6fc) into snapcraft/7.0, enabling LXD in provider-cleaning unit tests so they match destructive-mode test runs. Approved by one maintainer reviewer.
74%
#2249 build providers: provide support to shell in snapcraft merged Merged PR #2249 (commit 9f5640b17) adding a shell() method to snapcraft build providers, enabling interactive 'shell into' the Multipass/LXD build instance.
73%
#52 lxd: add snapshot support (CRAFT-144) craft-providers merged LXD snapshot support was merged in canonical/craft-providers#52 via commit 2ddab88 (implementation 5d49777), adding CRAFT-144 functionality.
73%
#3141 build providers: use LXD-provided DNS by default snapcraft merged Merged in canonical/snapcraft#3141 via commit 0a9fe51ad, making build providers use LXD-provided DNS through systemd-resolved and restart networkd without restarting containers.
72%
#2647 build providers: catch LXD socket error snapcraft merged Merged PR #2647 as commit d1902b8cb, adding error handling for LXD socket failures in build providers.
72%
#1364 lxd: Inject snapcraft and core snaps into the container snapcraft merged Merged PR #1364 as 99f5598ac, injecting the host's Snapcraft and core snaps into LXD containers so builds no longer use a mismatched Xenial archive version.
72%
#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.
72%