cli: catch craft-provider errors
Metadata
Current evaluation
Merged after approval, adding CLI error handling for craft-provider failures. Resolves #4262 and CRAFT-1898. Passed CI checks and achieved 100% diff coverage across two modified files.
Suggested action: —
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `make lint`?
- [x] Have you successfully run `pytest tests/unit`?
-----
Resolves #4262
(CRAFT-1898)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged after approval, adding CLI error handling for craft-provider failures. Resolves #4262 and CRAFT-1898. Passed CI checks and achieved 100% diff coverage across two modified files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into main. Implements CLI error handling for craft-provider failures, resolving #4262. Changes passed linting and unit tests with 100% coverage. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged CLI changes to catch craft-provider errors, resolving issue #4262. The fix achieved 100% test coverage and was integrated into main by maintainer mr-cal. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4419 cli: catch craft-provider errors | snapcraft | merged | Merged a cherry-picked bugfix to catch craft-provider errors in the CLI. Approved, passed CI, and integrated into the hotfix/7.5 branch after resolving initial dependencies. | |
| #86 providers: use ProviderError from craft-providers | rockcraft | merged | Merged adoption of ProviderError from craft-providers. Replaced custom error handling with centralized exceptions, added error catching, and included comprehensive tests. Approved and passed CI. | |
| #504 providers: improve error handling (CRAFT-472) | charmcraft | merged | Improved error handling for provider-generated exceptions by adding try/except blocks for LXD and Multipass, chaining exceptions, and adding test coverage. Merged after approval and passing CI checks. | |
| #3943 providers: use new craft-providers interface | snapcraft | merged | Merged to main. Replaced internal Provider classes with the craft-providers interface and consolidated the providers module. Approved after passing CI and spread tests. Coverage dropped 0.15% with 100% diff coverage; unrelated test failure tracked in PR #3944. | |
| #2483 cli: Handle legitimate provider exec errors | snapcraft | merged | Merged CLI update that handles legitimate provider execution errors without raising exceptions. Resolves SNAPCRAFT-FK, SNAPCRAFT-EF, and SNAPCRAFT-E5. Approved by reviewer and merged with 123 additions and 13 deletions across nine files. | |
| #363 feat: many improvements to error handling/reporting | craft-application | merged | Merged after resolving a craft-cli dependency. Adds error handling improvements: standard exceptions, normalized validation messages, BuildPlanner updates, and doc URLs. Approved by two reviewers and passed CI. | |
| #4192 requirements: bump craft-providers | snapcraft | merged | Bumped craft-providers dependency. PR approved, passed CI, and merged into main. Unrelated test failures were deferred to separate PRs. | |
| #3682 cli: fix help command legacy fallback | snapcraft | merged | Merged fix for the CLI help command legacy fallback. Handles craft-cli's ProvideHelpException to standardize help output. Approved, passed CI, and achieved 100% diff coverage before merging into the 7.0 branch. | |
| #1098 build: update craft-providers | rockcraft | merged | Merged update to the craft-providers dependency to resolve recurring snapd watch errors in spread tests. Approved by two reviewers and passed CI checks. The change modifies three files with minor adjustments. | |
| #4551 build(deps): bump craft-providers to 1.22.0 | snapcraft | merged | Merged dependency update bumping craft-providers to 1.22.0, resolving Launchpad bug #2051567. The three-file change passed CI and code coverage checks, received two approvals, and was successfully merged. |