Skip to content

fix(spark-anomaly-detection): Adjust Trino HTTPS connection #251

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

Merged
merged 13 commits into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,25 @@ spec:
initContainers:
- name: wait-for-testdata
image: oci.stackable.tech/sdp/testing-tools:0.2.0-stackable0.0.0-dev
command: ["bash", "-c", "echo 'Waiting for job load-ny-taxi-data to finish' && kubectl wait --for=condition=complete --timeout=30m job/load-ny-taxi-data"]
command:
- bash
- -euo
- pipefail
- -c
- |
echo 'Waiting for job load-ny-taxi-data to finish'
kubectl wait --for=condition=complete --timeout=30m job/load-ny-taxi-data
containers:
- name: create-spark-anomaly-detection-job
image: oci.stackable.tech/sdp/testing-tools:0.2.0-stackable0.0.0-dev
command: ["bash", "-c", "echo 'Submitting Spark job' && kubectl apply -f /tmp/manifest/spark-ad-job.yaml"]
command:
- bash
- -euo
- pipefail
- -c
- |
echo 'Submitting Spark job'
kubectl apply -f /tmp/manifest/spark-ad-job.yaml
volumeMounts:
- name: manifest
mountPath: /tmp/manifest
Expand Down Expand Up @@ -89,7 +103,7 @@ data:
spark.sql.extensions: org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions
spark.sql.catalog.prediction: org.apache.iceberg.spark.SparkCatalog
spark.sql.catalog.prediction.type: hive
spark.sql.catalog.prediction.uri: thrift://hive-iceberg:9083
spark.sql.catalog.prediction.uri: thrift://hive-iceberg-metastore:9083
# AFAIK This can be removed in 24.3
#spark.driver.userClassPathFirst: "false"
#spark.executor.userClassPathFirst: "false"
Expand Down
11 changes: 9 additions & 2 deletions demos/spark-k8s-anomaly-detection-taxi-data/setup-superset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ spec:
containers:
- name: setup-superset
image: oci.stackable.tech/sdp/testing-tools:0.2.0-stackable0.0.0-dev
command: ["bash", "-c", "curl -o superset-assets.zip https://raw.githubusercontent.com/stackabletech/demos/main/demos/spark-k8s-anomaly-detection-taxi-data/superset-assets.zip && python -u /tmp/script/script.py"]
command:
- bash
- -euo
- pipefail
- -c
- |
curl -L -o superset-assets.zip sets.zip https://raw.githubusercontent.com/stackabletech/demos/main/demos/spark-k8s-anomaly-detection-taxi-data/superset-assets.zip
Copy link
Member

Choose a reason for hiding this comment

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

there is typo here

Copy link
Member

Choose a reason for hiding this comment

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

Can you be more specific?
Is the indentation a problem? ie:

Suggested change
curl -L -o superset-assets.zip sets.zip https://raw.githubusercontent.com/stackabletech/demos/main/demos/spark-k8s-anomaly-detection-taxi-data/superset-assets.zip
curl -L -o superset-assets.zip sets.zip https://raw.githubusercontent.com/stackabletech/demos/main/demos/spark-k8s-anomaly-detection-taxi-data/superset-assets.zip

Copy link
Member

Choose a reason for hiding this comment

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

the sets.zip is too much and it looks like a left over that breaks the curl output

Copy link
Member

Choose a reason for hiding this comment

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

python -u /tmp/script/script.py
volumeMounts:
- name: script
mountPath: /tmp/script
Expand Down Expand Up @@ -39,7 +46,7 @@ data:
import logging
import requests

base_url = "http://superset-node-default:8088" # For local testing / developing replace it, afterwards change back to http://superset-node-default:8088
base_url = "http://superset-node:8088" # For local testing / developing replace it, afterwards change back to http://superset-node:8088
superset_username = open("/superset-credentials/adminUser.username").read()
superset_password = open("/superset-credentials/adminUser.password").read()
trino_username = "admin"
Expand Down
Binary file modified demos/spark-k8s-anomaly-detection-taxi-data/superset-assets.zip
Copy link
Member

Choose a reason for hiding this comment

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

We should remember to copy this zip to other demos that have one (though I'm unsure if they are all equal).

Binary file not shown.
4 changes: 2 additions & 2 deletions stacks/trino-superset-s3/superset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ stringData:
adminUser.firstname: Superset
adminUser.lastname: Admin
adminUser.email: [email protected]
adminUser.password: {{ supersetAdminPassword }}
connections.secretKey: {{ supersetSecretKey }}
adminUser.password: "{{ supersetAdminPassword }}"
connections.secretKey: "{{ supersetSecretKey }}"
connections.sqlalchemyDatabaseUri: postgresql://superset:superset@postgresql-superset/superset
---
apiVersion: v1
Expand Down