← Back to issue list

lxd: use a unique temporary folder

View original Github issue

Metadata

Project
snapcraft
Number
#1519
Type
pull request
State
merged
Author
kalikiana
Labels
Created
Updated
Closed

Current evaluation

Merged to resolve parallel snapcraft cleanbuild failures by moving the temporary folder initialization to the constructor. Removed the is_snap condition, relocated tests, and passed CI review. Modified 5 files.

Suggested action:

No scores available.

Issue body

See the [problem report in the forum](https://forum.snapcraft.io/t/cant-do-two-cleanbuilds-at-once/1883). `snapcraft cleanbuild` or `SNAPCRAFT_CONTAINER_BUILDS=1 snapcraft` can currently fails when used multiple times in parallel and the snapcraft snap is used. I'm moving the temporary folder to the constructor so that it becomes accessible to tests. It's also a prerequisite to #1302 using folder in the non-snap case so I dropped the `is_snap` condition. Also, I moved the tests from commands.test_snap because they're testing behavior, not command usage.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged to resolve parallel snapcraft cleanbuild failures by moving the temporary folder initialization to the constructor. Removed the is_snap condition, relocated tests, and passed CI review. Modified 5 files.
qwen3.6-35b-a3b-mtp-q6 Merged a fix for parallel snapcraft cleanbuild failures by moving the temporary folder to the constructor. This improves test accessibility, removes an unnecessary snap condition, and enables related functionality.
qwen3.6-35b-a3b-mtp-q6 Merged a fix for parallel snapcraft build failures by moving the temporary folder to the constructor. This ensures test accessibility, removes the is_snap condition, and prevents conflicts during concurrent cleanbuilds.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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.
76%
#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.
74%
#1434 lxd: clean with no parts should only delete snapcraft merged Merged. Updates snapcraft LXD handling so running clean without arguments only deletes container resources instead of executing commands inside them. Approved by one reviewer and merged.
74%
#1655 lxd: distinguish argless clean from clean -s pull snapcraft merged Merged fix for bug 1727445 distinguishing argless snapcraft clean from snapcraft clean -s pull in LXD. Approved by one reviewer, passed CI, and verified via manual testing. Changes span three files with a minimal diff.
73%
#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.
73%
#1577 lxd: don't inject local snaps on a different arch snapcraft merged Merged a fix preventing Snapcraft from injecting local snaps into LXD containers with mismatched architectures. Cross-arch remotes now install snaps from the store. Approved by reviewers and merged after CI checks.
73%
#2098 lxd: wait for on-going refreshes to finish snapcraft merged Merged fix adding a snap watch call before injecting snaps into LXD containers to wait for ongoing refreshes. Resolves race conditions causing build failures in issues #2037 and LP: #1722049. Approved by reviewer and passed CI.
72%
#2509 build providers: initial support for LXD snapcraft merged 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.
71%
#817 lxd: use built-in image streams. snapcraft merged Merged. Replaced custom remote setup for cleanbuilds with LXD built-in image streams, streamlining configuration. Approved by one reviewer with zero unresolved comments. The two-file change (+4/-13 lines) resolves LP #1625787.
71%
#1742 lxd: always remove tmp_dir after execution snapcraft merged Merged fix ensuring the temporary directory is always removed after LXD container builds, preventing disk space waste on errors. Approved and passed CI.
70%