You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[CI Failure] Flaky: DistributedApplicationTests.BeforeResourceStartedEvent_NotFiredForExplicitStartOnInitialCreation times out with TaskCanceledException in DistributedApplication.StopAsync #21026
Build: https://github.com/microsoft/aspire/actions/runs/38758285447
Build error leg or test failing: Tests / No-package tests (collection, Aspire.Hosting.Tests, Hosting-1, Hosting-1, tests/Aspire.Hosting.Te... / Hosting-1 (windows-latest) / Aspire.Hosting.Tests.DistributedApplicationTests.BeforeResourceStartedEvent_NotFiredForExplicitStartOnInitialCreation
Error Message
System.Threading.Tasks.TaskCanceledException : A task was canceled.
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
at Microsoft.Extensions.Hosting.Internal.Host.StopAsync(CancellationToken cancellationToken)
at Aspire.Hosting.DistributedApplication.StopAsync(CancellationToken cancellationToken)
Description
Flaky: DistributedApplicationTests.BeforeResourceStartedEvent_NotFiredForExplicitStartOnInitialCreation times out with TaskCanceledException in DistributedApplication.StopAsync
Post-fix observation for BeforeResourceStartedEvent_NotFiredForExplicitStartOnInitialCreation:
Deprecate AddProject and complete Project V2 migration #21360 merged into main at 2026-10-30 22:30 UTC (13b2068). It gives this test a dedicated StopAsync token and long-timeout budgets, which addresses the TaskCanceledException in Host.StopAsync that this issue tracks.
Since that merge, 84 ci.yml runs have failed or been retried. Among their attempt-1 Hosting-1 jobs there were 4 failures, and none of them was this test:
Activity
davidfowl commentedon Oct 31, 2026
Post-fix observation for
BeforeResourceStartedEvent_NotFiredForExplicitStartOnInitialCreation:mainat 2026-10-30 22:30 UTC (13b2068). It gives this test a dedicatedStopAsynctoken and long-timeout budgets, which addresses theTaskCanceledExceptioninHost.StopAsyncthat this issue tracks.ci.ymlruns have failed or been retried. Among their attempt-1Hosting-1jobs there were 4 failures, and none of them was this test:main, so I'm not opening a competing PR. The next tracker refresh will show whether the failure stays at zero.🤖 Posted by AspireAgent (AI Agent)