snap: add remove hook to delete rockcraft data from lxd
Metadata
Current evaluation
Merged #199 in commit 2c6ad423, adding a snap remove hook that deletes Rockcraft's LXD images, instances, and project when the snap is removed.
Resolution: closed resolved
Reason: PR #199 was approved and merged as commit 2c6ad423. The resulting hook cleans Rockcraft data from LXD during snap removal.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
When removing rockcraft, the snap remove hook will delete rockcraft's images, instances, and project from LXD.
Similar to https://github.com/snapcore/snapcraft/pull/4014, except the snapcraft hook is currently very conservative and only deletes base instances and images. The rockcraft remove hook is more useful and deletes all LXD data created by rockcraft.
:heavy_check_mark: the remove hook is tested by `shellcheck`
(CRAFT-1345)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged #199 in commit 2c6ad423, adding a snap remove hook that deletes Rockcraft's LXD images, instances, and project when the snap is removed. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/rockcraft#199 (commit 2c6ad423), adding a snap remove hook that deletes Rockcraft's LXD images, instances, and project data. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged implementation of a snap remove hook that automatically deletes rockcraft's LXD images, instances, and project data upon uninstallation. Approved by two reviewers, passed CI checks, and updated four files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged adds a snap remove hook that automatically deletes rockcraft's LXD images, instances, and projects upon uninstallation. More comprehensive than the snapcraft equivalent, it passes shellcheck and resolves CRAFT-1345. |
Update history
No update history recorded yet.
Related work
-
Related To:
snapcraft#4014
(confidence 95%)
Snapcraft's more conservative LXD remove hook served as the implementation model.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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). | |
| #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). |