Skip to content

Add ContainerRuntimeInitializationTimeout to abort startup when container runtime stays unhealthy for too long#7241

Merged
davidfowl merged 3 commits intomainfrom
rebond/timeout-container-runtime-init-in-test
Jan 25, 2025
Merged

Add ContainerRuntimeInitializationTimeout to abort startup when container runtime stays unhealthy for too long#7241
davidfowl merged 3 commits intomainfrom
rebond/timeout-container-runtime-init-in-test

Conversation

@ReubenBond
Copy link
Copy Markdown
Member

Description

In integration testing scenarios, there is typically no human operator around to monitor the dashboard to observe and fix transient errors such as the container runtime (eg, docker or podman) being unavailable. Currently, tests will hang in these cases. This PR addresses this by adding a new TimeSpan property DcpOptions.ContainerRuntimeInitializationTimeout (default 10s), accessible by configuring DcpPublisher:ContainerRuntimeInitializationTimeout.

Fixes #6790

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@davidfowl
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread src/Aspire.Hosting.Testing/DistributedApplicationFactory.cs Outdated
@davidfowl davidfowl enabled auto-merge (squash) January 25, 2025 15:32
@davidfowl davidfowl merged commit e7963de into main Jan 25, 2025
@davidfowl davidfowl deleted the rebond/timeout-container-runtime-init-in-test branch January 25, 2025 16:46
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 25, 2025
@github-actions github-actions Bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Mar 10, 2025
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.

Test Host hangs forever if docker isn't running

2 participants