Skip to content

Commit 049b414

Browse files
committed
Add Spice Cloud Prod option to debug run workflow
1 parent a11459f commit 049b414

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/run_spicebench_debug_spice_cloud.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ on:
1111
type: choice
1212
options:
1313
- spice_cloud
14+
environment:
15+
description: 'Target environment'
16+
required: true
17+
default: 'dev'
18+
type: choice
19+
options:
20+
- dev
21+
- prod
1422
scenario:
1523
description: 'Scenario/query set to run (e.g. tpch)'
1624
required: true
@@ -60,8 +68,8 @@ jobs:
6068

6169
- uses: ./.github/actions/management-login
6270
with:
63-
client-id: ${{ secrets.SPICE_MANAGEMENT_CLIENT_ID }}
64-
client-secret: ${{ secrets.SPICE_MANAGEMENT_CLIENT_SECRET }}
71+
client-id: ${{ github.event.inputs.environment == 'prod' && secrets.SPICE_MANAGEMENT_CLIENT_ID_PROD || secrets.SPICE_MANAGEMENT_CLIENT_ID }}
72+
client-secret: ${{ github.event.inputs.environment == 'prod' && secrets.SPICE_MANAGEMENT_CLIENT_SECRET_PROD || secrets.SPICE_MANAGEMENT_CLIENT_SECRET }}
6573

6674
- name: Log in to GHCR
6775
uses: docker/login-action@v3
@@ -79,7 +87,7 @@ jobs:
7987
env:
8088
SCENARIO: ${{ github.event.inputs.scenario || 'tpch' }}
8189
SPICEAI_API_KEY: ${{ env.SPICEAI_API_KEY }}
82-
SPICE_CLOUD_API_URL: https://dev-api.spice.ai
90+
SPICE_CLOUD_API_URL: ${{ github.event.inputs.environment == 'prod' && 'https://api.spice.ai' || 'https://dev-api.spice.ai' }}
8391
run: |
8492
set -euo pipefail
8593
@@ -111,7 +119,7 @@ jobs:
111119
- name: Run spicebench
112120
env:
113121
SPICEAI_API_KEY: ${{ env.SPICEAI_API_KEY }}
114-
SPICE_CLOUD_API_URL: https://dev-api.spice.ai
122+
SPICE_CLOUD_API_URL: ${{ github.event.inputs.environment == 'prod' && 'https://api.spice.ai' || 'https://dev-api.spice.ai' }}
115123
SCENARIO: ${{ github.event.inputs.scenario || 'tpch' }}
116124
SYSTEM_UNDER_TEST: ${{ github.event.inputs.system_under_test || 'spice_cloud' }}
117125
SYSTEM_ADAPTER: ${{ github.event.inputs.system_under_test || 'spice_cloud' }}

0 commit comments

Comments
 (0)