Parallel installation of snapcraft not passed to LXD instance
Metadata
Current evaluation
Parallel snapcraft installations were not passed to LXD instances, causing version mismatches. Resolved via pull requests #5085 and #5087, addressing upstream craft-application bug #411.
Suggested action: —
No scores available.
Issue body
### Bug Description
It may be useful to install two versions of snapcraft for testing changes to snapcraft itself. In this case, I am working on a new extension and the parallel installation of snapcraft isn't passed to LXD.
Unrelated issue: #4683
### To Reproduce
After building snapcraft, install it in parallel to the existing stable snapcraft:
```
$ sudo snap install --classic --dangerous --name=snapcraft_env ./snapcraft_8.3.0.post10+git8442928db_amd64.snap
snapcraft_env 8.3.0.post10+git8442928db installed
```
Then try to build a snap that uses this the newly developed extension:
```
$ SNAPCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS=1 snapcraft_env -v
Starting snapcraft, version 8.3.0.post10+git8442928db
Logging execution to '/home/farshid/.local/state/snapcraft/log/snapcraft-20240718-095346.533496.log'
*EXPERIMENTAL* extension 'env-injector' enabled
Launching managed ubuntu 24.04 instance...
Starting instance
Starting snapcraft, version 8.3.1
Logging execution to '/tmp/snapcraft.log'
Starting snapcraft, version 8.3.1
Logging execution to '/tmp/snapcraft.log'
Extension 'env-injector' does not exist
Failed to execute snapcraft in instance.
```
### Environment
Ubuntu 23.10
### snapcraft.yaml
```shell
# Refer to https://github.com/canonical/snapcraft/pull/4925 for the extension
name: envtester
base: core24
version: 'demo'
summary: Demonstration of env-exporter program
description: |
envtester is a demo snap to show the env-exporter program use cases
grade: stable
confinement: strict
apps:
myapp:
daemon: simple
environment:
env_alias: myapp
extensions:
- env-injector
command: run.sh
parts:
myapp:
source: .
plugin: dump
# also need to create run.sh
```
### Relevant log output
```shell
-
```
### Additional context
I could not try with multipass as the provider, as I get some strange error, unrelated to the parallel installation:
```
SNAPCRAFT_BUILD_ENVIRONMENT=multipass SNAPCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS=1 snapcraft_env -v
Starting snapcraft, version 8.3.0.post10+git8442928db
Logging execution to '/home/farshid/.local/state/snapcraft/log/snapcraft-20240718-105347.585930.log'
*EXPERIMENTAL* extension 'env-injector' enabled
Launching managed ubuntu 24.04 instance...
Incompatible base detected: Expected OS version '24.04', found '24.10'.
Recommended resolution: Clean incompatible instance and retry the requested operation.
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Parallel snapcraft installations were not passed to LXD instances, causing version mismatches. Resolved via pull requests #5085 and #5087, addressing upstream craft-application bug #411. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed via PRs #5085 and #5087. Parallel snapcraft installations are now correctly passed to LXD managed instances, resolving the extension loading failure. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed via PRs #5085 and #5087. Parallel snapcraft installations are now correctly passed to LXD instances, resolving the reported build failure. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed via PRs #5085 and #5087. Parallel snapcraft installations are now correctly passed to LXD managed instances, resolving the version mismatch during builds. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Parallel snapcraft installation was not passed to LXD instances, causing version mismatches. Fixed via pull requests #5085 and #5087, which ensure the correct snapcraft version is forwarded to managed environments. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1985409 snapcraft-managed lxd containers do not respect parallel installs | snapcraft (launchpad) | closed | LXD containers ignored parallel install instance keys, causing build failures. Fixed and resolved via merged pull requests #5085 and #5087. | |
| #4683 Cannot use parallel installations of snapcraft if a non-aliased version is not installed | snapcraft | closed | Parallel snapcraft installations failed when injecting non-aliased versions due to malformed assertion headers. The bug was fixed by correcting snap name parsing in craft-providers, with the solution merged via PRs #5085 and #5087. | |
| #1997874 SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT doesn't seem to be passed through to lxd container | snapcraft (launchpad) | closed | SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT not being passed to LXD containers was closed and abandoned. No comments, resolution, or fix were provided. | |
| #411 Support snap parallel installs | craft-application | closed | Closed. The initial fix was merged into craft-application, but full parallel snap support requires a follow-up update in craft-providers to correctly parse snap names with underscores. |