Skip to content

GH-49676: [Python][Packaging] Fix gRPC docker image layer being too big for hcsshim on Windows#49678

Merged
raulcd merged 15 commits intoapache:mainfrom
raulcd:GH-49676
Apr 9, 2026
Merged

GH-49676: [Python][Packaging] Fix gRPC docker image layer being too big for hcsshim on Windows#49678
raulcd merged 15 commits intoapache:mainfrom
raulcd:GH-49676

Conversation

@raulcd
Copy link
Copy Markdown
Member

@raulcd raulcd commented Apr 7, 2026

Rationale for this change

The docker base docker image which installs all the vcpkg dependencies to build Windows wheels was failing to commit the layer for gRPC due to size.

What changes are included in this PR?

Two separate fixes that independently fix the issue:

  • Patch vcpkg for Windows to remove unconditional /Z7
  • Use D:/ drive instead of C:/ as it has bigger size for Docker storage

Are these changes tested?

Yes via archery

Are there any user-facing changes?

No

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 7, 2026

@github-actions crossbow submit wheel-windows-*

@github-actions github-actions bot added the awaiting committer review Awaiting committer review label Apr 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

⚠️ GitHub issue #49676 has been automatically assigned in GitHub to PR creator.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Revision: 663e4a6

Submitted crossbow builds: ursacomputing/crossbow @ actions-2d3c582858

Task Status
wheel-windows-cp310-cp310-amd64 GitHub Actions
wheel-windows-cp311-cp311-amd64 GitHub Actions
wheel-windows-cp312-cp312-amd64 GitHub Actions
wheel-windows-cp313-cp313-amd64 GitHub Actions
wheel-windows-cp313-cp313t-amd64 GitHub Actions
wheel-windows-cp314-cp314-amd64 GitHub Actions
wheel-windows-cp314-cp314t-amd64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 7, 2026

@github-actions crossbow submit wheel-windows-cp313-cp313t-amd64

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Revision: a0edd40

Submitted crossbow builds: ursacomputing/crossbow @ actions-a1756da700

Task Status
wheel-windows-cp313-cp313t-amd64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 7, 2026

@github-actions crossbow submit wheel-windows-cp313-cp313t-amd64

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Revision: b45c287

Submitted crossbow builds: ursacomputing/crossbow @ actions-946cdff5a8

Task Status
wheel-windows-cp313-cp313t-amd64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 7, 2026

@github-actions crossbow submit wheel-windows-cp313-cp313t-amd64

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Revision: 4b9fd9c

Submitted crossbow builds: ursacomputing/crossbow @ actions-e9e5587b8a

Task Status
wheel-windows-cp313-cp313t-amd64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 7, 2026

@github-actions crossbow submit wheel-windows-cp313-cp313t-amd64

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Revision: 5479a8d

Submitted crossbow builds: ursacomputing/crossbow @ actions-310307e9a4

Task Status
wheel-windows-cp313-cp313t-amd64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 8, 2026

@kou any idea what might be the issue here?

@kou
Copy link
Copy Markdown
Member

kou commented Apr 8, 2026

I'll take a look at this in a few hours!

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 8, 2026

@github-actions crossbow submit wheel-windows-cp313-cp313t-amd64

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Revision: a7c0613

Submitted crossbow builds: ursacomputing/crossbow @ actions-66876a4e34

Task Status
wheel-windows-cp313-cp313t-amd64 GitHub Actions

@kou
Copy link
Copy Markdown
Member

kou commented Apr 8, 2026

Sorry. I couldn't take a look at this in a few hours... I'll take a look at this in 24 hours...

@rok
Copy link
Copy Markdown
Member

rok commented Apr 8, 2026

As per 🤖 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."

--- 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

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 8, 2026

I think that could solve the "intermittent failure" around docker being unable but the big issue is not that one.

The real problem is when docker is running at building the flight dependencies from vcpkg step. If I isolate the different vcpkg features being built the image builds fine until the flight feature step. Flight pulls grpc/abseil/protobuf. The hcsshim::ImportLayer failed in Win32 error seems to hint that the docker image layer is too big to be added to the Windows image. This checks with the following upstream issue:
microsoft/vcpkg#43603
We've always had problems building gRPC on Windows taking 2 hours but never had issues with docker being unable to "commit" the image layer until now.

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 8, 2026

Docker seemed to have been upgraded on the runner images from 27.x/28.x to 29.1 which might be the issue:

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 8, 2026

@github-actions crossbow submit wheel-windows-cp313-cp313t-amd64

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Revision: 14c89a4

Submitted crossbow builds: ursacomputing/crossbow @ actions-d3af6272a6

Task Status
wheel-windows-cp313-cp313t-amd64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 8, 2026

@github-actions crossbow submit wheel-windows-cp313-cp313t-amd64

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Revision: 96931be

Submitted crossbow builds: ursacomputing/crossbow @ actions-5806a993b9

Task Status
wheel-windows-cp313-cp313t-amd64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 8, 2026

@github-actions crossbow submit wheel-windows-cp313-cp313t-amd64

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Revision: a033258

Submitted crossbow builds: ursacomputing/crossbow @ actions-8d2d071202

Task Status
wheel-windows-cp313-cp313t-amd64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 8, 2026

@github-actions crossbow submit wheel-windows-cp313-cp313t-amd64

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Revision: 14f1b27

Submitted crossbow builds: ursacomputing/crossbow @ actions-733eebe387

Task Status
wheel-windows-cp313-cp313t-amd64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 8, 2026

@kou @amoeba both this PR and #49693 seem to successfully fix the wheels. I don't think the fixes are exclusive and we could push both on a single PR? I'll try to push this PR tomorrow and would like to merge to unblock the release. What do you think?

@kou
Copy link
Copy Markdown
Member

kou commented Apr 9, 2026

It makes sense! Let's do it!

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 9, 2026

@github-actions crossbow submit wheel-windows-cp313-cp313t-amd64

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 9, 2026

@github-actions crossbow submit wheel-windows-*

@raulcd raulcd changed the title GH-49676: [Python][Packaging] Avoid rebuilding all base images by not pulling base images on docker build GH-49676: [Python][Packaging] Fix gRPC docker image layer being too big for hcsshim on Windows Apr 9, 2026
@raulcd raulcd marked this pull request as ready for review April 9, 2026 07:12
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Revision: a38282c

Submitted crossbow builds: ursacomputing/crossbow @ actions-42eaca7fbf

Task Status
wheel-windows-cp313-cp313t-amd64 GitHub Actions

@raulcd
Copy link
Copy Markdown
Member Author

raulcd commented Apr 9, 2026

Once CI finishes, if successful, I'll merge and cherry-pick on the release branch

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Revision: a38282c

Submitted crossbow builds: ursacomputing/crossbow @ actions-6473f96f72

Task Status
wheel-windows-cp310-cp310-amd64 GitHub Actions
wheel-windows-cp311-cp311-amd64 GitHub Actions
wheel-windows-cp312-cp312-amd64 GitHub Actions
wheel-windows-cp313-cp313-amd64 GitHub Actions
wheel-windows-cp313-cp313t-amd64 GitHub Actions
wheel-windows-cp314-cp314-amd64 GitHub Actions
wheel-windows-cp314-cp314t-amd64 GitHub Actions

Copy link
Copy Markdown
Member Author

@raulcd raulcd left a comment

Choose a reason for hiding this comment

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

I am merging this. Thanks @kou @amoeba

@raulcd raulcd merged commit 5617e8d into apache:main Apr 9, 2026
60 of 61 checks passed
@raulcd raulcd removed the awaiting committer review Awaiting committer review label Apr 9, 2026
@github-actions github-actions bot added the awaiting changes Awaiting changes label Apr 9, 2026
raulcd added a commit that referenced this pull request Apr 9, 2026
…ig for hcsshim on Windows (#49678)

### Rationale for this change

The docker base docker image which installs all the vcpkg dependencies to build Windows wheels was failing to commit the layer for gRPC due to size.

### What changes are included in this PR?

Two separate fixes that independently fix the issue:
- Patch vcpkg for Windows to remove unconditional `/Z7`
- Use D:/ drive instead of C:/ as it has bigger size for Docker storage

### Are these changes tested?

Yes via archery

### Are there any user-facing changes?

No

* GitHub Issue: #49676

Lead-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Co-authored-by: Bryce Mecum <petridish@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
@raulcd raulcd deleted the GH-49676 branch April 9, 2026 11:10
@amoeba
Copy link
Copy Markdown
Member

amoeba commented Apr 9, 2026

Thanks @raulcd @kou and @rok !

@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 5617e8d.

There was 1 benchmark result with an error:

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes Awaiting changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants