ci(windows): add Docker daemon readiness check before build#820
ci(windows): add Docker daemon readiness check before build#820frostebite wants to merge 1 commit intomainfrom
Conversation
Add a proactive Docker daemon health check step to the Windows build workflow. The windows-2022 runner images sometimes have the Docker service in a stopped or starting state, causing the first build attempt to fail on Docker operations. The new step polls the Docker service for up to 60 seconds, actively starting it if stopped, before proceeding to the build. This is faster and more diagnostic than relying solely on the existing retry loop (which sleeps 120-240s between full re-runs of the action). The existing retry pattern is kept as defense-in-depth since it also handles non-Docker transient failures (Unity licensing, network, etc). Ref: actions/runner-images#13729 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughA new step is added to the Windows build workflow that ensures the Docker daemon is ready before proceeding. The step polls the Docker service up to 10 times at 6-second intervals, automatically starting it if needed and verifying responsiveness. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/build-tests-windows.yml (1)
72-73: Optional: Consider adding a timeout-minutes for this step.While the script has an internal 60-second timeout, adding an explicit
timeout-minutes: 2to the step would provide an additional safeguard against unexpected hangs (e.g., ifStart-ServiceorGet-Serviceblocks indefinitely in edge cases).- name: Ensure Docker daemon is ready shell: powershell + timeout-minutes: 2 run: |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build-tests-windows.yml around lines 72 - 73, Add an explicit step-level timeout to the "Ensure Docker daemon is ready" workflow step by adding a timeout-minutes: 2 property to that step; this augments the script's internal 60s guard and prevents the PowerShell step (named "Ensure Docker daemon is ready" which runs shell: powershell and uses Start-Service/Get-Service) from hanging indefinitely.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/build-tests-windows.yml:
- Around line 72-73: Add an explicit step-level timeout to the "Ensure Docker
daemon is ready" workflow step by adding a timeout-minutes: 2 property to that
step; this augments the script's internal 60s guard and prevents the PowerShell
step (named "Ensure Docker daemon is ready" which runs shell: powershell and
uses Start-Service/Get-Service) from hanging indefinitely.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 1add371c-78f0-4794-81e4-0189c08a0ea3
⛔ Files ignored due to path filters (1)
dist/index.js.mapis excluded by!**/dist/**,!**/*.map
📒 Files selected for processing (1)
.github/workflows/build-tests-windows.yml
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #820 +/- ##
=======================================
Coverage 31.25% 31.25%
=======================================
Files 84 84
Lines 4563 4563
Branches 1103 1103
=======================================
Hits 1426 1426
Misses 3137 3137 🚀 New features to boost your workflow:
|

Summary
windows-2022runner images sometimes have the Docker service stopped or still starting, causing the first build to fail on Docker operations (see actions/runner-images#13729)Why keep the existing retry pattern?
The existing retry loop (3 attempts with 120s/240s sleeps) handles multiple transient failure modes beyond Docker -- Unity licensing, network issues, and other flakiness on Windows runners. We keep it as defense-in-depth. This PR only adds a fast, targeted Docker readiness check as a proactive first step so that Docker-specific failures are resolved before the first build attempt rather than burning 6+ minutes of blind sleeping and re-running the full action.
Test plan
windows-2022runners (Docker service is detected and confirmed ready)🤖 Generated with Claude Code
Summary by CodeRabbit