Skip to content

[docs] Update aspire run/stop graceful shutdown documentation#1291

Merged
IEvangelist merged 4 commits into
release/13.5from
fix-graceful-shutdown-docs-17814-v2-f679de180a79c6e2
Jul 23, 2026
Merged

[docs] Update aspire run/stop graceful shutdown documentation#1291
IEvangelist merged 4 commits into
release/13.5from
fix-graceful-shutdown-docs-17814-v2-f679de180a79c6e2

Conversation

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Summary

Improves the documentation for aspire run and aspire stop to accurately reflect the unified graceful shutdown behavior introduced in microsoft/aspire#17814.

Changes

reference/cli/commands/aspire-run.mdx — Expanded "Stopping the AppHost" section:

  • Replaces the previous two-sentence description with a numbered list that explains the complete three-step shutdown ladder: (1) cooperative cancellation, (2) graceful wait, (3) automatic force-kill.
  • Clarifies that pressing Ctrl+C a second time "collapses the graceful window and starts the force-kill sequence immediately" (more precise than the previous "terminate immediately").
  • Adds a :::note callout explaining the Windows isolated console session behavior for TypeScript/JavaScript AppHosts started with tsx or npm — this is a new behavior from the PR that could otherwise confuse users who notice the extra console window.

reference/cli/commands/aspire-stop.mdx — One-line fix:

  • Corrects "sends a stop signal to the CLI process that started the AppHost" → "sends a graceful stop signal to the running AppHost process", matching how the stop signal now works after the PR unified aspire stop with the aspire run shutdown path.

Related

Triggered signals

  • cli_command_file_changed: RunCommand.cs, StopCommand.cs, DashboardRunCommand.cs — shutdown behavior changed in user-visible ways.
  • new_public_type: WindowsProcessInterop.cs added STARTUPINFOEX struct — internal P/Invoke; documented indirectly via the Windows note callout.

Generated by PR Documentation Check for issue #17814 · 3.2K AIC · ⌖ 21.3 AIC · ⊞ 45.7K ·

- Expand aspire-run.mdx 'Stopping the AppHost' section with the full
  three-step shutdown ladder (cooperative cancellation → graceful wait →
  automatic force-kill) and clarify the second Ctrl+C behavior.
- Add a Windows note about isolated console session for tsx/npm AppHosts.
- Correct aspire-stop.mdx description: signal targets the AppHost process
  directly, not an intermediary CLI process.

Source: microsoft/aspire#17814

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

Frontend HTML artifact ready

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

VS Code: Open PR #1291 artifacts

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

@IEvangelist
IEvangelist marked this pull request as ready for review June 26, 2026 15:14
@IEvangelist
IEvangelist requested review from Copilot and danegsta June 26, 2026 15:14

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 the Aspire CLI reference docs to reflect the unified graceful shutdown behavior for aspire run and the updated semantics of aspire stop, aligning the documentation with recent CLI behavior changes.

Changes:

  • Expanded aspire run “Stopping the AppHost” section to document the 3-step shutdown sequence and the effect of a second Ctrl+C.
  • Added a Windows-specific note about isolated console sessions for Node.js-based AppHosts started via tsx/npm.
  • Clarified aspire stop to state it sends a graceful stop signal to the running AppHost process.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/frontend/src/content/docs/reference/cli/commands/aspire-run.mdx Documents the updated, unified shutdown ladder and adds a Windows note for TS/JS AppHosts.
src/frontend/src/content/docs/reference/cli/commands/aspire-stop.mdx Updates wording to match the current stop signal behavior (graceful stop to AppHost).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@danegsta

Copy link
Copy Markdown
Member

@copilot resource shutdown runs in the background independent of the graceful AppHost shutdown with their own graceful shutdown budgets and the AppHost doesn't wait for resources to exit before exiting itself. So resources are able to complete their own graceful shutdowns even if the AppHost exits quickly OR is killed after the graceful shutdown budget is exceeded. We should avoid conflating AppHost and resource shutdown in these docs.

… stop docs

Co-authored-by: danegsta <50252651+danegsta@users.noreply.github.com>

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@copilot resource shutdown runs in the background independent of the graceful AppHost shutdown with their own graceful shutdown budgets and the AppHost doesn't wait for resources to exit before exitin...

Fixed in 2 places:

  • aspire-run.mdx step 1 no longer mentions resources receiving cancellation signals — it now only states the CLI requests the AppHost stop gracefully.
  • aspire-stop.mdx drops the "ensures a clean shutdown of all resources" clause — it now simply states the command sends a graceful stop signal to the AppHost process.

@IEvangelist IEvangelist reopened this Jul 22, 2026
@IEvangelist
IEvangelist force-pushed the fix-graceful-shutdown-docs-17814-v2-f679de180a79c6e2 branch 2 times, most recently from c149075 to f861bc1 Compare July 22, 2026 21:50
@IEvangelist

Copy link
Copy Markdown
Member

CI Status Note

The CI workflow hasn't been triggered for the latest commit pushed by the Copilot cloud agent on July 22, 2026 (f861bc1). This appears to be because GitHub Actions does not fire pull_request.synchronize events for commits made via the GitHub REST API (as opposed to a standard git push).

Action needed: A maintainer should push an empty or trivial commit to this branch via the standard git protocol (e.g., git commit --allow-empty -m 'chore: trigger CI' && git push) to trigger the CI run on the latest changes.

Alternatively, squashing/rebasing the PR branch would also work.

@danegsta

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request.

…814-v2-f679de180a79c6e2

Co-authored-by: danegsta <50252651+danegsta@users.noreply.github.com>

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request.

Merge conflicts resolved. aspire-run.mdx combines the 🛑 Stopping Aspire. feedback message from release/13.5 with the three-step shutdown sequence. aspire-stop.mdx takes the full release/13.5 version (which includes the --force/persistent resource cleanup docs added in #1387).

@IEvangelist
IEvangelist enabled auto-merge (squash) July 23, 2026 13:12
@IEvangelist
IEvangelist merged commit 288327a into release/13.5 Jul 23, 2026
10 checks passed
@IEvangelist
IEvangelist deleted the fix-graceful-shutdown-docs-17814-v2-f679de180a79c6e2 branch July 23, 2026 13:38
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.

4 participants