dotnet / aspire

An opinionated, cloud ready stack for building observable, production ready, distributed applications in .NET
https://learn.microsoft.com/dotnet/aspire
MIT License
3.78k stars 439 forks source link

[WebToolsE2E][Aspire] When running a console app with Aspire 9.0 added, there is no info on the console page #6266

Open v-bennettyue opened 6 days ago

v-bennettyue commented 6 days ago

REGRESSION INFO: Not repro on Aspire 8.2.1 and Aspire 8.2.0

INSTALL STEPS

Clean machine: Win11 x64 23h2 ENU Install Dev17.12 Preview 3 FB Install Aspire 9.0.0-rc.1.24511.1

REPRO STEPS

File > New project > console app > .NET 8.0 > create Right-click console project > Add > .NET Aspire orchestrator support ~ 9.0 Build and run

Note:

  1. After clicking restart on the dashboard, the logs info appears
  2. The probability of this problem occurring: More than 80%

ACTUAL The state of consoleapp is "Running" not "Finished" Image Navigate to Console page and select consoleapp resource, there are no logs info Image

EXPECTED The state of consoleapp is "Finished" Image Navigate to Console page and select consoleapp resource, there are some logs info Image

davidfowl commented 6 days ago

@JamesNK you have the most context about the most recent logging changes. Can you look into this? Unclear which component has the issue (app model, dcp or the dashboard).

JamesNK commented 5 days ago

I can't reproduce in the latest source code. @v-bennettyue Can you preproduce in latest source?

v-bennettyue commented 4 days ago

@JamesNK I can still repro this issue on Dev17.12 P3 + Aspire 9.0.0-rc.1.24511.1, the probability of this issue occurring now: More than 50%. It is easier to reproduce if you are creating it for the first time.

However, when the log information appears, the state of consoleapp will randomly encounter the following two in the dashboard: Image Image Which one is the expected result?

JamesNK commented 4 days ago

~We can't fix this in RC1. RC1 is done. It's shipped. Testing in RC1 doesn't seem to have any value.~ I think RC1 might still have some room for changes, but this issue seems like low priority and won't meet the bar to get fixed in RC1

Does it occur in the latest source? If it does then I can fix it for the next version we ship.

dbreshears commented 3 days ago

Unable to reproduce this as well. For the expected result question above, based on the repro steps, the state should be Finished and Action should be the start icon since the consoleapp will run to completion. Please do see if that still reproduces in the latest build

v-mengwe commented 1 day ago

More Info: The state of Console C# App project still shows "Finished" in the dashboard if setting a breakpoint in code Console.WriteLine("Hello, World!"); of Program.cs file. But the state of Console C# App project randomly shows "Finished" or "Running" in the dashboard if there is no breakpoint.