Skip to content

GH-49537: [C++][FlightRPC] Windows CI to Support ODBC DLL & MSI Signing#49603

Open
alinaliBQ wants to merge 4 commits into
apache:mainfrom
Bit-Quill:gh-49537-ci-sign-win-odbc
Open

GH-49537: [C++][FlightRPC] Windows CI to Support ODBC DLL & MSI Signing#49603
alinaliBQ wants to merge 4 commits into
apache:mainfrom
Bit-Quill:gh-49537-ci-sign-win-odbc

Conversation

@alinaliBQ
Copy link
Copy Markdown
Collaborator

@alinaliBQ alinaliBQ commented Mar 26, 2026

Rationale for this change

GH-49537

What changes are included in this PR?

  • Implement Windows CIs to:
    1. CI A - odbc-msvc-upload-dll Upload unsigned DLL
    2. CI B - odbc-msvc-upload-msi Download signed DLL and upload unsigned MSI
  • Remove odbc-release CI that is replaced by the new CIs.
  • Use composite action to reuse code for building ODBC Windows.
  • The release manager can run CI A first, then download the unsigned DLL and upload signed DLL.
  • Run CI B to upload unsigned MSI. Then sign the MSI locally, and upload signed MSI to GitHub release. Example Command to trigger CI B:
gh workflow run cpp_extra.yml --ref apache-arrow-test-24.0.0-rc0 -f odbc_release_step=true

Example of 07-flightsqlodbc-upload.sh script (not tested):
We need to either 1) implement a way to get RUN_ID and then call gh run watch,
or 2) enter each command manually and wait for the CI to finish.

# download unsigned DLL
gh release download $tag --pattern arrow_flight_sql_odbc_unsigned.dll

# sign ODBC DLL and upload to GitHub release
jsign arrow_flight_sql_odbc_unsigned.dll ...
mv arrow_flight_sql_odbc_unsigned.dll arrow_flight_sql_odbc.dll
gh release upload $tag --clobber arrow_flight_sql_odbc.dll

# trigger CI B
gh workflow run cpp_extra.yml --ref $tag -f odbc_upload=msi

# download unsigned MSI
gh release download $tag --pattern Apache-Arrow-Flight-SQL-ODBC-*-win64.msi

# sign ODBC MSI and upload to GitHub release
jsign Apache-Arrow-Flight-SQL-ODBC-*-win64.msi ...
gh release upload $tag --clobber Apache-Arrow-Flight-SQL-ODBC-*-win64.msi

# remove ODBC DLLs from GitHub release
gh release delete-asset $tag arrow_flight_sql_odbc_unsigned.dll --yes
gh release delete-asset $tag arrow_flight_sql_odbc.dll --yes

Documentation is in:

# Sign, build the installer for, and sign the installer for the FlightSQL
# ODBC Windows driver
#
# NOTE: This must be run by a PMC member
# Note: You need to have jsign installed and an available credential from
# ASF to sign artifacts. Not all PMC members will have access to code
# signing.
# Note: The script requires setup of ssl.com environment variables.
# Note: Invoking this script costs money.
dev/release/07-flightsqlodbc-upload.sh <version> <rc-number>

Are these changes tested?

  • The uploading and signing process is tested in my repo
  • Workflows are verified in CI

Are there any user-facing changes?

N/A

Comment thread .github/workflows/cpp_extra.yml Outdated
Comment on lines +629 to +635
- name: Upload the artifacts to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${GITHUB_REF_NAME} \
--clobber \
arrow_flight_sql_odbc_unsigned.dll
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Since both DLL and MSI need to be signed and unsigned DLL is harder to catch, uploading as arrow_flight_sql_odbc_unsigned.dll to make it clear on GitHub release if the DLL is unsigned.

@github-actions github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Mar 26, 2026
@alinaliBQ
Copy link
Copy Markdown
Collaborator Author

@amoeba PR is ready for review. We have an issue for flight-sql-tests ODBC Windows failure: #49465

@alinaliBQ alinaliBQ marked this pull request as ready for review March 27, 2026 17:35
@alinaliBQ
Copy link
Copy Markdown
Collaborator Author

I did an empty commit (a522393) and got this error:

Error: D:\a\arrow\arrow\./.github/actions/odbc-windows\action.yml (Line: 71, Col: 12): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.GITHUB_TOKEN
Error: GitHub.DistributedTask.ObjectTemplating.TemplateValidationException: The template is not valid. D:\a\arrow\arrow\./.github/actions/odbc-windows\action.yml (Line: 71, Col: 12): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.GITHUB_TOKEN
   at GitHub.DistributedTask.ObjectTemplating.TemplateValidationErrors.Check()
   at GitHub.Runner.Worker.ActionManifestManagerLegacy.ConvertRuns(IExecutionContext executionContext, TemplateContext templateContext, TemplateToken inputsToken, String fileRelativePath, MappingToken outputs)
   at GitHub.Runner.Worker.ActionManifestManagerLegacy.Load(IExecutionContext executionContext, String manifestFile)
Error: Failed to load D:\a\arrow\arrow\./.github/actions/odbc-windows\action.yml

The same implementation worked yesterday (see https://github.com/apache/arrow/actions/runs/23622018872/job/68803175375). Seems that GitHub might have updated runner, I will look into this.

@alinaliBQ
Copy link
Copy Markdown
Collaborator Author

Error: Failed to load D:\a\arrow\arrow./.github/actions/odbc-windows\action.yml

This issue should be resolved now by commit 95bc75b

@alinaliBQ
Copy link
Copy Markdown
Collaborator Author

@kou @raulcd This PR is ready for review. Please have a look if you have a chance, thank you

Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
@github-actions github-actions Bot added awaiting changes Awaiting changes awaiting change review Awaiting change review and removed awaiting committer review Awaiting committer review awaiting changes Awaiting changes labels Apr 1, 2026
Copy link
Copy Markdown
Collaborator Author

@alinaliBQ alinaliBQ left a comment

Choose a reason for hiding this comment

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

Addressed comments. Please have another look, thanks!

Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Copy link
Copy Markdown
Member

@amoeba amoeba left a comment

Choose a reason for hiding this comment

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

Thanks @alinaliBQ.

@raulcd do you want to have a look? Once we merge, I'll test the whole flow with the script (PR to come) that does the signing so we'll have more chances to fix any issues.

Copy link
Copy Markdown
Member

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

Thanks for the work @alinaliBQ ! I am unsure this is ready yet, sorry it took me a couple days for review, it was Easter and had some family around. My main concern is around, the tag hasn't been updated to match the one on the packaging linux jobs, currently any tag will trigger the job and we only want to do it for RC's. The worlflow dispatch is still around and I thought this was not necessary with the tag.
@amoeba I am about to do the feature freeze, I think this is going to miss 24.0.0, is that ok?

Comment thread .github/workflows/cpp_extra.yml Outdated
schedule:
- cron: |
0 0 * * *
workflow_dispatch:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not sure I understand this. Didn't we agreed to use the tag for the RC? Why is the workflow dispatch needed and referenced below?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The flow is a bit complicated, we need to trigger some jobs when the RC is created but the odbc-msvc-upload-msi step needs to be triggered manually so we use workflow_dispatch. The sequence is,

  1. Release manager tags release
  2. cpp_extra.yml jobs odbc-msvc-upload-dll and odbc-dll-release are run automatically, unsigned DLL is added to release
  3. Release manager locally runs script (TBD) that downloads, signs (w/ jsign), and uploads the signed DLL to the release
  4. Release manager triggers odbc-msvc-upload-msi via workflow_dispatch which builds an unsigned MSI with a signed DLL inside and adds it to the release
  5. Release manager locally runs script that downloads signs (w/ jsign), and uploads the signed MSI to the releasee

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see, I did not understood the process. As the process isn't entirely automated and it requires several manual steps, can we document it on the release page?
https://github.com/apache/arrow/blob/main/docs/source/developers/release.rst

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@amoeba Could you kindly help with the documentation on release page?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Absolutely. I'll file an issue and fill it in as we finish the final PRs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

hi @raulcd, @amoeba has helped to document the process on release page:

# Sign, build the installer for, and sign the installer for the FlightSQL
# ODBC Windows driver
#
# NOTE: This must be run by a PMC member
# Note: You need to have jsign installed and an available credential from
# ASF to sign artifacts. Not all PMC members will have access to code
# signing.
# Note: The script requires setup of ssl.com environment variables.
# Note: Invoking this script costs money.
dev/release/07-flightsqlodbc-upload.sh <version> <rc-number>

@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Apr 7, 2026
@amoeba
Copy link
Copy Markdown
Member

amoeba commented Apr 7, 2026

Thanks for taking a look @raulcd. It's okay if this doesn't make it for 24 but if it's at all possible that'd be great.

Re: the jobs running on any tag, I'm not seeing what you see, could you point out which job needs updating?

  • odbc-msvc: Runs as normal (when labeled with "Extra" label). This is the pre-existing CI for the driver.
  • odbc-msvc-upload-dll: Only runs when ref matches an RC tag and correctly doesn't run on workflow_dispatch
  • odbc-dll-release: Only runs after odbc-msvc-upload-dll
  • odbc-msvc-upload-msi: Only runs on workflow_dispatch

I could see making the last one (odbc-msvc-upload-msi) more defensive.

@alinaliBQ
Copy link
Copy Markdown
Collaborator Author

I am unsure this is ready yet, sorry it took me a couple days for review, it was Easter and had some family around. My main concern is around, the tag hasn't been updated to match the one on the packaging linux jobs, currently any tag will trigger the job and we only want to do it for RC's.

No worries @raulcd, hope you had a good Easter.
odbc-msvc-upload-dll is the job that is only triggered by RC tags. It does a if check to make sure the tag contains -rc:

     ${{ 
        startsWith(github.ref_name, 'apache-arrow-') && 
        contains(github.ref_name, '-rc') && 
        !inputs.odbc_release_step 
      }}

Since having a tags: section will impact all jobs in the cpp_extra.yml file, I used the if statement approach to the job odbc-msvc-upload-dll.

@alinaliBQ
Copy link
Copy Markdown
Collaborator Author

Rebased and resolved merge conflict

@alinaliBQ alinaliBQ force-pushed the gh-49537-ci-sign-win-odbc branch from c0d1bed to ef617ad Compare April 22, 2026 22:17
@alinaliBQ
Copy link
Copy Markdown
Collaborator Author

cc @justing-bq Please help me with code review comments on this PR going forward

@justing-bq justing-bq force-pushed the gh-49537-ci-sign-win-odbc branch 2 times, most recently from 0d6d212 to cffb86d Compare May 5, 2026 21:29
@justing-bq justing-bq force-pushed the gh-49537-ci-sign-win-odbc branch from cffb86d to 808dedb Compare May 19, 2026 18:50
@justing-bq
Copy link
Copy Markdown
Contributor

@lidavidm @kou
Please take a look when you have time.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the C++ “Extra” GitHub Actions workflow to support a two-step Windows ODBC release process where the DLL is built/uploaded unsigned first, then a signed DLL is injected into the MSI build so the resulting MSI contains the signed DLL.

Changes:

  • Added workflow_dispatch input and two new Windows ODBC release jobs: upload unsigned DLL, and build/upload unsigned MSI using a signed DLL from the release.
  • Refactored the Windows ODBC build steps into a new composite action (.github/actions/odbc-windows) to reduce duplication.
  • Removed the previous odbc-release job and updated reporting dependencies accordingly.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.

File Description
.github/workflows/cpp_extra.yml Adds manual release-step controls and new ODBC DLL/MSI release jobs; refactors ODBC Windows build usage to composite action; removes old ODBC release job.
.github/actions/odbc-windows/action.yml Introduces a composite action encapsulating the Windows ODBC build setup (ccache, vcpkg, build, driver registration).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/actions/odbc-windows/action.yml
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment on lines +635 to +669
odbc-msvc-upload-dll:
needs: check-labels
name: ODBC Windows Upload Unsigned DLL
runs-on: windows-2022
if: >-
${{
startsWith(github.ref_name, 'apache-arrow-') &&
contains(github.ref_name, '-rc') &&
!inputs.odbc_release_step
}}
timeout-minutes: 240
permissions:
packages: write
env: *odbc_msvc_env
steps:
- name: Checkout Arrow
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Build ODBC Windows
uses: ./.github/actions/odbc-windows
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Rename Unsigned ODBC DLL
run: |
Rename-Item `
-Path build/cpp/${{ env.ARROW_BUILD_TYPE }}/arrow_flight_sql_odbc.dll `
-NewName arrow_flight_sql_odbc_unsigned.dll
- name: Upload ODBC DLL to the job
uses: actions/upload-artifact@v7
with:
name: flight-sql-odbc-dll
path: build/cpp/${{ env.ARROW_BUILD_TYPE }}/arrow_flight_sql_odbc_unsigned.dll
if-no-files-found: error
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need this?

Can we upload the DLL in the odbc-msvc job instead?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I kept the logic separate since odbc-msvc runs Arrow ODBC tests. I see other Github upload workflows like package_linux.yml don't run Arrow tests, so I followed that pattern.

Comment thread .github/workflows/cpp_extra.yml Outdated
Comment on lines +671 to +757
odbc-dll-release:
needs: odbc-msvc-upload-dll
name: Upload Unsigned ODBC DLL
runs-on: ubuntu-latest
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@v8
with:
name: flight-sql-odbc-dll
- 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 \
arrow_flight_sql_odbc_unsigned.dll

odbc-msvc-upload-msi:
needs: check-labels
name: ODBC Windows Build & Upload Unsigned MSI
runs-on: windows-2022
if: inputs.odbc_release_step
timeout-minutes: 240
permissions:
# Upload to GitHub Release
contents: write
packages: write
env: *odbc_msvc_env
steps:
- name: Checkout Arrow
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Download signed ODBC DLL
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download $env:GITHUB_REF_NAME `
--pattern arrow_flight_sql_odbc.dll `
--clobber
- name: Build ODBC Windows
uses: ./.github/actions/odbc-windows
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Replace signed DLL with unsigned DLL
run: |
Move-Item `
-Path ./arrow_flight_sql_odbc.dll `
-Destination build/cpp/${{ env.ARROW_BUILD_TYPE }}/arrow_flight_sql_odbc.dll `
-Force
- name: Install WiX Toolset
shell: pwsh
run: |
Invoke-WebRequest -Uri https://github.com/wixtoolset/wix/releases/download/v6.0.0/wix-cli-x64.msi -OutFile wix-cli-x64.msi
Start-Process -FilePath wix-cli-x64.msi -ArgumentList '/quiet', 'Include_freethreaded=1' -Wait
echo "C:\Program Files\WiX Toolset v6.0\bin\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Build MSI ODBC installer
shell: pwsh
run: |
# Verify WiX version
wix --version
cd build/cpp
cpack
- name: Upload the artifacts to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd build/cpp
gh release upload $env:GITHUB_REF_NAME `
--clobber `
Apache-Arrow-Flight-SQL-ODBC-*-win64.msi
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How about moving these jobs to separated workflow (package_odbc.yml?) for easy to understand?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes I think this is a good idea. cc @justing-bq we can look into this.

Comment thread .github/workflows/cpp_extra.yml Outdated
Comment on lines +671 to +701
odbc-dll-release:
needs: odbc-msvc-upload-dll
name: Upload Unsigned ODBC DLL
runs-on: ubuntu-latest
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@v8
with:
name: flight-sql-odbc-dll
- 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 \
arrow_flight_sql_odbc_unsigned.dll
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How about uploading the unsigned DLL to GitHub Release in the odbc-msvc job?

We can use if: startsWith(github.ref_name, 'apache-arrow-') && contains(github.ref_name, '-rc') for a step that uploads the unsigned DLL to GitHub Release.

Copy link
Copy Markdown
Collaborator Author

@alinaliBQ alinaliBQ May 21, 2026

Choose a reason for hiding this comment

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

I think odbc-dll-release can stay as a separate Ubuntu job since dev/release/utils-watch-gh-workflow.sh only runs on ubuntu-latest. Before I tried running dev/release/utils-watch-gh-workflow.sh on windows-2022 and it didn't work.
We can move the uploading logic to a separate file

Comment thread .github/workflows/cpp_extra.yml Outdated
@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels May 20, 2026
@justing-bq justing-bq force-pushed the gh-49537-ci-sign-win-odbc branch from 808dedb to 2632c7d Compare May 20, 2026 17:43
@github-actions github-actions Bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels May 20, 2026
* Add draft code for CI A and CI B

Attempt workflow dispatch

Only ODBC Windows original workflow should run.
Later need to add `github.event_name != 'workflow_dispatch' ||` to all existing workflows after uncomment

Use `GITHUB_REF_NAME` directly via push

Add `workflow_dispatch` definitions

Add `ODBC Windows Upload DLL`

Use common ODBC Windows environment variables

Use ODBC as composite action

Create cpp_odbc.yml

Initial draft

temp disable test step

Temp disable non-ODBC Windows workflows

* Clean Up Code

* Remove comments

* Fix Installer path for MSI

Trigger CI

Fix issue with `secrets.GITHUB_TOKEN`

Change `odbc_msi_upload` to boolean input

Change `odbc-msvc-upload-dll` to be triggered via rc tag and can be invoked manually

Work on Bryce's code review comments
@justing-bq justing-bq force-pushed the gh-49537-ci-sign-win-odbc branch from 2632c7d to 0f3fefd Compare May 21, 2026 16:37
Copy link
Copy Markdown
Collaborator Author

@alinaliBQ alinaliBQ left a comment

Choose a reason for hiding this comment

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

Thanks for the review kou. I will work with Justin to address the comments

Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
Comment on lines +647 to +649
exit 1

odbc-msvc-upload-dll:
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

To address: #49603 comment

Suggested change
exit 1
odbc-msvc-upload-dll:
exit 1
# GH-49537 CPack only packages from a single build directory, so the build cannot be reused and we need to rebuild MSI in separate workflow.
odbc-msvc-upload-dll:

@justing-bq feel free to reword my draft comment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Done.

Comment thread .github/workflows/cpp_extra.yml Outdated
Comment on lines +671 to +701
odbc-dll-release:
needs: odbc-msvc-upload-dll
name: Upload Unsigned ODBC DLL
runs-on: ubuntu-latest
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@v8
with:
name: flight-sql-odbc-dll
- 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 \
arrow_flight_sql_odbc_unsigned.dll
Copy link
Copy Markdown
Collaborator Author

@alinaliBQ alinaliBQ May 21, 2026

Choose a reason for hiding this comment

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

I think odbc-dll-release can stay as a separate Ubuntu job since dev/release/utils-watch-gh-workflow.sh only runs on ubuntu-latest. Before I tried running dev/release/utils-watch-gh-workflow.sh on windows-2022 and it didn't work.
We can move the uploading logic to a separate file

Comment thread .github/workflows/cpp_extra.yml Outdated
Comment on lines +635 to +669
odbc-msvc-upload-dll:
needs: check-labels
name: ODBC Windows Upload Unsigned DLL
runs-on: windows-2022
if: >-
${{
startsWith(github.ref_name, 'apache-arrow-') &&
contains(github.ref_name, '-rc') &&
!inputs.odbc_release_step
}}
timeout-minutes: 240
permissions:
packages: write
env: *odbc_msvc_env
steps:
- name: Checkout Arrow
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Build ODBC Windows
uses: ./.github/actions/odbc-windows
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Rename Unsigned ODBC DLL
run: |
Rename-Item `
-Path build/cpp/${{ env.ARROW_BUILD_TYPE }}/arrow_flight_sql_odbc.dll `
-NewName arrow_flight_sql_odbc_unsigned.dll
- name: Upload ODBC DLL to the job
uses: actions/upload-artifact@v7
with:
name: flight-sql-odbc-dll
path: build/cpp/${{ env.ARROW_BUILD_TYPE }}/arrow_flight_sql_odbc_unsigned.dll
if-no-files-found: error
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I kept the logic separate since odbc-msvc runs Arrow ODBC tests. I see other Github upload workflows like package_linux.yml don't run Arrow tests, so I followed that pattern.

Comment thread .github/workflows/cpp_extra.yml Outdated
Comment on lines +671 to +757
odbc-dll-release:
needs: odbc-msvc-upload-dll
name: Upload Unsigned ODBC DLL
runs-on: ubuntu-latest
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@v8
with:
name: flight-sql-odbc-dll
- 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 \
arrow_flight_sql_odbc_unsigned.dll

odbc-msvc-upload-msi:
needs: check-labels
name: ODBC Windows Build & Upload Unsigned MSI
runs-on: windows-2022
if: inputs.odbc_release_step
timeout-minutes: 240
permissions:
# Upload to GitHub Release
contents: write
packages: write
env: *odbc_msvc_env
steps:
- name: Checkout Arrow
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Download signed ODBC DLL
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download $env:GITHUB_REF_NAME `
--pattern arrow_flight_sql_odbc.dll `
--clobber
- name: Build ODBC Windows
uses: ./.github/actions/odbc-windows
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Replace signed DLL with unsigned DLL
run: |
Move-Item `
-Path ./arrow_flight_sql_odbc.dll `
-Destination build/cpp/${{ env.ARROW_BUILD_TYPE }}/arrow_flight_sql_odbc.dll `
-Force
- name: Install WiX Toolset
shell: pwsh
run: |
Invoke-WebRequest -Uri https://github.com/wixtoolset/wix/releases/download/v6.0.0/wix-cli-x64.msi -OutFile wix-cli-x64.msi
Start-Process -FilePath wix-cli-x64.msi -ArgumentList '/quiet', 'Include_freethreaded=1' -Wait
echo "C:\Program Files\WiX Toolset v6.0\bin\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Build MSI ODBC installer
shell: pwsh
run: |
# Verify WiX version
wix --version
cd build/cpp
cpack
- name: Upload the artifacts to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd build/cpp
gh release upload $env:GITHUB_REF_NAME `
--clobber `
Apache-Arrow-Flight-SQL-ODBC-*-win64.msi
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes I think this is a good idea. cc @justing-bq we can look into this.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/cpp_extra.yml Outdated
Comment on lines +699 to +700
- odbc-msvc-upload-dll
- odbc-msvc-upload-msi
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Done.

Comment on lines +21 to +36
push:
branches:
- '**'
- '!dependabot/**'
paths:
- '.github/actions/odbc-windows/action.yml'
- '.github/workflows/check_labels.yml'
- '.github/workflows/cpp_extra.yml'
- '.github/workflows/report_ci.yml'
- 'ci/scripts/ccache_setup.sh'
- 'ci/scripts/cpp_*'
- 'ci/scripts/download_tz_database.sh'
- 'ci/scripts/install_ccache.sh'
- 'cpp/**'
- 'format/Flight.proto'
- 'testing'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Done.

Comment thread dev/release/07-flightsqlodbc-upload.sh Outdated
if [ "${PHASE_BUILD_MSI}" -gt 0 ]; then
echo "[4/8 Triggering odbc_release_step in cpp_extra.yml workflow..."
gh workflow run cpp_extra.yml \
echo "[4/8 Triggering odbc_release_step in package_odbc.yml workflow..."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Done.

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

Labels

awaiting change review Awaiting change review CI: Extra: C++ Run extra C++ CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants