rok commented on PR #49678:
URL: https://github.com/apache/arrow/pull/49678#issuecomment-4205673704

   As per :robot: we should implement the change below: "this adds a step that 
makes the job explicitly check for the docker service, start it if needed, and 
wait until docker version succeeds before any archery docker pull/build/run 
commands execute. So this turns an intermittent windows-2022 runner issue into 
a handled setup step, which should reduce spurious CI failures."
   
   ```diff
   --- a/dev/tasks/python-wheels/github.windows.yml
   +++ b/dev/tasks/python-wheels/github.windows.yml
   @@ -43,6 +43,32 @@
         {{ macros.github_checkout_arrow()|indent }}
         {{ macros.github_login_ghcr()|indent }}
         {{ macros.github_install_archery()|indent }}
   +
   +      - name: Wait for Docker
   +        shell: pwsh
   +        run: |
   +          $dockerService = Get-Service -Name docker -ErrorAction 
SilentlyContinue
   +          if ($null -eq $dockerService) {
   +            Write-Error "Docker service not found."
   +            exit 1
   +          }
   +
   +          if ($dockerService.Status -ne "Running") {
   +            Write-Host "Starting Docker service..."
   +            Start-Service -Name docker
   +          }
   +
   +          for ($i = 1; $i -le 60; $i++) {
   +            docker version *> $null
   +            if ($LASTEXITCODE -eq 0) {
   +              Write-Host "Docker is ready."
   +              exit 0
   +            }
   +            Start-Sleep -Seconds 2
   +          }
   +
   +          Write-Error "Docker failed to become ready."
   +          exit 1
   
         - name: Prepare
           shell: bash
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to