Skip to content

Show runtime unhealthy resources as warnings in VS Code - #18973

Merged
Adam Ratzman (adamint) merged 4 commits into
microsoft:mainfrom
mturac:fix/issue-18909
Aug 4, 2026
Merged

Show runtime unhealthy resources as warnings in VS Code#18973
Adam Ratzman (adamint) merged 4 commits into
microsoft:mainfrom
mturac:fix/issue-18909

Conversation

@mturac

@mturac mehmet turac (mturac) commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Description

Treats the RuntimeUnhealthy and FailedToStart resource 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 RuntimeUnhealthy requires changing the host container-runtime state; the mappings are exercised directly in the extension test host.

Fixes #18909

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • Did you have a discussion and approval from the Aspire team before introducing new public API?
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • Did you have a discussion and approval from the Aspire team before introducing new security assumptions or guarantees?
    • No

Copilot AI balanced review requested due to automatic review settings August 3, 2026 20:02
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18973

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18973"

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 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.

@ellahathaway Ella Hathaway (ellahathaway) 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.

Verified that these changes now show an unhealthy resource with warning icons/text:
image

One resource-state consistency issue found.

Comment thread extension/src/editor/AspireCodeLensProvider.ts
Copilot AI review requested due to automatic review settings August 4, 2026 05:09

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

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

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@adamint Adam Ratzman (adamint) 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.

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
Copilot AI review requested due to automatic review settings August 4, 2026 21:41

@adamint Adam Ratzman (adamint) 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.

Verified the exit-code boundary: null and 0 stay warnings; -1 and other non-zero codes are errors across the tree, gutter, and CodeLens.

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.

Review details

  • Files reviewed: 7/7 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@adamint
Adam Ratzman (adamint) merged commit a5fafad into microsoft:main Aug 4, 2026
341 checks passed
@github-actions github-actions Bot added this to the 13.5 milestone Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code Extension shows Runtime Unhealthy as error

4 participants