-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added flight_sql_client, and renamed flight_sql executable to: flight_sql_server * Updated Python Docker image to 3.11.8 * Added gflags library to CI/Dockerfile * Fix sign/notarize * Remove signing of client app * Fixing pgrep command in test_flight_sql.sh * Fixing pgrep command in test_flight_sql.sh, again * Attempting to sign client again (with modified action) * Added mTLS support in flight_sql_client. Updated README.md with instructions on how to use the client.
- Loading branch information
Showing
12 changed files
with
379 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,29 +28,39 @@ jobs: | |
|
||
- name: Install build requirements | ||
run: | | ||
brew install boost | ||
brew install boost gflags | ||
- name: Configure Project | ||
uses: threeal/[email protected] | ||
with: | ||
generator: Ninja | ||
run-build: true | ||
|
||
- name: Sign and notarize the release build | ||
uses: toitlang/action-macos-sign-notarize@v1.1.1 | ||
- name: Sign and notarize the server release build | ||
uses: prmoore77/action-macos-sign-notarize@b0f525e0d98a47b0884558b786f21453889a04d7 | ||
with: | ||
certificate: ${{ secrets.APPLE_CERTIFICATE }} | ||
certificate-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | ||
username: ${{ secrets.APPLE_ID_USERNAME }} | ||
password: ${{ secrets.APPLE_ID_PASSWORD }} | ||
apple-team-id: ${{ secrets.APPLE_TEAM_ID }} | ||
app-path: build/flight_sql | ||
app-path: build/flight_sql_server | ||
entitlements-path: macos/entitlements.plist | ||
|
||
- name: Sign and notarize the server release build | ||
uses: prmoore77/action-macos-sign-notarize@b0f525e0d98a47b0884558b786f21453889a04d7 | ||
with: | ||
certificate: ${{ secrets.APPLE_CERTIFICATE }} | ||
certificate-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | ||
username: ${{ secrets.APPLE_ID_USERNAME }} | ||
password: ${{ secrets.APPLE_ID_PASSWORD }} | ||
apple-team-id: ${{ secrets.APPLE_TEAM_ID }} | ||
app-path: build/flight_sql_client | ||
|
||
- name: Zip artifacts | ||
run: | | ||
mv build/flight_sql . | ||
zip -j ${{ env.zip_file_name }} flight_sql | ||
mv build/flight_sql_server build/flight_sql_client . | ||
zip -j ${{ env.zip_file_name }} flight_sql_server flight_sql_client | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -86,7 +96,8 @@ jobs: | |
cmake \ | ||
gcc \ | ||
git \ | ||
libboost-all-dev | ||
libboost-all-dev \ | ||
libgflags-dev | ||
sudo apt-get clean | ||
sudo rm -rf /var/lib/apt/lists/* | ||
|
@@ -98,8 +109,8 @@ jobs: | |
|
||
- name: Zip artifacts | ||
run: | | ||
mv build/flight_sql . | ||
zip -j ${{ env.zip_file_name }} flight_sql | ||
mv build/flight_sql_server build/flight_sql_client . | ||
zip -j ${{ env.zip_file_name }} flight_sql_server flight_sql_client | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,39 @@ | ||
import os | ||
from time import sleep | ||
import pyarrow | ||
from adbc_driver_flightsql import dbapi as flight_sql, DatabaseOptions | ||
|
||
flight_password = os.getenv("FLIGHT_PASSWORD") | ||
|
||
with flight_sql.connect(uri="grpc+tls://localhost:31337", | ||
db_kwargs={"username": "flight_username", | ||
"password": flight_password, | ||
DatabaseOptions.TLS_SKIP_VERIFY.value: "true" # Not needed if you use a trusted CA-signed TLS cert | ||
} | ||
) as conn: | ||
with conn.cursor() as cur: | ||
cur.execute("SELECT n_nationkey, n_name FROM nation WHERE n_nationkey = ?", | ||
parameters=[24] | ||
) | ||
x = cur.fetch_arrow_table() | ||
print(x) | ||
# Setup variables | ||
max_attempts: int = 10 | ||
sleep_interval: int = 10 | ||
flight_password = os.environ["FLIGHT_PASSWORD"] | ||
|
||
def main(): | ||
for attempt in range(max_attempts): | ||
try: | ||
with flight_sql.connect(uri="grpc+tls://localhost:31337", | ||
db_kwargs={"username": "flight_username", | ||
"password": flight_password, | ||
DatabaseOptions.TLS_SKIP_VERIFY.value: "true" # Not needed if you use a trusted CA-signed TLS cert | ||
} | ||
) as conn: | ||
with conn.cursor() as cur: | ||
cur.execute("SELECT n_nationkey, n_name FROM nation WHERE n_nationkey = ?", | ||
parameters=[24] | ||
) | ||
x = cur.fetch_arrow_table() | ||
print(x) | ||
except Exception as e: | ||
if attempt == max_attempts - 1: | ||
raise e | ||
else: | ||
print(f"Attempt {attempt + 1} failed: {e}, sleeping for {sleep_interval} seconds") | ||
sleep(sleep_interval) | ||
else: | ||
print("Success!") | ||
break | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.