Show runtime unhealthy resources as warnings in VS Code - #18973
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18973Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18973" |
There was a problem hiding this comment.
Pull request overview
Updates VS Code resource-state presentation so RuntimeUnhealthy consistently appears as a warning while FailedToStart remains an error.
Changes:
- Uses warning icons and decorations for unhealthy runtimes.
- Adds a localized warning CodeLens label.
- Updates focused tests for tree, CodeLens, and gutter mappings.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
extension/src/views/AspireAppHostTreeProvider.ts |
Maps runtime-unhealthy resources to warning icons. |
extension/src/editor/AspireCodeLensProvider.ts |
Returns the new warning CodeLens label. |
extension/src/editor/AspireGutterDecorationProvider.ts |
Classifies runtime-unhealthy resources as warnings. |
extension/src/loc/strings.ts |
Adds the localized CodeLens warning label. |
extension/src/test/appHostTreeView.test.ts |
Verifies tree warning presentation. |
extension/src/test/codeLens.test.ts |
Verifies CodeLens warning presentation. |
extension/src/test/aspireGutterDecorationProvider.test.ts |
Verifies gutter warning classification. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Adam Ratzman (adamint)
left a comment
There was a problem hiding this comment.
The RuntimeUnhealthy change itself works — I verified warning and recovery across the tree, gutter, and CodeLens in a real Extension Host.
One parity issue is still left in the existing FailedToStart thread: a non-zero exit code (including DCP’s -1 unknown-exit value) is an error in the dashboard, but these three extension mappings now force a warning. Could we make FailedToStart exit-code-aware and add the matching -1/non-zero cases across all three tests?
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a71a491c-f299-4fef-a64e-4a47b443d21d
Adam Ratzman (adamint)
left a comment
There was a problem hiding this comment.
Verified the exit-code boundary: null and 0 stay warnings; -1 and other non-zero codes are errors across the tree, gutter, and CodeLens.

Description
Treats the
RuntimeUnhealthyandFailedToStartresource states as warnings in the VS Code resource tree, CodeLens, and editor gutter, matching the dashboard severity.Focused Extension Host tests cover both states across all three state-to-presentation mappings. A screenshot is not included because reliably producing
RuntimeUnhealthyrequires changing the host container-runtime state; the mappings are exercised directly in the extension test host.Fixes #18909
Checklist