Skip to content

ci(windows): add Docker daemon readiness check before build#820

Open
frostebite wants to merge 1 commit intomainfrom
fix/windows-docker-readiness
Open

ci(windows): add Docker daemon readiness check before build#820
frostebite wants to merge 1 commit intomainfrom
fix/windows-docker-readiness

Conversation

@frostebite
Copy link
Member

@frostebite frostebite commented Mar 14, 2026

Summary

  • Add a proactive Docker daemon health check step to the Windows build workflow, before the first build attempt
  • The windows-2022 runner images sometimes have the Docker service stopped or still starting, causing the first build to fail on Docker operations (see actions/runner-images#13729)
  • The new step polls the Docker service for up to 60 seconds, actively starting it if stopped, giving clear diagnostic output on each retry

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

  • Verify the new step runs successfully on windows-2022 runners (Docker service is detected and confirmed ready)
  • Verify that when Docker is already running, the step exits immediately with "Docker is ready."
  • Verify the existing retry pattern still triggers correctly for non-Docker failures
  • Verify that if Docker genuinely cannot start, the step fails with a clear error message after 60 seconds

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Improved Windows build workflow reliability by adding a verification step that ensures the Docker service is ready before executing tests. This reduces build failures caused by Docker availability issues.

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>
@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

📝 Walkthrough

Walkthrough

A 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

Cohort / File(s) Summary
Windows Workflow Configuration
.github/workflows/build-tests-windows.yml
Added "Ensure Docker daemon is ready" step that polls Docker service with retry logic, automatic start capability, and responsiveness verification via docker version command.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • davidmfinol

Poem

🐰 The Docker daemon stirs to life,
Ten chances to end the strife,
Six-second waits, a patient beat,
Windows workflows now complete! 🐋✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes a comprehensive summary and rationale, but is missing required template sections like Changes, Related Issues, Successful Workflow Run Link, and the Checklist. Add the missing template sections: a bulleted Changes summary, Related Issues reference, a successful workflow run link, and complete the Checklist section with appropriate items checked.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: adding a Docker daemon readiness check to the Windows CI workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/windows-docker-readiness
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 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: 2 to the step would provide an additional safeguard against unexpected hangs (e.g., if Start-Service or Get-Service blocks 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

📥 Commits

Reviewing files that changed from the base of the PR and between 9d47543 and 67351b6.

⛔ Files ignored due to path filters (1)
  • dist/index.js.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (1)
  • .github/workflows/build-tests-windows.yml

@github-actions
Copy link

Cat Gif

@codecov
Copy link

codecov bot commented Mar 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 31.25%. Comparing base (9d47543) to head (67351b6).

Additional details and impacted files

Impacted file tree graph

@@           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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant