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 6289ae0eb1 GH-55316: [CI][FlightRPC][ODBC] Apply ports.patch in 
Windows build (#55317)
6289ae0eb1 is described below

commit 6289ae0eb1af908a343ab4d4fa589d620ba27c42
Author: Bryce Mecum <[email protected]>
AuthorDate: Fri Oct 30 00:14:02 2026 -0700

    GH-55316: [CI][FlightRPC][ODBC] Apply ports.patch in Windows build (#55317)
    
    ### Rationale for this change
    
    The ODBC Windows build uses a composite action that bootstraps vcpkg in a 
way that doesn't pick up ports.patch (or the pinned vcpkg version). This set up 
a scenario where https://github.com/apache/arrow/pull/55167 broke the build and 
the ODBC upload step failed during the 26.0.0.1 release process.
    
    As an aside, this didn't get caught by CI because the ODBC Windows job only 
runs on a daily schedule or at release time and 
https://github.com/apache/arrow/pull/55167 hadn't been on `main` for long 
enough. This is something to keep an eye out and possibly improve in the future.
    
    ### What changes are included in this PR?
    
    Replace the way the job bootstraps vcpkg so it uses the normal 
`ci/scripts/install.sh` and directly overlays the port patches.
    
    ### Are these changes tested?
    
    Yes, in CI.
    
    ### Are there any user-facing changes?
    
    No.
    
    ### Was AI used for this PR?
    
    In accordance to the [AI generation 
guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code),
 please disclose below whether and how AI was used in this PR.
    
    **PR code and description written by:**
    
    - [X] Human
    - [ ] AI
    
    **Reviewed before submission by:**
    
    - [X] Human
    - [X] AI
    - [ ] Not reviewed
    
    * GitHub Issue: #55316
    
    Authored-by: Bryce Mecum <[email protected]>
    Signed-off-by: Raúl Cumplido <[email protected]>
---
 .github/actions/odbc-windows/action.yml | 34 ++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)

diff --git a/.github/actions/odbc-windows/action.yml 
b/.github/actions/odbc-windows/action.yml
index 6094173319..f072a3ce84 100644
--- a/.github/actions/odbc-windows/action.yml
+++ b/.github/actions/odbc-windows/action.yml
@@ -54,22 +54,26 @@ runs:
         path: ${{ steps.ccache-info.outputs.cache-dir }}
         key: cpp-odbc-ccache-windows-x64-${{ hashFiles('cpp/**') }}
         restore-keys: cpp-odbc-ccache-windows-x64-
-    - name: Checkout vcpkg
-      uses: actions/checkout@v6
-      with:
-        persist-credentials: false
-        fetch-depth: 0
-        path: vcpkg
-        repository: microsoft/vcpkg
-    - name: Bootstrap vcpkg
-      shell: pwsh
+    - name: Install vcpkg
+      shell: bash
       run: |
-        vcpkg\bootstrap-vcpkg.bat
-        $VCPKG_ROOT = $(Resolve-Path -LiteralPath "vcpkg").ToString()
-        Write-Output ${VCPKG_ROOT} | `
-          Out-File -FilePath ${Env:GITHUB_PATH} -Encoding utf8 -Append
-        Write-Output "VCPKG_ROOT=${VCPKG_ROOT}" | `
-          Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
+        # GH-55316: Use the vcpkg version pinned in .env and apply
+        # ci/vcpkg/ports.patch like other vcpkg based builds do.
+        ci/scripts/install_vcpkg.sh vcpkg
+        VCPKG_ROOT=$(cygpath --windows "$(pwd)/vcpkg")
+        echo "${VCPKG_ROOT}" >> "${GITHUB_PATH}"
+        echo "VCPKG_ROOT=${VCPKG_ROOT}" >> "${GITHUB_ENV}"
+        # We use manifest mode with builtin-baseline. vcpkg resolves
+        # ports from its versions database in manifest mode, so local
+        # changes by ports.patch are ignored unless the patched ports
+        # are used as overlay ports.
+        vcpkg_ports_dir=$(cygpath --mixed "$(pwd)/vcpkg/ports")
+        overlay_ports=()
+        for port in $(sed -n -E 's,^diff --git a/ports/([^/]+)/.*,\1,p' \
+                        ci/vcpkg/ports.patch | sort -u); do
+          overlay_ports+=("${vcpkg_ports_dir}/${port}")
+        done
+        echo "VCPKG_OVERLAY_PORTS=$(IFS=';'; echo "${overlay_ports[*]}")" >> 
"${GITHUB_ENV}"
     - name: Setup NuGet credentials for vcpkg caching
       shell: bash
       run: |

Reply via email to