Skip to content

[docs] Document aspire ps --output snapshot mode - #1910

Open
aspire-repo-bot[bot] wants to merge 1 commit into
release/17.0from
docs/pr-21135-39259261662-1-947982952e5297dc
Open

aspire-repo-bot[bot] wants to merge 1 commit into
release/17.0from
docs/pr-21135-39259261662-1-947982952e5297dc

Conversation

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#21135

@JamesNK

Target branch

Targeting release/17.0 based on the source PR milestone 17.0 (candidate_source: pr_milestone, target_resolution: exact_match).

Why this is needed

microsoft/aspire#21135 fixes a cancellation race in the CLI's tray snapshot-watch stream (TrayWatchStream.cs) and, in its "User-facing usage" section, shows the command that monitoring tools and the native tray use:

aspire ps --output snapshot --follow --format json --non-interactive --nologo

The aspire ps command's --output option (Default / Snapshot) was not documented anywhere on aspire.dev — reference/cli/commands/aspire-ps.mdx only covered --follow and --format. This PR closes that gap and records the behavior change from #21135: normal stream shutdown (including cancellation) now exits with code 0 instead of intermittently reporting a discovery failure.

Triggered signals: pr_body_has_cli_flag_mention (the --output snapshot example in the PR body), pr_body_has_user_facing_section (the "User-facing usage" heading).

What changed

  • src/frontend/src/content/docs/reference/cli/commands/aspire-ps.mdx
    • Added documentation for the --output <Default|Snapshot> option.
    • Added an example invoking aspire ps --output Snapshot --follow --format Json --non-interactive --nologo.
    • Added a note that normal shutdown of the snapshot stream (including cancellation) exits with code 0, and only an actual discovery failure returns a non-zero exit code.

No new pages were created; this is an update to an existing command reference page.

Generated by PR Documentation Check for #21135 · copilot · auto · 113 AIC · ⌖ 12.3 AIC · ⊞ 20.4K · ◷

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 Oct 19, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

Frontend HTML artifact ready

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

VS Code: Open PR #1910 artifacts

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

@alistairmatthews
Alistair Matthews (alistairmatthews) marked this pull request as ready for review October 22, 2026 14:20
Copilot AI balanced review requested due to automatic review settings October 22, 2026 14:20

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No changes required. Ready to go.

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.

🟡 Changes recommended

The documented feature is absent from the matching source release branch, and the exit-code guidance omits protocol-limit failures.

2 open issues
What changed in this PR

This PR extends the existing aspire ps command reference with snapshot-stream guidance for monitoring tools and the native tray, following microsoft/aspire#21135.

Changes:

  • Documents --output <Default|Snapshot>, its default, and required flags.
  • Adds a snapshot-stream command example.
  • Describes shutdown and exit-code behavior.
File Description
src/​frontend/​src/​content/​docs/​reference/​cli/​commands/​aspire-ps.mdx Adds snapshot-mode options, usage, and exit-code guidance.

Review effort: Balanced

Comment on lines +57 to +59
- **`--output <Default|Snapshot>`**

Output mode for `--follow` streaming. `Default` emits one changed AppHost record per NDJSON line, as described for `--follow` above. `Snapshot` emits full AppHost snapshots that also include resource health and heartbeat updates, intended for monitoring tools and the native tray rather than interactive use. `Snapshot` requires both `--follow` and `--format Json`. Defaults to `Default`.
aspire ps --output Snapshot --follow --format Json --non-interactive --nologo
```

Normal shutdown of this stream (including the consumer disconnecting or the command being canceled) exits with code `0`. Only an actual AppHost discovery failure exits with a non-zero code.
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