Capture smoke tests container after error#8748
Conversation
BenchmarksBenchmark execution time: 2026-06-04 11:32:09 Comparing candidate commit e814d39 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 70 metrics, 1 unstable metrics, 58 known flaky benchmarks, 68 flaky benchmarks without significant changes.
|
## Summary of changes Capture the crash-test container id via a callback the moment the container starts, instead of only through `RunCrashTestAsync`'s return value. ## Reason for change When the crash test exceeded its 4-minute timeout, `WaitForContainerAsync` threw `TaskCanceledException` *before* the return value was assigned, so `crashTestContainerId` stayed `null`. As a result the `finally` block never cleaned up or dumped logs for that container. The orphaned container kept the Docker network alive, surfacing as a confusing `Failed to remove network ... has active endpoints` warning that masked the real failure. ## Implementation details - `RunCrashTestAsync` now reports the id through an `onContainerStarted` callback right after the container starts; return type changed from `Task<string>` to `Task`. - The 4-minute timeout is intentionally left fatal — a crash + report should complete in seconds, so a timeout is genuine signal that the container hung, not CI slowness. ## Test coverage Covered by the existing artifact smoke tests that exercise the crash-test path. ## Other details This makes a hanging crash test *diagnosable* (logs are now dumped on failure) but does not change the underlying flakiness — investigating why the container occasionally hangs >4 min is follow-up work.
Summary of changes
Capture the crash-test container id via a callback the moment the container starts, instead of only through
RunCrashTestAsync's return value.Reason for change
When the crash test exceeded its 4-minute timeout,
WaitForContainerAsyncthrewTaskCanceledExceptionbefore the return value was assigned, socrashTestContainerIdstayednull. As a result thefinallyblock never cleaned up or dumped logs for that container. The orphaned container kept the Docker network alive, surfacing as a confusingFailed to remove network ... has active endpointswarning that masked the real failure.Implementation details
RunCrashTestAsyncnow reports the id through anonContainerStartedcallback right after the container starts; return type changed fromTask<string>toTask.Test coverage
Covered by the existing artifact smoke tests that exercise the crash-test path.
Other details
This makes a hanging crash test diagnosable (logs are now dumped on failure) but does not change the underlying flakiness — investigating why the container occasionally hangs >4 min is follow-up work.