feat: add an API for removing installed instances
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start in the launcher module that exposes inspect_instances / inspect_instance and reuse the same instance-root lookup and validation for a new remove_instance. Read Instance::instance_root to confirm what exactly gets deleted, then add a RemoveInstanceOutcome enum with Removed and NotFound. Done means the method returns NotFound for unknown names, removes the root for known ones, and a test covers both cases.
Written by the indexing model from the issue text.
Description
Problem
Launcher exposes inspect_instances / inspect_instance and Instance::instance_root, but there is no API to remove an installed instance. Launcher UIs that implement instance deletion have to inspect the instance, reach into instance_root, and delete the directory themselves. That duplicates filesystem/layout knowledge outside Elemental and makes cleanup behavior inconsistent between launchers.
Expected API
A removal method on Launcher, for example:
pub async fn remove_instance(&self, instance_name: impl Into<String>) -> Result<RemoveInstanceOutcome>
Possible outcome: Removed, NotFound. The method should own path validation and removal of the instance root. If future instance metadata lives outside the instance directory, this API can clean it up too.
Current workaround
Particle currently calls inspect_instance(name), then tokio::fs::remove_dir_all(instance.instance_root), then reloads the instance list. This works but bypasses the launcher abstraction.
Why this belongs upstream
Instance layout and detection are owned by Elemental. Deletion should follow the same layout rules and be reusable by any launcher built on the crate.
- Dominant language
- Rust
- Stars
- 11
- Forks
- 1
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 52
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ElectronicWave/Elemental
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
ElectronicWave/Elemental#261 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
ElectronicWave/Elemental#266 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ElectronicWave/Elemental#257 ·
Maintainers usually reply within 1 day
-
docs: CommentsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 34/100
ElectronicWave/Elemental#230 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
ElectronicWave/Elemental#227 · 1 comment ·
Maintainers usually reply within 1 day
All issues in ElectronicWave/Elemental
Similar issues
-
area:ui bug effort:low P2 source:agent
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
akitaonrails/ai-memory#2314 ·
Maintainers usually reply within 1 day
-
bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
nledford/Ladderback#809 ·
Maintainers usually reply within 1 day
-
bug low-priority
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
dividebysandwich/rust-dos#1170 ·
Maintainers usually reply within 1 day
-
area:cli area:security bug priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day