← Back to issue list

snap: add remove hook to delete rockcraft data from lxd

View original Github issue

Metadata

Project
rockcraft
Number
#199
Type
pull request
State
merged
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Merged introduces a snap remove hook that automatically deletes rockcraft-created LXD images, instances, and projects upon uninstallation. Validated with shellcheck and resolves CRAFT-1345.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#207 snap: add configure hook to delete outdated instances from lxd rockcraft merged Merged. Adds a snap configure hook to remove outdated LXD images and instances during Rockcraft installation or refresh. Approved by two reviewers and merged after addressing test failures from spread resources and runner deprecation.
86%
#108 providers: support `rockcraft clean` for a rockcraft environment rockcraft merged Merged implementation of rockcraft clean to delete LXD instances. Follows snapcraft and charmcraft patterns using the Executor object. Approved by reviewers and passed CI checks.
78%
#4014 snap: add remove hook to delete base instances and base images snapcraft merged Merged into main. Adds a remove hook to delete LXD base instances and images when snapcraft is uninstalled. Approved by one reviewer, passed CI checks, and caused no coverage changes. Resolves CRAFT-1488.
75%