Skip to content

Commit 8d3388b

Browse files
amoebaraulcd
authored andcommitted
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 #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 #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]>
1 parent 3ec2cf1 commit 8d3388b

1 file changed

Lines changed: 19 additions & 15 deletions

File tree

‎.github/actions/odbc-windows/action.yml‎

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,26 @@ runs:
5454
path: ${{ steps.ccache-info.outputs.cache-dir }}
5555
key: cpp-odbc-ccache-windows-x64-${{ hashFiles('cpp/**') }}
5656
restore-keys: cpp-odbc-ccache-windows-x64-
57-
- name: Checkout vcpkg
58-
uses: actions/checkout@v6
59-
with:
60-
persist-credentials: false
61-
fetch-depth: 0
62-
path: vcpkg
63-
repository: microsoft/vcpkg
64-
- name: Bootstrap vcpkg
65-
shell: pwsh
57+
- name: Install vcpkg
58+
shell: bash
6659
run: |
67-
vcpkg\bootstrap-vcpkg.bat
68-
$VCPKG_ROOT = $(Resolve-Path -LiteralPath "vcpkg").ToString()
69-
Write-Output ${VCPKG_ROOT} | `
70-
Out-File -FilePath ${Env:GITHUB_PATH} -Encoding utf8 -Append
71-
Write-Output "VCPKG_ROOT=${VCPKG_ROOT}" | `
72-
Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
60+
# GH-55316: Use the vcpkg version pinned in .env and apply
61+
# ci/vcpkg/ports.patch like other vcpkg based builds do.
62+
ci/scripts/install_vcpkg.sh vcpkg
63+
VCPKG_ROOT=$(cygpath --windows "$(pwd)/vcpkg")
64+
echo "${VCPKG_ROOT}" >> "${GITHUB_PATH}"
65+
echo "VCPKG_ROOT=${VCPKG_ROOT}" >> "${GITHUB_ENV}"
66+
# We use manifest mode with builtin-baseline. vcpkg resolves
67+
# ports from its versions database in manifest mode, so local
68+
# changes by ports.patch are ignored unless the patched ports
69+
# are used as overlay ports.
70+
vcpkg_ports_dir=$(cygpath --mixed "$(pwd)/vcpkg/ports")
71+
overlay_ports=()
72+
for port in $(sed -n -E 's,^diff --git a/ports/([^/]+)/.*,\1,p' \
73+
ci/vcpkg/ports.patch | sort -u); do
74+
overlay_ports+=("${vcpkg_ports_dir}/${port}")
75+
done
76+
echo "VCPKG_OVERLAY_PORTS=$(IFS=';'; echo "${overlay_ports[*]}")" >> "${GITHUB_ENV}"
7377
- name: Setup NuGet credentials for vcpkg caching
7478
shell: bash
7579
run: |

0 commit comments

Comments
 (0)