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.55k stars 389 forks source link

[WebToolsE2E][Aspire] There are some errors "failed to copy log file to destination" in CMD when click the "View" button of "Container" in Aspire Starter Application with Redis after installing the latest Aspire 8.1 #4589

Closed Rita003 closed 2 months ago

Rita003 commented 2 months ago

REGRESSION INFO: Work in SDK 8.0.302 + Aspire 8.0.1

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install SDK 8.0.302
  3. Install Aspire 8.1.0-preview.1.24318.9

REPRO STEPS

  1. Create an Aspire Starter Application with Redis in CMD.
    dotnet new aspire-starter --use-redis-cache -o AspireRedis
    cd AspireRedis\AspireRedis.AppHost
    dotnet run
  2. Manually go to url https://localhost:xxx/, on the dashboard, click the Logs "View" button of "Container"

NOTE

  1. This issue doesn't repro after installing the previous build of Aspire 8.1

ACTUAL The CMD has some errors when click the "View" button of "Container" Screenshot 2024-06-19 173519

fail: Aspire.Hosting.Dcp.start-apiserver.api-server.logstorage[0]
      failed to copy log file to destination    {"Kind": "usvc-dev.developer.microsoft.com/v1, Kind=Container", "Name": "cache", "UID": "ca871be2-07b7-40b0-85b9-64ee045236a4", "Source": "startup_stderr", "Follow": true, "error": "io: read/write on closed pipe"}
fail: Aspire.Hosting.Dcp.start-apiserver.api-server.logstorage[0]
      failed to copy log file to destination    {"Kind": "usvc-dev.developer.microsoft.com/v1, Kind=Container", "Name": "cache", "UID": "ca871be2-07b7-40b0-85b9-64ee045236a4", "Source": "startup_stdout", "Follow": true, "error": "io: read/write on closed pipe"}

EXPECTED CMD does not have any error when click the "View" button of "Container"

mitchdenny commented 2 months ago

Thanks for reporting. @danegsta this is the issue I mentioned on teams. I'll assign to you for now since I think this is a DCP issue. For confirmation I cloned down the commit before the latest DCP update and it works fine.

danegsta commented 2 months ago

Just merged a DCP build with a fix for this.