-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-47787: [C++][FlightRPC] ODBC msi Windows installer
#48054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
ce5c956 to
34ebe24
Compare
alinaliBQ
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For installer to be able to select different components, we needed to add COMPONENT to other parts of Arrow cpp that gets build with ODBC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an image of Arrow banner
msi Windows installermsi Windows installer
8487389 to
20ad8c6
Compare
msi Windows installermsi Windows installer
2728022 to
9199d85
Compare
msi Windows installermsi Windows installer
9199d85 to
6c8c099
Compare
Minor fix for DSN Window So ODBC installed by installer works as intended Change Arrow odbc component name to `arrow_flight_sql_odbc` Add component name for `ARROW_BUILD_UTILITIES` * change component name for Flight SQL ODBC to be more consistent Use targets instead of hard-coded dll regex Add `RUNTIME ` removes `.lib` file Clean up Attempt to fix CI ODBC msi Add debug message for odbc bin install path Add ODBC Installer definitions Move path for Windows install files Extract ODBC installer Need to add `component` to other parts to be able to select the ODBC components Add product ID to Windows installer With stable product and upgrade id, Windows will be able to properly recognize ODBC installer as the same product, and prevent double-installation from happening. Update README Co-Authored-By: vic-tsang <victor.tsang@improving.com> Co-Authored-By: alinalibq <alina.li@improving.com>
9c24910 to
6731c9c
Compare
.github/workflows/cpp_extra.yml
Outdated
| run: | | ||
| # Verify WiX version | ||
| wix --version | ||
| cd "${{ github.workspace }}\build\cpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we simplify this?
| cd "${{ github.workspace }}\build\cpp" | |
| cd "build\cpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, fixed
.github/workflows/cpp_extra.yml
Outdated
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: flight-sql-odbc-msi-installer | ||
| path: ${{ github.workspace }}\build\cpp\Apache Arrow Flight SQL ODBC-1.0.0-win64.msi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we simplify this?
| path: ${{ github.workspace }}\build\cpp\Apache Arrow Flight SQL ODBC-1.0.0-win64.msi | |
| path: build\cpp\Apache Arrow Flight SQL ODBC-1.0.0-win64.msi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, removed ${{ github.workspace }}
| @@ -0,0 +1,37 @@ | |||
| <?xml version="1.0" encoding="windows-1252"?> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is windows-1252 expected?
Can we use UTF-8 instead?
| <RegistryKey Root="HKLM" | ||
| Key="Software\ODBC\ODBCINST.INI\Apache Arrow Flight SQL ODBC Driver"> | ||
| <!-- CM_FP_arrow_flight_sql_odbc.bin.arrow_flight_sql_odbc.dll is a generated variable value from build\_CPack_Packages\win64\WIX\files.wxs --> | ||
| <RegistryValue Type="string" Name="DriverODBCVer" Value="03.00"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the version of our Flight SQL ODBC version?
Can we use the same version as Apache Arrow C++?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DriverODBCVer refers to the ODBC API version which is 3.0 for Flight SQL ODBC. The Flight SQL ODBC driver version is set by ODBC_PACKAGE_VERSION_* variables in CMake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, sorry.
| set(ODBC_PACKAGE_VERSION_MAJOR "1") | ||
| set(ODBC_PACKAGE_VERSION_MINOR "0") | ||
| set(ODBC_PACKAGE_VERSION_PATCH "0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the same version as Apache Arrow C++?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I have changed these values to corresponding arrow_VERSION_*.
| // under the License. | ||
|
|
||
| #define VER_FILEVERSION @VER_FILEVERSION@ | ||
| #define VER_FILEVERSION_STR "@VER_FILEVERSION_STR@\0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is \0 needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think so, I think it's because a null-terminated string is expected. I got it (\0) from Msft example here.
| set(CPACK_PACKAGE_NAME ${ODBC_PACKAGE_NAME}) | ||
| set(CPACK_PACKAGE_VENDOR ${ODBC_PACKAGE_VENDOR}) | ||
| set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache Arrow Flight SQL ODBC Driver") | ||
| set(CPACK_PACKAGE_CONTACT "#GH-47787 TODO arrow maintainers") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need an e-mail address here?
If so, could you use dev@arrow.apache.org?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes email addresses are needed. I have changed it to dev@arrow.apache.org, thanks!
| DISPLAY_NAME "ODBC library" | ||
| DESCRIPTION "ODBC library bin, required to install" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure whether this is used but do we need to include "Apache Arrow Flight SQL" or something in them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add .md extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Done
cpp/src/arrow/flight/sql/odbc/README
Outdated
| iii. Run script to register your ODBC DLL as Apache Arrow Flight SQL ODBC Driver | ||
| `.\cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd <path\to\repo>\cpp\build\< release | debug >\< Release | Debug>\arrow_flight_sql_odbc.dll` | ||
| Example command for reference: | ||
| `.\cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd C:\path\to\arrow\cpp\build\release\Release\arrow_flight_sql_odbc.dll` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `.\cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd C:\path\to\arrow\cpp\build\release\Release\arrow_flight_sql_odbc.dll` | |
| Need to replace <path\to\repo> with actual path to repository in the commands. | |
| 1. `cd to repo.` | |
| 2. `cd <path\to\repo>` | |
| 3. Run script to register your ODBC DLL as Apache Arrow Flight SQL ODBC Driver | |
| ``` | |
| .\cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd <path\to\repo>\cpp\build\< release | debug >\< Release | Debug>\arrow_flight_sql_odbc.dll | |
| ``` | |
| Example command for reference: | |
| ``` | |
| .\cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd C:\path\to\arrow\cpp\build\release\Release\arrow_flight_sql_odbc.dll | |
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
- Simplify CI - Update installer files - Update README.md Change to `README.md`
alinaliBQ
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kou Thanks for the review. All comments have been addressed
.github/workflows/cpp_extra.yml
Outdated
| run: | | ||
| # Verify WiX version | ||
| wix --version | ||
| cd "${{ github.workspace }}\build\cpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, fixed
.github/workflows/cpp_extra.yml
Outdated
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: flight-sql-odbc-msi-installer | ||
| path: ${{ github.workspace }}\build\cpp\Apache Arrow Flight SQL ODBC-1.0.0-win64.msi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, removed ${{ github.workspace }}
| <RegistryKey Root="HKLM" | ||
| Key="Software\ODBC\ODBCINST.INI\Apache Arrow Flight SQL ODBC Driver"> | ||
| <!-- CM_FP_arrow_flight_sql_odbc.bin.arrow_flight_sql_odbc.dll is a generated variable value from build\_CPack_Packages\win64\WIX\files.wxs --> | ||
| <RegistryValue Type="string" Name="DriverODBCVer" Value="03.00"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DriverODBCVer refers to the ODBC API version which is 3.0 for Flight SQL ODBC. The Flight SQL ODBC driver version is set by ODBC_PACKAGE_VERSION_* variables in CMake
| set(ODBC_PACKAGE_VERSION_MAJOR "1") | ||
| set(ODBC_PACKAGE_VERSION_MINOR "0") | ||
| set(ODBC_PACKAGE_VERSION_PATCH "0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I have changed these values to corresponding arrow_VERSION_*.
| set(ODBC_PACKAGE_VERSION_MINOR "0") | ||
| set(ODBC_PACKAGE_VERSION_PATCH "0") | ||
| set(ODBC_PACKAGE_NAME "Apache Arrow Flight SQL ODBC") | ||
| set(ODBC_PACKAGE_VENDOR "Apache Arrow") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, fixed
| // under the License. | ||
|
|
||
| #define VER_FILEVERSION @VER_FILEVERSION@ | ||
| #define VER_FILEVERSION_STR "@VER_FILEVERSION_STR@\0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think so, I think it's because a null-terminated string is expected. I got it (\0) from Msft example here.
| set(CPACK_PACKAGE_NAME ${ODBC_PACKAGE_NAME}) | ||
| set(CPACK_PACKAGE_VENDOR ${ODBC_PACKAGE_VENDOR}) | ||
| set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache Arrow Flight SQL ODBC Driver") | ||
| set(CPACK_PACKAGE_CONTACT "#GH-47787 TODO arrow maintainers") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes email addresses are needed. I have changed it to dev@arrow.apache.org, thanks!
| DISPLAY_NAME "ODBC library" | ||
| DESCRIPTION "ODBC library bin, required to install" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Done
cpp/src/arrow/flight/sql/odbc/README
Outdated
| iii. Run script to register your ODBC DLL as Apache Arrow Flight SQL ODBC Driver | ||
| `.\cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd <path\to\repo>\cpp\build\< release | debug >\< Release | Debug>\arrow_flight_sql_odbc.dll` | ||
| Example command for reference: | ||
| `.\cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd C:\path\to\arrow\cpp\build\release\Release\arrow_flight_sql_odbc.dll` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
kou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
|
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 45cf928. There weren't enough matching historic benchmark results to make a call on whether there were regressions. The full Conbench report has more details. |

Rationale for this change
Implement ODBC installer code for Windows. The primary platform for ODBC is MSVC Windows. The version is set to 1.0.0.
What changes are included in this PR?
Are these changes tested?
Tested locally on MSVC Windows
Are there any user-facing changes?
N/A