Skip to content

[docs] Document orphaned AppHost cleanup in aspire ps and aspire stop - #1439

Merged
David Pine (IEvangelist) merged 1 commit into
release/13.5from
docs-pr-18566-orphan-process-cleanup-8301728d4528ad13
Aug 7, 2026
Merged

[docs] Document orphaned AppHost cleanup in aspire ps and aspire stop#1439
David Pine (IEvangelist) merged 1 commit into
release/13.5from
docs-pr-18566-orphan-process-cleanup-8301728d4528ad13

Conversation

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#18566

@karolz-ms

Targeting release/13.5 based on the source PR milestone 13.5.

Why

PR microsoft/aspire#18566 fixes several process-leak scenarios for aspire-managed processes, including adding proactive orphan cleanup to the aspire ps and aspire stop commands (PsCommand.cs and StopCommand.cs now call OrphanedAppHostCollector.CollectAsync before 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 that aspire ps detects 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 that aspire stop cleans 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.

Generated by PR Documentation Check · auto · 42.3 AIC · ⌖ 11.9 AIC · ⊞ 17.7K ·

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot aspire-repo-bot Bot added the docs-from-code Copilot initiated issue from dotnet/aspire repo label Aug 7, 2026
@IEvangelist
David Pine (IEvangelist) marked this pull request as ready for review August 7, 2026 05:30
Copilot AI lite review requested due to automatic review settings August 7, 2026 05:30

@IEvangelist David Pine (IEvangelist) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated against microsoft/aspire#18566. The best-effort orphan collection performed before aspire ps listing and aspire stop scanning is documented accurately.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ps performs 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.
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1439. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1439 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

@IEvangelist
David Pine (IEvangelist) merged commit 0e51c97 into release/13.5 Aug 7, 2026
11 of 12 checks passed
@IEvangelist
David Pine (IEvangelist) deleted the docs-pr-18566-orphan-process-cleanup-8301728d4528ad13 branch August 7, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants