Handle describe --follow disconnects#16271
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16271Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16271" |
There was a problem hiding this comment.
Pull request overview
This PR improves the resilience of aspire describe --follow by treating AppHost backchannel disconnects (e.g., AppHost stop/restart causing JSON-RPC disposal/connection loss) as a normal end-of-stream instead of an unexpected CLI failure, and adds a regression test for the disposed JSON-RPC scenario.
Changes:
- Catch and suppress expected backchannel disconnect exceptions during
describe --follow, returning success. - Add a regression test that simulates a disposed JSON-RPC backchannel during follow mode.
- Extend the test service setup helper to allow per-test backchannel customization.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Aspire.Cli/Commands/DescribeCommand.cs | Handles expected JSON-RPC/backchannel disconnect exceptions in follow mode and exits successfully. |
| tests/Aspire.Cli.Tests/Commands/DescribeCommandTests.cs | Adds a regression test covering the disposed backchannel case; enhances test wiring to customize the fake connection. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Do all the places that have
And the |
|
Same issue with logs only |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🎬 CLI E2E Test Recordings — 72 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #24731002684 |
|
No documentation PR is required for this change. This is a bug fix that improves error resilience in
|

Description
Handle
aspire describe --followdisconnects gracefully when the AppHost stops or restarts.Add a regression test for the disposed JSON-RPC backchannel case.
Fixes #16270
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: