snap installer: refactor installation logic
Metadata
Current evaluation
Merged PR #121 (commit 8b7dede, merge 58abe9b), refactoring snap installation to install or refresh from the store, support host/store switching, and expand tests.
Resolution: closed resolved
Reason: PR #121 was merged with commit 8b7dede via merge commit 58abe9b, delivering the CRAFT-1068 snap-installer refactor.
Evaluated by: mr-cal-bot
No scores available.
Issue body
In detail:
- now `inject_from_store` actually *installs* or *refreshes* the snap directly from the store (no more download and local install); as a side effect, no longer is required to have `snapd` in the host for this operation.
- the situation of changing "from host" to/from "from store" is supported, un-installing the previous snap in that case
- improved (and tested) logs in `inject_from_host` and `inject_from_store`
- added `curl` to what is installed during instance setup (as it's needed to communicate to `snapd` in the target environment)
- some tests improved and made more explicit; lot of tests added to unit-test the helper functions
---
CRAFT-1068
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #121 (commit 8b7dede, merge 58abe9b), refactoring snap installation to install or refresh from the store, support host/store switching, and expand tests. | |
| qwen/qwen3.6-35b-a3b | — | closed resolved | Refactored snap installer: `inject_from_store` now installs directly from the store, supports host/store switching, adds `curl` to setup, and improves tests/logs. Resolves CRAFT-1068. |
Update history
| Date | Change |
|---|---|
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #152 snap installer: refactor | craft-providers | merged | Merged PR #152 in commit 0e51d9a, refactoring snap_installer without functional changes and adding integration coverage for dangerously installed snaps. | |
| #251 snap_installer: trim suffix from snap names | craft-providers | merged | Merged PR #251 as commit adc7860, trimming snap-name suffixes from store installs, temporary filenames, and instance config, with integration tests added. | |
| #45 actions: introduce helpers to install & inject snaps (CRAFT-253) | craft-providers | merged | PR #45 (commit 5e8109c, merged via 3573b67) added snap_installer.install_from_store() and inject_from_host() helpers plus installed_snap/core20_lxd_instance test fixtures, with unit and integration tests. |