providers: introduce multipass support (CRAFT-409)
Metadata
Current evaluation
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.
Suggested action: —
No scores available.
Issue body
Add support for Multipass similar to LXD.
To determine provider on linux:
- check CHARMCRAFT_PROVIDER environment variable if in
developer mode.
- check snap configuration if running as snap.
- fall back to platform default.
Update execute_run() to use cwd=pathlib.Path(x) interface.
Add unit tests and a smoke test for Linux & Multipass.
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Introduces Multipass provider support with detection via environment variables, snap configuration, and platform fallback. Updates execute_run() to use pathlib.Path and adds Linux and Multipass tests. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged: Introduced Multipass provider support for Linux, mirroring LXD. Updated detection logic to check env vars, snap config, or fallback. Refactored execute_run() to use pathlib.Path and added tests. |
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. | |
| #2511 build providers: modify the _run signature | snapcraft | merged | Merged changes modifying the _run signature in build providers to return output. Updates the Multipass implementation to wrap execute calls. Approved by reviewer and passed CI checks. | |
| #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. | |
| #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. | |
| #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. | |
| #2288 build providers: use multipass automatically when on darwin | snapcraft | merged | Merged. Automatically enables multipass as the build provider on macOS (darwin). Approved by a reviewer, passed CI checks, and successfully integrated. | |
| #4010 providers: push .bashrc to Multipass instances | snapcraft | merged | Merged. Replaces temporary host file creation with craft-providers.push_file_io to push .bashrc directly into Multipass instances. Approved by two reviewers, passed CI, and merged into main. | |
| #3381 multipass build provider: check if instance exists before deleting | snapcraft | merged | 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. | |
| #484 providers: refactor to better support multiple providers (CRAFT-362) | charmcraft | merged | Merged following two approvals and passing CI. Refactored the providers module into a package introducing a common Provider interface and LXDProvider subclass to accommodate future providers like Multipass. No behavioral changes. Minor naming adjustments applied during review. | |
| #4938 build(deps): bump craft-providers to 1.25.0 | snapcraft | closed | Approved and CI-passing changes to bump craft-providers to 1.25.0 were delayed for Multipass compatibility. The request was closed and superseded by pull request #5006. |