[CI Failure] Flaky: WithDockerfileTests.AddDockerfileLaunchesContainerSuccessfully times out in DcpResourceWatcher
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
## Build Information
Build: https://github.com/microsoft/aspire/actions/runs/30987535630
Build error leg or test failing: Tests / Hosting.Containers / Hosting.Containers (ubuntu-latest) / `Aspire.Hosting.Containers.Tests.WithDockerfileTests.AddDockerfileLaunchesContainerSuccessfully`
Pull request: #18989
## Error Message
```
Polly.Timeout.TimeoutRejectedException : The operation didn't complete within the allowed timeout of '00:00:20'.
---- System.Threading.Tasks.TaskCanceledException : A task was canceled.
at Polly.Timeout.TimeoutResilienceStrategy.ExecuteCore
at Aspire.Hosting.Dcp.DcpResourceWatcher DcpResourceWatcher.cs:line 173
Hosting failed to start
```
## Description
Flaky: WithDockerfileTests.AddDockerfileLaunchesContainerSuccessfully times out in DcpResourceWatcher
**Type**: flaky-test
## Occurrences
| Date | Build | Job | PR |
|------|-------|-----|----|
| 2026-08-05 | [30987535630](https://github.com/microsoft/aspire/actions/runs/30987535630) | Tests / Hosting.Containers / Hosting.Containers (ubuntu-latest) | #18989 |
Contributor guide
Research direction
Start with Aspire.Hosting.Containers.Tests.WithDockerfileTests.AddDockerfileLaunchesContainerSuccessfully and the failing Hosting.Containers build from run 30987535630. Read DcpResourceWatcher.cs around line 173 and investigate why the 20-second operation times out during container startup. Done means the test no longer flakes or times out in repeated CI runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100