Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle cases when there's no exit code #5576

Merged
merged 3 commits into from
Sep 7, 2024

Conversation

davidfowl
Copy link
Member

@davidfowl davidfowl commented Sep 6, 2024

Description

WaitForCompletion should handle cases where a dependency enters a terminal state but there's no exit code.

Follow up to #5515

Microsoft Reviewers: Open in CodeFlow

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-codeflow for labeling automated codeflow. intentionally a different color! label Sep 6, 2024
@radical
Copy link
Member

radical commented Sep 6, 2024

Test failing here.
And similar test failing on main #5577 . jfyi in case there is a pattern for these WaitFor* tests.

@radical radical added area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication and removed area-codeflow for labeling automated codeflow. intentionally a different color! labels Sep 6, 2024
@davidfowl
Copy link
Member Author

I saw it locally a few times, there must be an existing issue.

@mitchdenny
Copy link
Member

I'm not entirely sure this is WaitFor causing this. When I first saw this I ran the test locally until it failed and it didn't. I suspect that some infra level failures with Docker (possibly pulling images) can case these kinds of issues. But its speculation at this point. It could also be some kind of concurrency issue when you have multiple tests running simultaneously but I haven't been able to narrow it down.

@mitchdenny
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@davidfowl
Copy link
Member Author

@radical With logging:

| [2024-09-07T06:25:28] Aspire.Hosting.DistributedApplication Information: Aspire version: 9.0.0-ci
| [2024-09-07T06:25:28] Aspire.Hosting.DistributedApplication Information: Distributed application starting.
| [2024-09-07T06:25:28] Aspire.Hosting.DistributedApplication Information: Application host directory is: D:\a\_work\1\s\tests\Aspire.Hosting.Tests
| [2024-09-07T06:25:28] Microsoft.Extensions.Hosting.Internal.Host Error: Hosting failed to start
| Aspire.Hosting.DistributedApplicationException: Container runtime 'docker' could not be found. The error from the container runtime check was: exec: "docker": executable file not found in %PATH%
failed to start Docker command 'Status'.
| See https://aka.ms/dotnet/aspire/containers for more details on supported container runtimes.
|    at Aspire.Hosting.Dcp.DcpDependencyCheck.EnsureDcpContainerRuntime(DcpInfo dcpInfo) in /_/src/Aspire.Hosting/Dcp/DcpDependencyCheck.cs:line 205
|    at Aspire.Hosting.Dcp.DcpDependencyCheck.GetDcpInfoAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dcp/DcpDependencyCheck.cs:line 110
|    at Aspire.Hosting.Dcp.DcpDependencyCheck.GetDcpInfoAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dcp/DcpDependencyCheck.cs:line 130
|    at Aspire.Hosting.Dcp.DcpHostService.StartAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dcp/DcpHostService.cs:line 67
|    at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
|    at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)

@davidfowl davidfowl merged commit edd3232 into main Sep 7, 2024
11 checks passed
@davidfowl davidfowl deleted the davidfowl/wait-for-completion-fix branch September 7, 2024 08:01
@github-actions github-actions bot locked and limited conversation to collaborators Oct 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants