Skip to content

Commit d0407c9

Browse files
committed
use env vars instead of var interpolation, add is_experiment input
1 parent bbb1215 commit d0407c9

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

.github/workflows/nightly-throughput-stress.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@ on:
2121
required: false
2222
default: 360
2323
type: number
24+
is_experiment:
25+
description: 'Mark this run as an experiment (excluded from nightly dashboards)'
26+
required: false
27+
default: false
28+
type: boolean
2429

2530
permissions:
2631
contents: read
32+
id-token: write
2733

2834
env:
2935
# Workflow configuration
@@ -41,6 +47,12 @@ env:
4147
OMES_REF: main
4248
RUN_ID: ${{ github.run_id }}-throughput-stress
4349

50+
# Prometheus version
51+
PROM_VERSION: "3.8.0"
52+
53+
# Language
54+
SDK_LANG: "python"
55+
4456
jobs:
4557
throughput-stress:
4658
runs-on: ubuntu-latest-4-cores
@@ -109,7 +121,6 @@ jobs:
109121

110122
- name: Install Prometheus
111123
run: |
112-
PROM_VERSION="3.8.0"
113124
wget -q https://github.com/prometheus/prometheus/releases/download/v${PROM_VERSION}/prometheus-${PROM_VERSION}.linux-amd64.tar.gz
114125
tar xzf prometheus-${PROM_VERSION}.linux-amd64.tar.gz
115126
sudo mv prometheus-${PROM_VERSION}.linux-amd64/prometheus /usr/local/bin/
@@ -141,7 +152,7 @@ jobs:
141152
# to give CI a bit more time for visibility consistency
142153
go run ./cmd run-scenario-with-worker \
143154
--scenario throughput_stress \
144-
--language python \
155+
--language $SDK_LANG \
145156
--version $(pwd)/.. \
146157
--run-id $RUN_ID \
147158
--duration $TEST_DURATION \
@@ -170,13 +181,14 @@ jobs:
170181
if: always()
171182
run: |
172183
DATE=$(date +%Y-%m-%d)
173-
# Use test/ prefix on non-main branches
174-
PREFIX="language=python/date=$DATE"
175-
if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then
176-
PREFIX="test/$PREFIX"
184+
IS_EXPERIMENT="false"
185+
# Set as an experiment if we are not on the main branch or input as an experiment
186+
if [[ "$GH_REF" != "refs/heads/main" || "$IS_EXPERIMENT_INPUT" == "true" ]]; then
187+
IS_EXPERIMENT="true"
177188
fi
189+
echo "Uploading metrics: is_experiment=$IS_EXPERIMENT, language=$SDK_LANG, date=$DATE"
178190
aws s3 cp omes/$RUN_ID.parquet \
179-
"s3://cloud-data-ingest-prod/github/sdk_load_test/$PREFIX/$RUN_ID.parquet"
191+
"s3://cloud-data-ingest-prod/github/sdk_load_test/is_experiment=$IS_EXPERIMENT/language=$SDK_LANG/date=$DATE/$RUN_ID.parquet"
180192
181193
- name: Upload logs on failure
182194
if: failure() || cancelled()

0 commit comments

Comments
 (0)