lxd: refresh remote container
Metadata
Current evaluation
Fixes snapcraft refresh to correctly target the remote LXD container specified in SNAPCRAFT_CONTAINER_BUILDS instead of defaulting to local. Merged after approval and successful testing.
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`?
-----
With SNAPCRAFT_CONTAINER_BUILDS=foo running snapcraft refresh will actually look for a local container, and refresh that instead of the container on foo.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Fixes snapcraft refresh to correctly target the remote LXD container specified in SNAPCRAFT_CONTAINER_BUILDS instead of defaulting to local. Merged after approval and successful testing. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixes snapcraft refresh ignoring the SNAPCRAFT_CONTAINER_BUILDS remote setting and incorrectly targeting a local LXD container. The change was merged after reviewer validation, with minor console output adjustments deferred for future iteration. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix ensuring snapcraft refresh targets the remote LXD container from SNAPCRAFT_CONTAINER_BUILDS instead of falling back locally. Reviewers validated the change and noted minor logging adjustments for future updates. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1412 lxd: snapcraft refresh in containers | snapcraft | merged | Merged after awaiting prerequisite PR #1627. Implements snapcraft refresh for LXD containers, updating apt cache and packages once to persist changes across builds. Resolves container update persistence issues following successful testing. | |
| #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. | |
| #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. | |
| #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. | |
| #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. | |
| #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. | |
| #1737 cli: pass remote from container_config to clean method | snapcraft | merged | Merged a fix ensuring snapcraft clean correctly targets remote containers when SNAPCRAFT_CONTAINER_BUILDS specifies a remote. The change passes the remote configuration to the clean method. Approved after testing and minor discussion on variable naming. | |
| #1585 lxd: pass SNAPCRAFT_PARTS_URI through into container | snapcraft | merged | Merged to resolve bug 1719951. The change passes the SNAPCRAFT_PARTS_URI environment variable into LXD containers. Approved by one reviewer, passed CI checks, and added 19 lines across two files. | |
| #1865 lxd: always (re-)injects snaps | snapcraft | merged | Merged to fix LP: #1741752 by ensuring LXD containers always re-inject snaps. Changes refactor injection logic, reorganize files, and properly handle side-loaded snap assertions. Approved by reviewer and passed CI. |