This is an automated email from the ASF dual-hosted git repository.
raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 5617e8da18 GH-49676: [Python][Packaging] Fix gRPC docker image layer
being too big for hcsshim on Windows (#49678)
5617e8da18 is described below
commit 5617e8da18c5888d975fdeb77c98c0d9fb6f0f8b
Author: Raúl Cumplido <[email protected]>
AuthorDate: Thu Apr 9 13:09:17 2026 +0200
GH-49676: [Python][Packaging] Fix gRPC docker image layer being too big 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 <[email protected]>
Co-authored-by: Bryce Mecum <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
---
.../python-wheel-windows-vs2022-base.dockerfile | 1 +
ci/vcpkg/vcpkg.patch | 11 +++++++++++
dev/tasks/python-wheels/github.windows.yml | 22 ++++++++++++++++++++++
3 files changed, 34 insertions(+)
diff --git a/ci/docker/python-wheel-windows-vs2022-base.dockerfile
b/ci/docker/python-wheel-windows-vs2022-base.dockerfile
index f1bc314d01..56177c65ea 100644
--- a/ci/docker/python-wheel-windows-vs2022-base.dockerfile
+++ b/ci/docker/python-wheel-windows-vs2022-base.dockerfile
@@ -128,6 +128,7 @@ ENV CMAKE_BUILD_TYPE=${build_type} `
VCPKG_DEFAULT_TRIPLET=amd64-windows-static-md-${build_type} `
VCPKG_FEATURE_FLAGS="manifests"
COPY ci/vcpkg/vcpkg.json arrow/ci/vcpkg/
+
# cannot use the S3 feature here because while aws-sdk-cpp=1.9.160 contains
# ssl related fixes as well as we can patch the vcpkg portfile to support
# arm machines it hits ARROW-15141 where we would need to fall back to 1.8.186
diff --git a/ci/vcpkg/vcpkg.patch b/ci/vcpkg/vcpkg.patch
index a4c8d52097..5a7d7b2795 100644
--- a/ci/vcpkg/vcpkg.patch
+++ b/ci/vcpkg/vcpkg.patch
@@ -1,3 +1,14 @@
+diff --git a/scripts/toolchains/windows.cmake
b/scripts/toolchains/windows.cmake
+index 3cc90cc..36af495 100644
+--- a/scripts/toolchains/windows.cmake
++++ b/scripts/toolchains/windows.cmake
+@@ -88,4 +88,4 @@ if(NOT _VCPKG_WINDOWS_TOOLCHAIN)
+ set(CMAKE_C_FLAGS_DEBUG "${VCPKG_CRT_LINK_FLAG_PREFIX}d /Z7 /Ob0 /Od
/RTC1 ${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "")
+- set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy
/DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "")
+- set(CMAKE_C_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy
/DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "")
++ set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy
/DNDEBUG ${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "")
++ set(CMAKE_C_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy
/DNDEBUG ${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "")
+
diff --git a/scripts/cmake/vcpkg_execute_build_process.cmake
b/scripts/cmake/vcpkg_execute_build_process.cmake
index 60fd5b587a..c8dc021af8 100644
--- a/scripts/cmake/vcpkg_execute_build_process.cmake
diff --git a/dev/tasks/python-wheels/github.windows.yml
b/dev/tasks/python-wheels/github.windows.yml
index 77e2a04e3a..96605614e3 100644
--- a/dev/tasks/python-wheels/github.windows.yml
+++ b/dev/tasks/python-wheels/github.windows.yml
@@ -57,6 +57,28 @@ jobs:
esac
echo "TEST_IMAGE_PREFIX=${test_image_prefix}" >> ${GITHUB_ENV}
+ - name: Configure Docker data-root
+ shell: powershell
+ run: |
+ # The D: drive on windows-2022 GH Actions runners has ~44GB free vs
~14GB on C:.
+ # Moving Docker's data-root to D: prevents hcsshim::ImportLayer
failures when
+ # building large Windows container layers (e.g. the vcpkg install
layer). GH-49676
+ Stop-Service docker
+ $daemonJson = "C:\ProgramData\Docker\config\daemon.json"
+ New-Item -ItemType Directory -Force -Path (Split-Path $daemonJson) |
Out-Null
+ if (Test-Path $daemonJson) {
+ $json = Get-Content $daemonJson | ConvertFrom-Json
+ $json | Add-Member -Force -NotePropertyName "data-root"
-NotePropertyValue "D:\docker"
+ $json | ConvertTo-Json -Depth 10 | Set-Content $daemonJson
+ } else {
+ Set-Content $daemonJson -Value '{"data-root":"D:\docker"}'
+ }
+ Start-Service docker
+ Write-Host "=== daemon.json ==="
+ Get-Content $daemonJson
+ Write-Host "=== docker info ==="
+ docker info
+
- name: Build wheel
shell: cmd
run: |