This is an automated email from the ASF dual-hosted git repository.

kou 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 f32f8ac2ee GH-48904: [C++][FlightRPC][CI][Packaging] Upload ODBC 
installer into GitHub release as RC (#48934)
f32f8ac2ee is described below

commit f32f8ac2ee9148bd3c76fd65d47521d684211397
Author: Alina (Xi) Li <[email protected]>
AuthorDate: Mon Feb 9 16:13:40 2026 -0800

    GH-48904: [C++][FlightRPC][CI][Packaging] Upload ODBC installer into GitHub 
release as RC (#48934)
    
    ### Rationale for this change
    #48904
    
    Upload ODBC as a GitHub draft release upon release candidate tag
    
    ### What changes are included in this PR?
    - Create a draft GitHub release for ODBC, and upload the ODBC MSI to the 
draft release. ODBC release is only triggered by RC tag
    - add gh release ODBC download pattern to `04-binary-download.sh`
    - add gh release ODBC upload pattern to `05-binary-upload.sh`
    
    ### Are these changes tested?
    - CI changes tested in forked repository, a draft GitHub release is created
    - `04-binary-download.sh` and `05-binary-upload.sh` changes are not tested
    ### Are there any user-facing changes?
    Yes, this PR adds GitHub release for Apache Arrow Flight SQL ODBC MSI 
installer.
    * GitHub Issue: #48904
    
    Lead-authored-by: Alina (Xi) Li <[email protected]>
    Co-authored-by: Alina (Xi) Li <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 .github/workflows/cpp_extra.yml              | 70 +++++++++++++++++++++++++++-
 cpp/src/arrow/flight/sql/odbc/CMakeLists.txt |  2 +
 cpp/src/arrow/flight/sql/odbc/README.md      |  2 +-
 dev/release/04-binary-download.sh            |  3 +-
 dev/release/05-binary-upload.sh              |  5 ++
 5 files changed, 79 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/cpp_extra.yml b/.github/workflows/cpp_extra.yml
index 8d7390dd52..b38ccaa277 100644
--- a/.github/workflows/cpp_extra.yml
+++ b/.github/workflows/cpp_extra.yml
@@ -530,8 +530,43 @@ jobs:
         uses: actions/upload-artifact@v6
         with:
           name: flight-sql-odbc-msi-installer
-          path: build/cpp/Apache Arrow Flight SQL ODBC-*-win64.msi
+          path: build/cpp/Apache-Arrow-Flight-SQL-ODBC-*-win64.msi
           if-no-files-found: error
+      - name: Install ODBC MSI
+        run: |
+          cd build/cpp
+          $odbc_msi = Get-ChildItem -Filter 
"Apache-Arrow-Flight-SQL-ODBC-*-win64.msi"
+          if (-not $odbc_msi) {
+            Write-Error "ODBC MSI not found"
+            exit 1
+          }
+
+          foreach ($msi in $odbc_msi) {
+            Write-Host "Installing $($msi.Name) with logs"
+            $log = "odbc-install.log"
+            Start-Process msiexec.exe -Wait -ArgumentList "/i `"$msi`"", 
"/qn", "/L*V `"$log`""
+            Get-Content $log
+          }
+      - name: Check ODBC DLL installation
+        run: |
+          $dirs = Get-ChildItem "C:\Program Files" -Directory -Filter 
"Apache-Arrow-Flight-SQL-ODBC*"
+
+          foreach ($dir in $dirs) {
+            $bin = Join-Path $dir.FullName "bin"
+
+            if (Test-Path $bin) {
+              tree $bin /f
+
+              $dll = Join-Path $bin "arrow_flight_sql_odbc.dll"
+              if (Test-Path $dll) {
+                Write-Host "Found ODBC DLL: $dll"
+                exit 0
+              }
+            }
+          }
+
+          Write-Error "ODBC DLL not found"
+          exit 1
 
   odbc-nightly:
     needs: odbc-msvc
@@ -579,6 +614,39 @@ jobs:
           remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }}
           remote_host_key: ${{ secrets.NIGHTLIES_RSYNC_HOST_KEY }}
 
+  odbc-release:
+    needs: odbc-msvc
+    name: ODBC release
+    runs-on: ubuntu-latest
+    if: ${{ startsWith(github.ref_name, 'apache-arrow-') && 
contains(github.ref_name, '-rc') }}
+    permissions:
+      # Upload to GitHub Release
+      contents: write
+    steps:
+      - name: Checkout Arrow
+        uses: actions/checkout@v6
+        with:
+          fetch-depth: 0
+          submodules: recursive
+      - name: Download the artifacts
+        uses: actions/download-artifact@v7
+        with:
+          name: flight-sql-odbc-msi-installer
+      - name: Wait for creating GitHub Release
+        env:
+          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        run: |
+          dev/release/utils-watch-gh-workflow.sh \
+            ${GITHUB_REF_NAME} \
+            release_candidate.yml
+      - name: Upload the artifacts to GitHub Release
+        env:
+          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        run: |
+          gh release upload ${GITHUB_REF_NAME} \
+            --clobber \
+            Apache-Arrow-Flight-SQL-ODBC-*-win64.msi
+
   report-extra-cpp:
     if: github.event_name == 'schedule' && always()
     needs:
diff --git a/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt 
b/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt
index c18a8e5de9..39040c4502 100644
--- a/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt
+++ b/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt
@@ -106,6 +106,8 @@ if(ARROW_FLIGHT_SQL_ODBC_INSTALLER)
   set(CPACK_PACKAGE_VERSION_PATCH ${ODBC_PACKAGE_VERSION_PATCH})
 
   set(CPACK_PACKAGE_NAME ${ODBC_PACKAGE_NAME})
+  # Make sure the MSI name contains only hyphens, not spaces
+  string(REPLACE " " "-" CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}")
   set(CPACK_PACKAGE_VENDOR ${ODBC_PACKAGE_VENDOR})
   set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache Arrow Flight SQL ODBC Driver")
   set(CPACK_PACKAGE_CONTACT "[email protected]")
diff --git a/cpp/src/arrow/flight/sql/odbc/README.md 
b/cpp/src/arrow/flight/sql/odbc/README.md
index 8c2d9705a1..a8f3bc727f 100644
--- a/cpp/src/arrow/flight/sql/odbc/README.md
+++ b/cpp/src/arrow/flight/sql/odbc/README.md
@@ -47,7 +47,7 @@ should show as an available ODBC driver in the x64 ODBC 
Driver Manager.
 3. `cd` to `build` folder.
 4. Run `cpack`. 
 
-If the generation is successful, you will find `Apache Arrow Flight SQL 
ODBC-<version>-win64.msi` generated under the `build` folder.
+If the generation is successful, you will find 
`Apache-Arrow-Flight-SQL-ODBC-<version>-win64.msi` generated under the `build` 
folder.
 
 
 ## Steps to Enable Logging
diff --git a/dev/release/04-binary-download.sh 
b/dev/release/04-binary-download.sh
index 68e1664b59..210a9406c2 100755
--- a/dev/release/04-binary-download.sh
+++ b/dev/release/04-binary-download.sh
@@ -46,7 +46,7 @@ tag="apache-arrow-${version_with_rc}"
 
 archery crossbow download-artifacts --no-fetch ${CROSSBOW_JOB_ID} "$@"
 
-# Download Linux packages.
+# Download Linux packages and ODBC MSI.
 gh release download "${tag}" \
   --dir "packages/${CROSSBOW_JOB_ID}" \
   --pattern "almalinux-*.tar.gz" \
@@ -54,5 +54,6 @@ gh release download "${tag}" \
   --pattern "centos-*.tar.gz" \
   --pattern "debian-*.tar.gz" \
   --pattern "ubuntu-*.tar.gz" \
+  --pattern "Apache-Arrow-Flight-SQL-ODBC-*-win64.msi" \
   --repo "${REPOSITORY:-apache/arrow}" \
   --skip-existing
diff --git a/dev/release/05-binary-upload.sh b/dev/release/05-binary-upload.sh
index f628cce0e0..45793dd6ec 100755
--- a/dev/release/05-binary-upload.sh
+++ b/dev/release/05-binary-upload.sh
@@ -67,6 +67,7 @@ cd "${SOURCE_DIR}"
 : "${UPLOAD_CENTOS:=${UPLOAD_DEFAULT}}"
 : "${UPLOAD_DEBIAN:=${UPLOAD_DEFAULT}}"
 : "${UPLOAD_DOCS:=${UPLOAD_DEFAULT}}"
+: "${UPLOAD_ODBC:=${UPLOAD_DEFAULT}}"
 : "${UPLOAD_PYTHON:=${UPLOAD_DEFAULT}}"
 : "${UPLOAD_R:=${UPLOAD_DEFAULT}}"
 : "${UPLOAD_UBUNTU:=${UPLOAD_DEFAULT}}"
@@ -108,6 +109,10 @@ upload_to_github_release() {
 if [ "${UPLOAD_DOCS}" -gt 0 ]; then
   upload_to_github_release docs "${ARROW_ARTIFACTS_DIR}"/*-docs/*
 fi
+if [ "${UPLOAD_ODBC}" -gt 0 ]; then
+  upload_to_github_release odbc \
+    "${ARROW_ARTIFACTS_DIR}"/Apache-Arrow-Flight-SQL-ODBC-*-win64.msi
+fi
 if [ "${UPLOAD_PYTHON}" -gt 0 ]; then
   upload_to_github_release python \
     "${ARROW_ARTIFACTS_DIR}"/{python-sdist,wheel-*}/*

Reply via email to