← Back to issue list

multipass build provider: check if instance exists before deleting

View original Github issue

Metadata

Project
snapcraft
Number
#3381
Type
pull request
State
merged
Author
cjp256
Labels
—
Created
Updated
Closed

Current evaluation

Multipass cleanup now checks whether an instance exists before deletion, preventing errors when provider metadata remains; merged in #3381 as commit 51e75b4de.

Resolution: closed resolved

Reason: PR #3381 was merged into Snapcraft as commit 51e75b4de, adding an existence check before deleting a missing Multipass instance.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Snapcraft may attempt to delete a multipass instance that does not exist. Check to see if instance exists prior to calling delete. This may occur if Snapcraft sees project provider directory, but the instance does not exist when it goes to clean it. This commit adds a new exists() method to multipass commands. While it's not a "real" multipass command, it seems to be a fair interface to provide without overloading the usage of info() or another command. LP #1904774 Signed-off-by: Chris Patterson <chris.patterson@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Multipass cleanup now checks whether an instance exists before deletion, preventing errors when provider metadata remains; merged in #3381 as commit 51e75b4de.
stealth/space-bunny-alpha — closed resolved Merged PR #3381 (commit 51e75b4de) adds a Multipass instance existence check before deletion, preventing errors when provider state exists but the instance does not.
qwen/qwen3.6-35b-a3b — — Merged a Snapcraft fix adding an existence check before deleting Multipass instances, preventing errors when missing. Addresses LP #1904774. Reviewers suggested extra features and warnings, but the core fix was approved and merged.
qwen3.6-35b-a3b-mtp-q6 — — Merged a fix adding an exists() check before deleting multipass instances, preventing errors on stale provider directories. The validation logic was accepted and merged.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.