Skip to content

Commit 8983ce7

Browse files
authored
Bump trino-cli version (#822)
* Bump trino-cli version * Update old example scripts
1 parent 4c6c036 commit 8983ce7

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

modules/tutorials/examples/ldap-auth/40-modify-superset.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ echo "Applying updated configuration"
2929
kubectl apply -f superset.yaml
3030
# end::apply-superset-cluster[]
3131

32+
sleep 1 # it takes time before the statefulset is recreated
33+
3234
echo "Waiting for superset StatefulSet ..."
3335
kubectl rollout status --watch statefulset/superset-node-default
3436

35-
sleep 2 # just to be sure we're up and running
37+
sleep 2 # just to be sure we're up and running

modules/tutorials/examples/ldap-auth/60-modify-trino.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ echo "Applying updated configuration"
3131
kubectl apply -f trino.yaml
3232
# end::apply[]
3333

34+
sleep 1 # it takes time before the statefulset is recreated
35+
3436
echo "Waiting for Trino StatefulSets rollout ..."
3537
kubectl rollout status --watch statefulset/trino-coordinator-default
3638
kubectl rollout status --watch statefulset/trino-worker-default

modules/tutorials/examples/ldap-auth/80-verify-trino.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
set -euo pipefail
33

44

5-
trino_version="476"
6-
trino_download_url="https://repo.stackable.tech/repository/packages/trino-cli/trino-cli-${trino_version}-executable.jar"
5+
trino_version="479"
6+
trino_download_url="https://repo.stackable.tech/repository/packages/trino-cli/trino-cli-${trino_version}"
77

88
trino_login() {
99
local username="$1"
1010
local password="$2"
1111

1212

13-
trino_binary="./trino.jar"
13+
trino_binary="./trino-cli"
1414

1515
if [[ ! -f "$trino_binary" ]]; then
1616
echo "Downloading trino client ...";
1717
curl -s --output "$trino_binary" "$trino_download_url"
1818
chmod +x "$trino_binary"
1919
fi
2020

21-
trino_addr=$(stackablectl svc list -o json | jq --raw-output '.trino| .[0] | .endpoints | .["coordinator-https"]')
21+
trino_addr=$(stackablectl stacklet list -o json | jq --raw-output '.[] | select(.name == "trino") | .endpoints | .["coordinator-https"]')
2222

2323
output=$(echo "$password" | "$trino_binary" --insecure --output-format=CSV_UNQUOTED --server "$trino_addr" --user "$username" --execute "SHOW CATALOGS" --password)
2424

@@ -33,7 +33,7 @@ password="alice"
3333

3434
echo "Testing trino login with $username:$password ..."
3535
if trino_login "$username" "$password"; then
36-
echo "Login sucessful"
36+
echo "Login successful"
3737
else
3838
echo "Login unsuccessful"
3939
exit 1

modules/tutorials/examples/ldap-auth/utils.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ superset_login() {
99
request_data=$(printf '{"provider": "%s", "username": "%s", "password": "%s", "refresh": false}' "$provider" "$username" "$password")
1010

1111
local superset_addr
12-
superset_addr=$(stackablectl svc list -o json | jq --raw-output '.superset| .[0] | .endpoints | .["external-superset"]')
12+
superset_addr=$(stackablectl stacklet list -o json | jq --raw-output '.[] | select(.name == "superset") | .endpoints | .["node-http"]')
1313
local superset_endpoint="$superset_addr"/api/v1/security/login
1414

1515
json_header='Content-Type: application/json'
@@ -21,4 +21,4 @@ superset_login() {
2121
return 0
2222
fi
2323
return 1
24-
}
24+
}

0 commit comments

Comments
 (0)