Skip to content

Docker Ping retry delay - #1872

Merged
Ryan Brandenburg (ryanbrandenburg) merged 1 commit into
mainfrom
users/rybrande/DockerTest
Sep 17, 2026
Merged

Ryan Brandenburg (ryanbrandenburg) merged 1 commit into
mainfrom
users/rybrande/DockerTest

Conversation

@ryanbrandenburg

Copy link
Copy Markdown
Contributor

This test fails semi-randomly on windows CI sometimes. My bet is that the docker daemon is slower to startup on windows and hasn't fully spun up, so I've added some Polly retry and delay to hopefully make this more resilient.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The change is small, low-risk, and directly targets the reported test flakiness (with only a minor test-runtime tradeoff).

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

This PR aims to reduce intermittent Windows CI flakiness in Docker-related tests by adding retry-with-delay behavior around the Docker daemon ping check.

Changes:

  • Add a Polly package reference to the Common test project.
  • Wrap DockerService.CanPingDockerAsync() in a Polly WaitAndRetryAsync policy to tolerate slow Docker daemon startup.
File Description
test/​Microsoft.ComponentDetection.Common.Tests/​Microsoft.ComponentDetection.Common.Tests.csproj Adds Polly dependency for retry support in tests.
test/​Microsoft.ComponentDetection.Common.Tests/​DockerServiceTests.cs Adds retry + delay around Docker ping to reduce Windows CI flakiness.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ryanbrandenburg
Ryan Brandenburg (ryanbrandenburg) merged commit 48153df into main Sep 17, 2026
13 checks passed
@ryanbrandenburg
Ryan Brandenburg (ryanbrandenburg) deleted the users/rybrande/DockerTest branch September 17, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants