cli: introduce --provider
Metadata
Current evaluation
Merged PR #2678 as commit b1bee8d99, introducing a unified --provider option for host, LXD, and Multipass and consolidating provider-specific build and clean flags.
Resolution: closed resolved
Reason: PR #2678 was merged into master as commit b1bee8d99. It introduced --provider, separated provider and build options, reused provider flags for clean, and cleaned up BuilderEnvironmentConfig.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Valid options include `host`, `lxd`, and `multipass`. This approach
is more extendable than the --use-<provider> flags for future providers.
- Split _BUILD_OPTIONS into _BUILD_OPTIONS and _PROVIDER_OPTIONS
- Split add_build_options into add_build_options and add_provider_options
- Convert `clean` command to use `add_provider_options` so it doesn't
duplicate provider flags (--use-lxd, --destructive-mode, etc.).
- Minor cleanup for BuilderEnvironmentConfig:
-- drop is_multipass, no-one uses it
-- document lxd as valid provider
-- rename force_provider to build_provider
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 | Merged PR #2678 as commit b1bee8d99, introducing a unified --provider option for host, LXD, and Multipass and consolidating provider-specific build and clean flags. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2678 (commit b1bee8d99) added a unified --provider option for host, LXD, and Multipass and consolidated provider-specific CLI options. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged into master in #2678, adding a unified --provider option for host, LXD, and Multipass while refactoring provider flags and build-environment configuration. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged into master. Adds a --provider CLI flag for host, lxd, and multipass, replacing legacy flags. Refactors option handling, cleans up configuration, and increases coverage. Approved and passed CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master. Introduces a --provider CLI flag for host, lxd, and multipass. Refactors build and provider option handling, updates the clean command, and cleans up BuilderEnvironmentConfig. Merged with improved test coverage. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #163 providers: add Provider, LXDProvider, and MultipassProvider classes | craft-providers | merged | Merged Provider, LXDProvider, and MultipassProvider classes via commit fa5a5e7, adding simplified provider error handling and integration tests. | |
| #2977 cli: merge build options into provider options | snapcraft | merged | Merged PR #2977 as commit eb6763faa, consolidating provider-specific build options into provider option lists and simplifying CLI option handling. | |
| #2964 build providers: remove LXD specific env setup | snapcraft | merged | Merged PR #2964 as ed63a021b, removing redundant LXD environment setup because Provider._get_env_command already handles the build environment. | |
| #90 Extract common patterns from applications | craft-providers | closed | Added higher-level Provider, LXDProvider, and MultipassProvider classes to reduce boilerplate; merged in PR #163 via commit fa5a5e7. | |
| #925 feat: add prune method | craft-providers | merged | Merged PR #925 as commit 9836260, adding Provider.prune with LXD and Multipass implementations and tests; it closes issue #893. | |
| #9 providers: add build provider support (CRAFT-28) | rockcraft | merged | Merged build-provider support via commit be6dec45, integrating craft-providers to run builds on LXD. User messages and provider log retrieval were deferred to follow-up work. | |
| #238 provider: add `allow_unstable` to Provider base class | craft-providers | merged | Merged as commit 564b789: added `allow_unstable` parameter to Provider.launched_environment() base class and Multipass, promoting LXDProvider's option; Multipass uses it in a follow-up. Documented in changelog. |