snap installer: refactor
Metadata
Current evaluation
Merged PR #152 in commit 0e51d9a, refactoring snap_installer without functional changes and adding integration coverage for dangerously installed snaps.
Resolution: closed resolved
Reason: PR #152 was merged as commit 0e51d9a. It replaced get_host_snap_revision() with get_host_snap_info() and laid groundwork for snap assertion work.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
#### Overview
Minor refactor of `snap_installer`.
https://github.com/canonical/craft-providers/pull/151 needs to be reviewed and merged before this PR.
#### Details
No functional changes. This is laying groundwork for the next PR to assert snaps.
Notable changes:
1. New integration test to inject a dangerously installed snap
2. Change `get_host_snap_revision()` to a generic function `get_host_snap_info()`, since I'll soon be needing more data than just the revision.
---
CRAFT-1371
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #152 in commit 0e51d9a, refactoring snap_installer without functional changes and adding integration coverage for dangerously installed snaps. | |
| qwen/qwen3.6-35b-a3b | — | closed resolved | Merged minor refactor of `snap_installer` with no functional changes. Added integration test for dangerously installed snaps and renamed `get_host_snap_revision()` to `get_host_snap_info()`. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Related To:
craft-providers#151
(confidence 100%)
Required prerequisite PR, merged before #152.
-
Related To:
craft-providers#153
(confidence 98%)
Follow-up PR that added assertions for injected snaps.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #121 snap installer: refactor installation logic | craft-providers | merged | Merged PR #121 (commit 8b7dede, merge 58abe9b), refactoring snap installation to install or refresh from the store, support host/store switching, and expand tests. | |
| #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. | |
| #153 snap installer: assert injected snaps | craft-providers | merged | Merged PR #153 as commit b0d058a, adding snap known/ack assertion handling for signed injected snaps while preserving dangerous installation for unsigned snaps. | |
| #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. |