microsoft / microsoft/aspire

Add Suspended state for projects/Executables

Open
#9,321 7 comments 0 reactions 0 assignees View on GitHub
area-app-model area-dashboard area-orchestrator area-tooling
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

### Scenario
1. Run Aspire application from Visual Studio or VS Code.
2. Switch to VS, right-click on one of the projects that belong to the running application, choose "Rebuild"
3. Observe Aspire dashboard

### Expected
The dashboard should indicate that the project is not running when it is being rebuild
- Resource state should be different from "Running"
- Process ID should disappear (the old process ID is no longer valid)
- The project should be considered "unhealthy"

### Actual
When the project is being rebuilt, there is no change to the project state in Aspire dashboard. This includes the case if the rebuild fails, which may take developer a long time to remedy.

### Describe the solution you'd like

I propose we introduce a new state for projects/Executables: Suspended

1. When rebuild starts, the Executable goes into Suspended state. There is new notification type for this that the IDE sends to DCP, which in turn notifies the Aspire dashboard.
2. The IDE needs to send a Suspended notification for all active debug sessions that are affected by project rebuild.
3. In Suspended state
a. The project/Executable is not running. Process ID is no longer available.
b. The project is considered unhealthy.
b. Dashboard can still request logs, but stop/restart gestures should be disabled.
4. From Suspended state the Executable can only transition to Exited state, or Running state (upon receiving Session Terminated, or Process Restarted notifications, respectively).

### Additional context

The work required here spans DCP, IDE execution protocol, VS/VS Code/other IDEs that might support this scenario, Aspire dashboard and Aspire resource health.

@LittleLittleCloud @danegsta @JakeRadMSFT @JamesNK @adamint @rafaelldi FYI

Contributor guide

Open the contributing guide

Research direction

Start by tracing the DCP execution protocol between the IDE, Aspire dashboard, and Aspire resource health handling. Define the Suspended state and its notification transitions across Visual Studio, VS Code, and other supporting IDEs; done means rebuilds clear the process ID, mark the resource unhealthy, preserve log access, and disable stop/restart gestures.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, vscode
Domain
devtools, observability, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.