← Back to issue list

Add a prune-instances command

View original Github issue

Metadata

Project
craft-application
Number
#991
Type
issue
State
open
Author
mr-cal
Labels
Type: Enhancement
Created
Updated
Closed
—

Current evaluation

Enhancement to add a prune-instances command for removing non-base provider instances. Upstream craft-providers blockers (#639, #893) are now closed; implementation sits in stalled open PR #1058 with 28 unresolved review comments and failing CI.

Suggested action: keep open

Reason: The issue is valid, maintainer-authored, labeled 'Type: Enhancement', and fully specified (exact command name, three optional flags, unit tests, and a testcraft spread test). Both blockers are now closed: craft-providers#639 landed via PR #930 and #893 via merged PR #925, so the dependencies are satisfied. Implementation already exists in open PR #1058 (+249/-2, 9 files) which closes this issue, so the feature is not yet in main (grep finds no 'prune' in the tree) and the issue must not be closed. The actionable next step is unblocking review on #1058, where 28 unresolved comments and failing lint/fast-test/minimum-deps checks plus a missing changelog entry have left it idle ~150 days. Impact is moderate (user convenience for instance cleanup, required for charmcraft#1042) rather than app-breaking, and complexity is mid-range since it is a new command surface with an option-parsing/permission matrix and a spread test. Confidence is slightly tempered because the PR review state could not be inspected directly and some tooling calls failed on a missing pinned SHA.

Evaluated by: mr-cal-bot

Impact: 45 Quick Win: 20 Complexity: 45 Confidence: 84 Actionability: 82

Issue body

### What needs to get done * Add a new command, `prune-instances` that removes all non-base instances for the active provider using the ProviderService. The following parameters are optional: * `--all-providers` to prune instances from all providers * `--provider=<provider>` to prune for a specific provider * If this isn’t specified, use the same business logic that lifecycle commands use to determine the provider. * `--include-templates` to prune base instances * Unit tests * A testcraft spread test that runs this command to prune LXD and Multipass instances ### Why it needs to get done To allow users to prune instances. Requires https://github.com/canonical/craft-providers/issues/639 Requires https://github.com/canonical/craft-providers/issues/893 Required for https://github.com/canonical/charmcraft/issues/1042

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 45
Quick Win: 20
Complexity: 45
Confidence: 84
Actionability: 82
keep open Enhancement to add a prune-instances command for removing non-base provider instances. Upstream craft-providers blockers (#639, #893) are now closed; implementation sits in stalled open PR #1058 with 28 unresolved review comments and failing CI.
qwen/qwen3.6-35b-a3b
Impact: 40
Quick Win: 16
Complexity: 45
Confidence: 70
Actionability: 75
keep open Enhancement to add a prune-instances command for removing non-base provider instances. Dependencies (craft-providers#639, #893) are now resolved. No maintainer comments.
qwen/qwen3.8-27b
Impact: 45
Quick Win: 25
Staleness: 55
Complexity: 45
Confidence: 75
Support Request: 0
keep open Feature request for a prune-instances command in craft-application to remove non-base provider instances, with optional provider flags and tests. Unimplemented; blocked on craft-providers work; still needed by charmcraft#1042.
qwen/qwen3.6-35b-a3b
Staleness: 75
Complexity: 40
Confidence: 75
Support Request: 5
needs triage Enhancement request to add a prune-instances command with provider filtering and template support. Open for six months with zero comments or maintainer interaction, awaiting prioritization and assignment.
qwen3.6-35b-a3b-mtp-q6
Staleness: 55
Complexity: 45
Confidence: 85
Support Request: 10
needs triage Enhancement to add a prune-instances command for removing non-base instances across providers. Currently untriaged with no maintainer comments or assignee for nearly five months.

Update history

No update history recorded yet.

Related work

  • Blocked By: canonical/craft-providers#639 (confidence 95%)

    Listed as a requirement; now closed, implemented in craft-providers#930 to list provider instances.

  • Blocked By: canonical/craft-providers#893 (confidence 95%)

    Listed as a requirement; now closed with an abstract prune method on Provider plus LXD and Multipass implementations via merged PR #925.

  • Related To: canonical/craft-application#1058 (confidence 92%)

    Open PR 'feat: add prune instances' (+249/-2, 9 files) that closes this issue; stalled on 28 unresolved review comments and failing lint/fast-test/minimum-deps CI.

Related issues

Issue Project State Summary Similarity
#1058 feat: add prune instances craft-application open Adds a prune-instances command (+249/-2, 9 files) for removing non-base provider instances, closing #991. Idle ~150 days with 28 unresolved review comments and failing lint, fast-test and minimum-deps CI checks; changelog entry still missing.
83%
#893 Add a `prune` method for Providers craft-providers closed Provider pruning was added in merged PR #925 (commit 9836260), with LXD and Multipass implementations plus unit and integration tests.
72%
#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.
71%