[do not review] Fix stale AppHost running state after debug session ends#17965
Draft
ellahathaway wants to merge 1 commit into
Draft
[do not review] Fix stale AppHost running state after debug session ends#17965ellahathaway wants to merge 1 commit into
ellahathaway wants to merge 1 commit into
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17965Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17965" |
Member
|
ensure there is an e2e test here @ellahathaway - have an agent check it fails before the fix |
64c4b42 to
3438db3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The VS Code Aspire extension kept showing an AppHost as "running" in its tree view after the user stopped an F5 debug session.
Root cause
aspire ps --followreports a stopped event only as an incremental delta. When a debug session ends the AppHost is hard-killed, so the live follow stream never emits its stopped delta and keeps reporting the AppHost as running. A fresh one-shotaspire pssnapshot is authoritative (the AppHost is gone), but nothing triggered one on debug stop.Fix
pspolling with an authoritative one-shotaspire pssnapshot, then attach the--followstream, so the repository reconciles to ground truth on every (re)start.psstream is restarted, replacing the stale follow with a fresh authoritative snapshot that reconciles the stopped AppHost out of the tree.psstream on debug stop instead of doing a full workspace rediscovery.Testing
yarn run compile-tests,yarn run compile,yarn run lintall green.Draft while remaining unit test work is finished.