Skip to content

Commit 609c31a

Browse files
Add debug spice cloud workflow, move debug inputs from main workflow (#221)
- Move spidapter_version and enable_module_debug_logging to new debug workflow - Lock scenario to tpch dropdown in main workflow
1 parent 5cb04e1 commit 609c31a

2 files changed

Lines changed: 196 additions & 16 deletions

File tree

.github/workflows/run_spicebench.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ on:
55
workflow_dispatch:
66
inputs:
77
scenario:
8-
description: 'Scenario/query set to run (e.g. tpch)'
8+
description: 'Scenario/query set to run'
99
required: true
1010
default: 'tpch'
11-
type: string
11+
type: choice
12+
options:
13+
- tpch
1214
system_under_test:
1315
description: 'System under test (spice_cloud via spidapter docker image, or local databricks adapter modes)'
1416
required: true
@@ -35,16 +37,7 @@ on:
3537
- '0.1'
3638
- '1'
3739
- '10'
38-
spidapter_version:
39-
description: 'Spidapter image version tag (e.g. latest, v1.0.0)'
40-
required: false
41-
default: 'latest'
42-
type: string
43-
enable_module_debug_logging:
44-
description: 'Enable debug logs'
45-
required: false
46-
default: false
47-
type: boolean
40+
4841
jobs:
4942
run-spicebench:
5043
name: Run spicebench
@@ -71,7 +64,7 @@ jobs:
7164

7265
- name: pull spidapter image
7366
if: ${{ github.event.inputs.system_under_test == 'spice_cloud' }}
74-
run: docker pull ghcr.io/spiceai/spidapter:${{ github.event.inputs.spidapter_version || 'latest' }}
67+
run: docker pull ghcr.io/spiceai/spidapter:latest
7568

7669
- uses: ./.github/actions/build-spicebench
7770

@@ -133,7 +126,7 @@ jobs:
133126
exit 1
134127
fi
135128
136-
docker image inspect ghcr.io/spiceai/spidapter:${{ github.event.inputs.spidapter_version || 'latest' }} >/dev/null 2>&1 || {
129+
docker image inspect ghcr.io/spiceai/spidapter:latest >/dev/null 2>&1 || {
137130
echo "spidapter docker image not found locally; pull step may have failed"
138131
exit 1
139132
}
@@ -229,7 +222,7 @@ jobs:
229222
ETL_SINK: 'adbc'
230223
SCHEDULER_STATE_LOCATION: 's3://spiceai-testing-cluster-state/spicebench-scheduler-state-${{ github.run_id }}/'
231224
VALIDATE_CHECKPOINT_RESULTS: 'true'
232-
ENABLE_MODULE_DEBUG_LOGGING: ${{ github.event.inputs.enable_module_debug_logging || 'false' }}
225+
ENABLE_MODULE_DEBUG_LOGGING: 'false'
233226
SCRAPE_SUT_METRICS: 'true'
234227
SPICEAI_BENCHMARK_METRICS_KEY: ${{ secrets.SPICEAI_BENCHMARK_METRICS_KEY }}
235228
MINIO_ENDPOINT: ${{ secrets.MINIO_ENDPOINT }}
@@ -310,7 +303,7 @@ jobs:
310303
export SPICEBENCH_ADBC_UPDATE_STRATEGY=bulk_ingest_upsert
311304
export SPICEBENCH_ADBC_DELETE_BATCH_SIZE=50000
312305
ADAPTER_CMD="docker"
313-
ADAPTER_ARGS="run -i -e SPICEAI_API_KEY -e SPICE_CLOUD_API_URL -e AWS_ACCESS_KEY_ID=${S3_AWS_ACCESS_KEY_ID} -e AWS_SECRET_ACCESS_KEY=${S3_AWS_SECRET_ACCESS_KEY} -e SPIDAPTER_ICEBERG_REGION -e SPIDAPTER_ICEBERG_CATALOG_FROM -e SCHEDULER_STATE_LOCATION ghcr.io/spiceai/spidapter:${{ github.event.inputs.spidapter_version || 'latest' }} stdio --verbose --channel nightly"
306+
ADAPTER_ARGS="run -i -e SPICEAI_API_KEY -e SPICE_CLOUD_API_URL -e AWS_ACCESS_KEY_ID=${S3_AWS_ACCESS_KEY_ID} -e AWS_SECRET_ACCESS_KEY=${S3_AWS_SECRET_ACCESS_KEY} -e SPIDAPTER_ICEBERG_REGION -e SPIDAPTER_ICEBERG_CATALOG_FROM -e SCHEDULER_STATE_LOCATION ghcr.io/spiceai/spidapter:latest stdio --verbose --channel nightly"
314307
ADAPTER_ENVS=""
315308
fi
316309
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
name: Run (Debug - Spice Cloud)
2+
run-name: Run (Debug) - ${{ github.event.inputs.system_under_test || 'spice_cloud' }}
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
system_under_test:
8+
description: 'System under test'
9+
required: true
10+
default: spice_cloud
11+
type: choice
12+
options:
13+
- spice_cloud
14+
scenario:
15+
description: 'Scenario/query set to run (e.g. tpch)'
16+
required: true
17+
default: 'tpch'
18+
type: string
19+
etl_type:
20+
description: 'ETL type'
21+
required: true
22+
default: 'events'
23+
type: choice
24+
options:
25+
- events
26+
- changes
27+
scale_factor:
28+
description: 'Scale Factor'
29+
required: true
30+
default: '1'
31+
type: choice
32+
options:
33+
- '0.1'
34+
- '1'
35+
- '10'
36+
spidapter_version:
37+
description: 'Spidapter image version tag (e.g. latest, v1.0.0)'
38+
required: false
39+
default: 'latest'
40+
type: string
41+
enable_module_debug_logging:
42+
description: 'Enable debug logs'
43+
required: false
44+
default: false
45+
type: boolean
46+
jobs:
47+
run-spicebench:
48+
name: Run spicebench
49+
runs-on: spiceai-dev-runners
50+
timeout-minutes: 600
51+
steps:
52+
- uses: actions/checkout@v6
53+
54+
- uses: ./.github/actions/setup-cc
55+
56+
- uses: ./.github/actions/management-login
57+
with:
58+
client-id: ${{ secrets.SPICE_MANAGEMENT_CLIENT_ID }}
59+
client-secret: ${{ secrets.SPICE_MANAGEMENT_CLIENT_SECRET }}
60+
61+
- name: Log in to GHCR
62+
uses: docker/login-action@v3
63+
with:
64+
registry: ghcr.io
65+
username: ${{ github.actor }}
66+
password: ${{ secrets.GITHUB_TOKEN }}
67+
68+
- name: pull spidapter image
69+
run: docker pull ghcr.io/spiceai/spidapter:${{ github.event.inputs.spidapter_version || 'latest' }}
70+
71+
- uses: ./.github/actions/build-spicebench
72+
73+
- name: Validate adapter configuration
74+
env:
75+
SCENARIO: ${{ github.event.inputs.scenario || 'tpch' }}
76+
SPICEAI_API_KEY: ${{ env.SPICEAI_API_KEY }}
77+
SPICE_CLOUD_API_URL: https://dev-api.spice.ai
78+
run: |
79+
set -euo pipefail
80+
81+
if [ -z "${SCENARIO}" ]; then
82+
echo "SCENARIO must not be empty"
83+
exit 1
84+
fi
85+
86+
if [ -z "${SPICEAI_API_KEY:-}" ]; then
87+
echo "SPICEAI_API_KEY must be set for spice_cloud"
88+
exit 1
89+
fi
90+
91+
if ! command -v docker >/dev/null 2>&1; then
92+
echo "docker is required for spice_cloud mode"
93+
exit 1
94+
fi
95+
96+
docker image inspect ghcr.io/spiceai/spidapter:${{ github.event.inputs.spidapter_version || 'latest' }} >/dev/null 2>&1 || {
97+
echo "spidapter docker image not found locally; pull step may have failed"
98+
exit 1
99+
}
100+
101+
- name: Install ADBC FlightSQL driver
102+
uses: columnar-tech/setup-dbc@v1
103+
with:
104+
drivers: flightsql
105+
106+
- name: Run spicebench
107+
env:
108+
SPICEAI_API_KEY: ${{ env.SPICEAI_API_KEY }}
109+
SPICE_CLOUD_API_URL: https://dev-api.spice.ai
110+
SCENARIO: ${{ github.event.inputs.scenario || 'tpch' }}
111+
SYSTEM_UNDER_TEST: ${{ github.event.inputs.system_under_test || 'spice_cloud' }}
112+
SYSTEM_ADAPTER: ${{ github.event.inputs.system_under_test || 'spice_cloud' }}
113+
NUM_QUERY_CLIENTS: '8'
114+
ETL_BUCKET: 'spicebench'
115+
ETL_PREFIX: ${{ github.event.inputs.etl_type == 'changes' && 'data-gen-mutable' || 'data-gen' }}
116+
SCALE_FACTOR: ${{ github.event.inputs.scale_factor || '1' }}
117+
ETL_REGION: 'us-east-1'
118+
ETL_SINK: 'adbc'
119+
SCHEDULER_STATE_LOCATION: 's3://spiceai-testing-cluster-state/spicebench-scheduler-state-${{ github.run_id }}/'
120+
VALIDATE_CHECKPOINT_RESULTS: 'true'
121+
ENABLE_MODULE_DEBUG_LOGGING: ${{ github.event.inputs.enable_module_debug_logging || 'false' }}
122+
SCRAPE_SUT_METRICS: 'true'
123+
SPICEAI_BENCHMARK_METRICS_KEY: ${{ secrets.SPICEAI_BENCHMARK_METRICS_KEY }}
124+
MINIO_ENDPOINT: ${{ secrets.MINIO_ENDPOINT }}
125+
AWS_ACCESS_KEY_ID: ${{ secrets.MINIO_ACCESS_KEY_ID }}
126+
AWS_SECRET_ACCESS_KEY: ${{ secrets.MINIO_SECRET_ACCESS_KEY }}
127+
S3_AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
128+
S3_AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
129+
SPIDAPTER_ICEBERG_REGION: us-west-1
130+
SPIDAPTER_ICEBERG_CATALOG_FROM: iceberg:https://glue.us-west-1.amazonaws.com/iceberg/v1/catalogs/211125479522/namespaces
131+
run: |
132+
set -euo pipefail
133+
if [ "${ENABLE_MODULE_DEBUG_LOGGING}" = "true" ]; then
134+
export RUST_LOG='info,etl=debug,spicebench=debug,data_generation=debug'
135+
else
136+
export RUST_LOG='info'
137+
fi
138+
139+
TABLE_FORMAT="parquet"
140+
EXECUTOR_INSTANCE_TYPE="github-hosted-ubuntu-latest"
141+
ETL_ENDPOINT="${MINIO_ENDPOINT}"
142+
ETL_ARGS="--etl-bucket ${ETL_BUCKET} --scale-factor ${SCALE_FACTOR}"
143+
if [ -n "${ETL_PREFIX}" ]; then
144+
ETL_ARGS="${ETL_ARGS} --etl-prefix ${ETL_PREFIX}"
145+
fi
146+
if [ -n "${ETL_REGION}" ]; then
147+
ETL_ARGS="${ETL_ARGS} --etl-region ${ETL_REGION}"
148+
fi
149+
if [ -n "${ETL_ENDPOINT:-}" ]; then
150+
ETL_ARGS="${ETL_ARGS} --etl-endpoint ${ETL_ENDPOINT}"
151+
fi
152+
153+
ETL_SINK_ARGS="--etl-sink ${ETL_SINK} --table-format ${TABLE_FORMAT}"
154+
if [ "${ETL_SINK}" = "adbc" ]; then
155+
:
156+
fi
157+
158+
VALIDATION_ARGS=""
159+
if [ "${VALIDATE_CHECKPOINT_RESULTS}" = "true" ]; then
160+
VALIDATION_ARGS="--validate-results"
161+
fi
162+
163+
SCHEDULER_STATE_ADAPTER_ENV="--system-adapter-env SCHEDULER_STATE_LOCATION=${SCHEDULER_STATE_LOCATION}"
164+
165+
SUT_METRICS_ARGS=""
166+
if [ "${SCRAPE_SUT_METRICS}" = "true" ]; then
167+
SUT_METRICS_ARGS="--scrape-sut-metrics"
168+
fi
169+
170+
export SPICEBENCH_ADBC_UPDATE_STRATEGY=bulk_ingest_upsert
171+
export SPICEBENCH_ADBC_DELETE_BATCH_SIZE=50000
172+
ADAPTER_CMD="docker"
173+
ADAPTER_ARGS="run -i -e SPICEAI_API_KEY -e SPICE_CLOUD_API_URL -e AWS_ACCESS_KEY_ID=${S3_AWS_ACCESS_KEY_ID} -e AWS_SECRET_ACCESS_KEY=${S3_AWS_SECRET_ACCESS_KEY} -e SPIDAPTER_ICEBERG_REGION -e SPIDAPTER_ICEBERG_CATALOG_FROM -e SCHEDULER_STATE_LOCATION ghcr.io/spiceai/spidapter:${{ github.event.inputs.spidapter_version || 'latest' }} stdio --verbose --channel nightly"
174+
ADAPTER_ENVS=""
175+
176+
~/.spice/bin/spicebench run \
177+
--concurrency "${NUM_QUERY_CLIENTS}" \
178+
--scenario "${SCENARIO}" \
179+
--executor-instance-type "${EXECUTOR_INSTANCE_TYPE}" \
180+
${ETL_ARGS} \
181+
${ETL_SINK_ARGS} \
182+
${VALIDATION_ARGS} \
183+
${SUT_METRICS_ARGS} \
184+
--system-adapter-stdio-cmd "${ADAPTER_CMD}" \
185+
--system-adapter-stdio-args "${ADAPTER_ARGS}" \
186+
${ADAPTER_ENVS} \
187+
${SCHEDULER_STATE_ADAPTER_ENV} \

0 commit comments

Comments
 (0)