-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-48576: [C++][FlightRPC] ODBC: add Mac setup script #48578
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
base: main
Are you sure you want to change the base?
Conversation
|
|
lidavidm
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.
Is it possible to guard the scripts with (e.g.) set -euo pipefail?
| odbc_install_script="${source_dir}/install_odbc.sh" | ||
|
|
||
| chmod +x "$odbc_install_script" | ||
| . "$odbc_install_script" /Library/Apache/ArrowFlightSQLODBC/lib/libarrow_flight_sql_odbc.dylib |
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 have to source the script?
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.
Thanks for catching it, I think it is not necessary. Removed sourcing of the script.
3292db5 to
c64342b
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.
Thanks for the review David, addressed all comments
| odbc_install_script="${source_dir}/install_odbc.sh" | ||
|
|
||
| chmod +x "$odbc_install_script" | ||
| . "$odbc_install_script" /Library/Apache/ArrowFlightSQLODBC/lib/libarrow_flight_sql_odbc.dylib |
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.
Thanks for catching it, I think it is not necessary. Removed sourcing of the script.
@lidavidm Yes, I have added the guards at the beginning of scripts. |
| @@ -0,0 +1,78 @@ | |||
| #!/bin/sh | |||
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.
Are we using plain sh, or assuming something else (zsh on macOS?)
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.
Good catch and I have changed to use #!/bin/bash. The scripts assume bash shells on macOS are used.
3d97d65 to
8045be2
Compare
5c55ed2 to
c0c1ce4
Compare
|
@lidavidm This PR is ready for review! Please have a look |
.github/workflows/cpp_extra.yml
Outdated
| ci/scripts/cpp_build.sh $(pwd) $(pwd)/build | ||
| - name: Register Flight SQL ODBC Driver | ||
| run: | | ||
| chmod +x cpp/src/arrow/flight/sql/odbc/install/mac/install_odbc.sh |
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.
Should the script just be marked executable when checked into git?
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. I think the script was already marked executable, I have removed the unneeded chmod +x line
| @@ -0,0 +1,85 @@ | |||
| #!/bin/bash | |||
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.
Right now this file isn't used anywhere, is it? Should we add it when we are using it if we plan to follow up with other PRs?
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, that's fair. I have removed this file from this PR
* added setup script for mac and platform folders Co-Authored-By: Alina (Xi) Li <alina.li@improving.com> Co-Authored-By: vic-tsang <victor.tsang@improving.com> Update install_odbc.sh
- Moved admin check upwards - removed sourcing of script that isn't required
The scripts assume bash shells on macOS are used.
The scripts are already executable. `chmod +x` should not be needed
c0c1ce4 to
7a0e164
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.
Addressed comments
.github/workflows/cpp_extra.yml
Outdated
| ci/scripts/cpp_build.sh $(pwd) $(pwd)/build | ||
| - name: Register Flight SQL ODBC Driver | ||
| run: | | ||
| chmod +x cpp/src/arrow/flight/sql/odbc/install/mac/install_odbc.sh |
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. I think the script was already marked executable, I have removed the unneeded chmod +x line
Rationale for this change
#48576
What changes are included in this PR?
Are these changes tested?
Script is tested in CI.
Tested locally on macOS.
Are there any user-facing changes?
N/A