feat: upstream snap hooks
Metadata
Current evaluation
Merged as 5bbaf39, adding reusable configure and remove snap hooks to prune obsolete LXD base instances, derived instances, images, and projects.
Resolution: closed resolved
Reason: PR #710 was approved and merged into main as commit 5bbaf39. The resulting configure_hook and remove_hook implementations provide the requested LXD cleanup logic.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [ ] Have you followed the guidelines for contributing?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `tox`?
-----
Applications using craft-providers may inadvertently leave around lxc instances, either when new base instances supersede old ones, or when the application is uninstalled. Add a module implementing logic that applications can use in configure and remove snap hooks to prune these unneeded lxc instances.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged as 5bbaf39, adding reusable configure and remove snap hooks to prune obsolete LXD base instances, derived instances, images, and projects. | |
| qwen/qwen3.6-35b-a3b | — | closed resolved | Upstreamed snap hooks module to prune unneeded LXC instances left by craft-providers during configure/remove hooks. Merged into main after addressing review comments on deduplication and integration tests. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Related To:
craft-providers#1006
(confidence 98%)
Later deduplicated the hook utilities, capturing the follow-up work requested during review.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #709 Upstream snap hooks | craft-providers | closed | Centralized upstream snap hooks in craft-providers via merged PR #710 (commit 5bbaf39), shipping in 2.2.0 as reusable LXD cleanup utilities. | |
| #4014 snap: add remove hook to delete base instances and base images | snapcraft | merged | Merged #4014 in commit 4e41bf0c9, adding an uninstall hook that deletes Snapcraft's LXD base instances and images (CRAFT-1488). | |
| #207 snap: add configure hook to delete outdated instances from lxd | rockcraft | merged | Merged as cbe7699a: added a snap configure hook that removes known outdated LXD images and instances whenever Rockcraft is installed or refreshed (CRAFT-1344). |