"<appname> clean" doesn't remove the build instance
Metadata
Current evaluation
Fixed clean behavior: with no parts, craft-provider build instances are removed; part-specific cleans still run inside instances. Resolved by merged PR #88 (commit 2d2dd70e).
Resolution: closed resolved
Reason: PR #88 was merged into main as commit ed378fc, implementing the fix from commit 2d2dd70e. It added ProviderService.clean_instances() and made clean remove managed build instances when no parts are specified.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
When using craft-provider build instances, the command "<appname> clean" should remove the build instance. Instead, it currently launches into the instance and then cleans the lifecycle inside it.
### To Reproduce
Run "<appname> clean".
### part yaml
_No response_
### Relevant log output
```shell
none
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed clean behavior: with no parts, craft-provider build instances are removed; part-specific cleans still run inside instances. Resolved by merged PR #88 (commit 2d2dd70e). | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed in canonical/craft-application#88 (commit 2d2dd70e): clean now removes the build provider when no parts are specified. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by PR #88 (commit 2d2dd70e): clean now removes the build provider when no parts are specified. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The clean command requires refactoring to handle hybrid execution logic and destructive mode support before a fix can be implemented. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. The maintainer deferred resolution, noting the clean command requires refactoring to dynamically handle hybrid managed execution and future destructive mode support. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/craft-application#88
(confidence 100%)
Merged PR #88 explicitly fixes issue #56 by removing provider instances for a clean command without parts.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4806 Build "part" action forces clean build | snapcraft | closed | Fixed by merged craft-parts PR #727, which limits step reruns and cleaning to explicit requests, restoring incremental `snapcraft build <part>` behavior. | |
| #88 fix: clean build provider when no parts are given | craft-application | merged | Merged PR #88 (commit 2d2dd70e, merged into main as ed378fc) by maintainer tigarmo. Adds ProviderService.clean_instances(), converts AppCommand.run_managed to a method taking parsed args, and makes the clean command clean build instances when no parts are given. Fixes #56. | |
| #3284 build providers: rename clean() -> clean_parts() to clarify scope | snapcraft | merged | Merged into master as commit 81ade060c: build provider clean() renamed to clean_parts() (5 files, +9/-9) to distinguish parts cleanup from clean_project() and other build instance cleanup. | |
| #2442 cli: enable cleaning of parts | snapcraft | merged | Merged #2442 (5546c3aab), restoring snapcraft clean <part-name> with build providers so selected parts can be cleaned without recreating the provider. | |
| #1779136 build provider support to clean parts | snapcraft (launchpad) | closed | Build-provider support for cleaning selected parts was restored by merged canonical/snapcraft PR #2442 (commit 5546c3aab), without deleting the provider. |