Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WebToolsE2E][Aspire] Running aspire project using CLI, the "Finished" status is marked red when clicking the Stop button of a project under Actions. #6521

Open
vmykagapuz opened this issue Oct 28, 2024 · 14 comments

Comments

@vmykagapuz
Copy link

vmykagapuz commented Oct 28, 2024

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install SDK 9.0 GA
  3. Install Aspire 9.0 GA
  4. Install VS or VSCode

REPRO STEPS

  1. Open Command Prompt, run the following code to create an aspire starter app
    dotnet new aspire-starter -o aspire1
  2. Run the following command:
    cd aspire1/aspire1.AppHost
    dotnet run
  3. Open any url to go dashboard
  4. Click the 'Stop' button any project under Actions

ACTUAL
Run the project using CLI, the "Finished" status under State is marked in red.
Image

EXPECTED
Run the project using VS and VS Code, the "Finished" status under State is marked in gray.
Image

@vmykagapuz
Copy link
Author

vmykagapuz commented Oct 28, 2024

This issue is the same with the issue #6203 but that one is marked as already fixed.

@balachir balachir added this to the 9.0 milestone Oct 28, 2024
@joperezr
Copy link
Member

Sounds like this might be an inconsistency of how dcp handles the projects that are launching? Or perhaps something different in app model? cc: @karolz-ms @mitchdenny

@karolz-ms
Copy link
Member

@balachir @joperezr I assume this is not a ship-stopper for 9.0?

@joperezr
Copy link
Member

I don't think so either, but it would be good to understand what the issue is and see if this is something we can fix in our first servicing

@karolz-ms
Copy link
Member

Agreed

@davidfowl
Copy link
Member

davidfowl commented Oct 28, 2024

The icon change is by design, a change by @drewnoakes

@joperezr
Copy link
Member

Ok, let's review today in our workitem meeting and then either close if by design or update milestone + Priority if not as this is not blocking for 9.0.

@drewnoakes
Copy link
Member

I changed it to be grey in #6231:

Image

I'm not sure how it ended up red. Perhaps @adamint knows, as he made some changes to statuses when working on health checks.

@drewnoakes
Copy link
Member

The code hasn't changed since my PR:

if (resource.TryGetExitCode(out var exitCode) && exitCode is not 0)
{
// Process completed unexpectedly, hence the non-zero code. This is almost certainly an error, so warn users.
icon = new Icons.Filled.Size16.ErrorCircle();
color = Color.Error;
}
else if (resource.IsFinishedState())
{
// Process completed successfully.
icon = new Icons.Regular.Size16.RecordStop();
color = Color.Info;
}

The icon in the screenshot looks like ErrorCircle, which would suggest a non-zero exit code.

@vmykagapuz what tool tip do you see on the state cell? It will tell you if the exit was unexpected and the exit code if it was non-zero.

@danmoseley
Copy link
Member

Should there be a way (hover?) to see the actual exit code?

@davidfowl
Copy link
Member

Details view?

@drewnoakes
Copy link
Member

The state cell's tool tip does show the exit code too, if non-zero.

internal static string GetResourceStateTooltip(ResourceViewModel resource, IStringLocalizer<Columns> loc)
{
if (resource.IsStopped())
{
if (resource.TryGetExitCode(out var exitCode) && exitCode is not 0)
{
// Process completed unexpectedly, hence the non-zero code. This is almost certainly an error, so warn users.
return loc.GetString(nameof(Columns.StateColumnResourceExitedUnexpectedly), resource.ResourceType, exitCode);
}
else
{
// Process completed, which may not have been unexpected.
return loc.GetString(nameof(Columns.StateColumnResourceExited), resource.ResourceType);
}
}

@vmykagapuz
Copy link
Author

@drewnoakes Regarding to the tool tip you mentioned, it shows "Project exited unexpectedly with exit code 1"
Image

@davidfowl davidfowl modified the milestones: 9.0, Backlog Oct 29, 2024
@davidfowl
Copy link
Member

Moving to the backlog. This isn’t a blocker. We should understand why dcp doesnt gracefully shutdown processes though.

cc @karolz-ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants