[docs] Document orphaned AppHost cleanup in aspire ps and aspire stop - #1439
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
David Pine (IEvangelist)
left a comment
There was a problem hiding this comment.
Validated against microsoft/aspire#18566. The best-effort orphan collection performed before aspire ps listing and aspire stop scanning is documented accurately.
There was a problem hiding this comment.
Pull request overview
Updates Aspire CLI reference docs to reflect new orphaned AppHost cleanup behavior introduced in microsoft/aspire#18566, ensuring command behavior descriptions match current CLI implementation.
Changes:
- Document that
aspire psperforms best-effort orphaned AppHost cleanup before listing. - Add a note about orphaned AppHost cleanup related to
aspire stop(needs scoping/wording adjustment to match actual behavior).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/frontend/src/content/docs/reference/cli/commands/aspire-ps.mdx | Adds a best-effort orphaned AppHost cleanup note prior to listing results. |
| src/frontend/src/content/docs/reference/cli/commands/aspire-stop.mdx | Adds an orphaned AppHost cleanup note prior to stopping AppHosts (currently overbroad vs implementation). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - For a .NET AppHost that doesn't use the Aspire CLI bundle, cleanup requires Aspire.Hosting 13.5 or later. If the AppHost uses an older version, its version can't be determined, or its project can't be inspected, the command displays a warning and still attempts cleanup. Resources created without the required workload metadata might remain. | ||
| - If the AppHost stops successfully, but persistent resource cleanup fails, the command exits with an error but leaves the AppHost stopped. You can resolve any errors and run `aspire stop --force` again or manually clean up any remaining persistent resources if necessary. | ||
|
|
||
| Before scanning for AppHosts to stop, `aspire stop` also detects and cleans up any orphaned AppHosts whose launching CLI process has died, so leaked processes are removed even if a normal stop can't reach one of them. |
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
Documents changes from microsoft/aspire#18566
@karolz-msTargeting
release/13.5based on the source PR milestone13.5.Why
PR microsoft/aspire#18566 fixes several process-leak scenarios for
aspire-managedprocesses, including adding proactive orphan cleanup to theaspire psandaspire stopcommands (PsCommand.csandStopCommand.csnow callOrphanedAppHostCollector.CollectAsyncbefore listing/stopping). This is a user-visible behavior change to already-documented commands (their output/behavior now differs from what the current docs describe), so the docs need to reflect it.What changed
reference/cli/commands/aspire-ps.mdx: Added a note thataspire psdetects and stops orphaned AppHosts (whose launching CLI has died) before listing, on a best-effort basis.reference/cli/commands/aspire-stop.mdx: Added a note thataspire stopcleans up orphaned AppHosts before scanning/stopping the rest.Both updates are based directly on the PR's changed files and inline comments (
PsCommand.cs,StopCommand.cs), which describe the collector as best-effort so a collection hiccup never fails the command.Files modified
src/frontend/src/content/docs/reference/cli/commands/aspire-ps.mdx(updated)src/frontend/src/content/docs/reference/cli/commands/aspire-stop.mdx(updated)No new pages were created.