multipass build provider: check if instance exists before deleting
Metadata
Current evaluation
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.
Suggested action: —
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 |
|---|---|---|---|---|
| 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Adds an exists() check before deleting Multipass instances to prevent errors when the instance is already removed. Maintainers discussed future enhancements but approved the fix. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2293 build providers: use the new snapcraft: remote for multipass | snapcraft | merged | Merged into master. Updates the multipass build provider to use the new snapcraft: remote, removing static base mappings and delegating error handling to multipass. Approved by reviewers and passed CI. | |
| #2100 build_providers: new build provider using multipass | snapcraft | merged | Merged pull request introducing the build_providers package and MVP multipass integration for snapcraft. Approved by two reviewers despite reported naming inconsistencies and a launch crash, accepted as initial implementation. | |
| #2258 build providers: snapcraft images for multipass | snapcraft | merged | Implemented snapcraft build images for multipass environments with a Darwin workaround. Merged after reviewer approval and passing CI checks, adding 239 lines across 7 files to resolve LP #1791821. | |
| #491 providers: introduce multipass support (CRAFT-409) | charmcraft | merged | Merged. Adds Multipass provider support with detection via env var, snap config, or platform default. Updates execute_run() to use pathlib.Path and adds tests. Approved by two reviewers, passed CI, and modified 10 files. | |
| #2869 build providers: use multipass from stable | snapcraft | merged | Merged update to consume Multipass 1.0 from the stable channel for build providers. Approved by one reviewer, modifying four files with minimal changes. | |
| #211 multipass: better error handling when images are unavailable | craft-providers | open | Enhancement to improve error handling and user guidance when Multipass snapcraft images are unavailable or unsupported on non-amd64 architectures. Currently open with maintainer discussion and downstream reports. | |
| #1806470 Does not handle multipass instance being deleted | snapcraft (launchpad) | closed | Closed without resolution. Snapcraft stalls when an externally deleted Multipass instance is not purged. No fix was implemented, indicating the issue was abandoned. | |
| #2694 multipass: fix setup exception when multipass is not found in PATH | snapcraft | merged | Merged fix for multipass setup failure when binary is installed but missing from PATH. Raises SnapcraftEnvironmentError with PATH guidance, refactors wait loop to reduce complexity, and resolves SNAPCRAFT-10S. | |
| #1810915 snapcraft can't tell when multipass is installed but disabled | snapcraft (launchpad) | open | Snapcraft fails to detect a disabled multipass snap, prompting to install it and then erroring out. Reported against multipass 2018.12.1 / ~2019 snapcraft; untriaged, 0 comments, no labels, inactive for ~7.6 years. |