dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.87k stars 463 forks source link

[WebToolsE2E][Aspire] Running aspire project with Aspire.Confluent.Kafka component and stopping container, the icon of 'Exited' under State for cache and messaging are different. #6569

Open vmykagapuz opened 2 weeks ago

vmykagapuz commented 2 weeks ago

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install VS 17.12 PR VAL
  3. Install Aspire 9.0 GA
  4. Apply Aspire 9.0 latest feed
  5. Install Docker/Podman Desktop

REPRO STEPS

  1. New Project > Aspire Starter App > check 'Use Redis for caching (requires Docker)' > .NET 9.0 > Aspire version 9.0 > Create
  2. Right-click xxx.web project > Add > Aspire package > Aspire.Confluent.Kafka > add a component and try to use it in the code
  3. Open appsettings.json > make changes related to Aspire component, verify you get intellisense for Aspire-related changes
    {
    "Aspire": {
    "Confluent": {
      "Kafka": {
        "Producer": {
          "DisableHealthChecks": false,
          "Config": {
            "Acks": "All"
          }
        }
      }
    }
    }
    }
  4. In the Program.cs of web project, type following codes: builder.AddKafkaProducer<string, string>("myConnection");
  5. Open appsettings.json of xxx.AppHost project, add ConnectionStrings configuration section:
    {
    "ConnectionStrings": {
    "myConnection": "broker:9092"
    }
    }
  6. In your AppHost project, install the Aspire.Hosting.Kafka
  7. Open Program.cs of xxx.AppHost project, add following codes:
    
    var messaging = builder.AddKafka("messaging");

var myService = builder.AddProject() .WithReference(messaging);


8. Build and F5
9. Navigate to Aspire Dashboard and stop the container project for messaging and cache.

**ACTUAL**
The icons of 'Exited' for cache and messaging are different.
![Image](https://github.com/user-attachments/assets/57bcbcb7-01d5-4986-896f-cc64ee859ec4)

**NOTE**
1. Tooltip for cache shows: Container is no longer running
    Tooltip for messaging shows: Container exited
2. This issue also reproduce in .NET8.0 project

**EXPECTED**
The icons for 'Exited' under State when stopping container project should be the same.
balachir commented 1 week ago

I believe this is by design because they exited with different errors, which is illustrated by the different tooltip messages.

joperezr commented 1 week ago

As @balachir shared above, the reason why there are two different icons is because two different exit codes. Keeping this one open as Feature to consider displaying the fact that one had errors in the dashboard (without having to show the tooltip)