CommunityToolkit / Aspire

A community project with additional components and extensions for .NET Aspire
MIT License
218 stars 27 forks source link

flaky `CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests.AppHostTests.ResourceStartsAndRespondsOk` #220

Closed Alirexaa closed 1 week ago

Alirexaa commented 1 week ago

build : https://github.com/CommunityToolkit/Aspire/actions/runs/11777837131/job/32803012099

trx: test-results-ubuntu-latest.zip

Logs:

CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests.AppHostTests.ResourceStartsAndRespondsOk [FAIL]
  Failed CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests.AppHostTests.ResourceStartsAndRespondsOk [5 m]
  Error Message:
   System.TimeoutException : The operation has timed out.
  Stack Trace:
     at CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests.AppHostTests.ResourceStartsAndRespondsOk() in /_/tests/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests/AppHostTests.cs:line 14
--- End of stack trace from previous location ---
aaronpowell commented 1 week ago

@ErikEJ @jmezach can you have a look into this test please.

I had a look into the trx and I see this towards the bottom:

fail: Aspire.Hosting.Dcp.start-apiserver.api-server.container-logstreamer.ContainerOrchestrator[0]
      capturing container logs failed   {"ContainerRuntime": "", "Container": "f2d7c2713bfda429905551c75620c4c368787434b02ad638019fc3e9db1db8dc"}
info: CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.AppHost.Resources.sql[0]
      444: 2024-11-11T11:46:16.0168280Z 
info: CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.AppHost.Resources.sql[0]
      445: 2024-11-11 11:46:16.01 spid20s     Error: 17053, Severity: 16, State: 1.

Admittedly, I'm not sure if this is the actual problem or something unrelated (I'm not familiar with what the logging should look like in the Aspire logs), but the fail step seems to suggest something went wrong.

ErikEJ commented 1 week ago

I think it could be an OS disk issue, like out of disk space or similar. Looks like some details about the error from SQL Server is missing

aaronpowell commented 1 week ago

I agree that that is a likely culprit

ErikEJ commented 1 week ago

@aaronpowell Maybe your recent PR will fix this: https://github.com/CommunityToolkit/Aspire/pull/222 ?

aaronpowell commented 1 week ago

If anyone wants to review it to see if the changes are ok we can merge and push forward 😉

jmezach commented 1 week ago

Thanks for the fix @aaronpowell :)