Skip to content

Commit 350769f

Browse files
authored
Merge branch 'master' into enable-tls-api-key
2 parents 2a0a678 + 3ce6004 commit 350769f

File tree

1 file changed

+51
-8
lines changed

1 file changed

+51
-8
lines changed

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

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ on:
44
schedule:
55
# Run at 3 AM PST (11:00 UTC) - offset from existing nightly
66
- cron: '00 11 * * *'
7-
push:
8-
branches:
9-
- add-nightly-throughput-stress-workflow
10-
- cleanup-nightly-tps-workflow
117
workflow_dispatch:
128
inputs:
139
duration:
@@ -25,15 +21,24 @@ on:
2521
required: false
2622
default: 360
2723
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
2829

2930
permissions:
3031
contents: read
32+
id-token: write
3133

3234
env:
3335
# Workflow configuration
3436
TEST_DURATION: ${{ inputs.duration || vars.NIGHTLY_TEST_DURATION || '5h' }}
3537
TEST_TIMEOUT: ${{ inputs.timeout || vars.NIGHTLY_TEST_TIMEOUT || '5h30m' }}
3638

39+
# AWS S3 metrics upload ARN
40+
AWS_S3_METRICS_UPLOAD_ROLE_ARN: ${{ vars.AWS_S3_METRICS_UPLOAD_ROLE_ARN }}
41+
3742
# Logging and artifacts
3843
WORKER_LOG_DIR: /tmp/throughput-stress-logs
3944

@@ -42,13 +47,16 @@ env:
4247
OMES_REF: main
4348
RUN_ID: ${{ github.run_id }}-throughput-stress
4449

50+
# Prometheus version
51+
PROM_VERSION: "3.8.0"
52+
53+
# Language
54+
SDK_LANG: "go"
55+
4556
jobs:
4657
throughput-stress:
4758
runs-on: ubuntu-latest-4-cores
4859
timeout-minutes: ${{ fromJSON(inputs.job_timeout_minutes || (vars.NIGHTLY_JOB_TIMEOUT_MINUTES || '360')) }}
49-
permissions:
50-
contents: read
51-
actions: write
5260

5361
steps:
5462
- name: Print test configuration
@@ -85,6 +93,13 @@ jobs:
8593
- name: Install Temporal CLI
8694
uses: temporalio/setup-temporal@v0
8795

96+
- name: Install Prometheus
97+
run: |
98+
wget -q https://github.com/prometheus/prometheus/releases/download/v${PROM_VERSION}/prometheus-${PROM_VERSION}.linux-amd64.tar.gz
99+
tar xzf prometheus-${PROM_VERSION}.linux-amd64.tar.gz
100+
sudo mv prometheus-${PROM_VERSION}.linux-amd64/prometheus /usr/local/bin/
101+
prometheus --version
102+
88103
- name: Setup log directory
89104
run: mkdir -p $WORKER_LOG_DIR
90105

@@ -112,19 +127,47 @@ jobs:
112127
# to give CI a bit more time for visibility consistency
113128
go run ./cmd run-scenario-with-worker \
114129
--scenario throughput_stress \
115-
--language go \
130+
--language $SDK_LANG \
116131
--version $(pwd)/.. \
117132
--run-id $RUN_ID \
118133
--duration $TEST_DURATION \
119134
--timeout $TEST_TIMEOUT \
120135
--max-concurrent 10 \
136+
--prom-listen-address 127.0.0.1:9091 \
137+
--worker-prom-listen-address 127.0.0.1:9092 \
138+
--prom-instance-addr 127.0.0.1:9090 \
139+
--prom-instance-config \
140+
--prom-export-worker-metrics $RUN_ID.parquet \
121141
--option internal-iterations=10 \
122142
--option continue-as-new-after-iterations=3 \
123143
--option sleep-time=1s \
124144
--option visibility-count-timeout=5m \
125145
--option min-throughput-per-hour=1000 \
126146
2>&1 | tee $WORKER_LOG_DIR/scenario.log
127147
148+
- name: Configure AWS credentials
149+
if: always()
150+
uses: aws-actions/configure-aws-credentials@v4
151+
with:
152+
role-to-assume: ${{ env.AWS_S3_METRICS_UPLOAD_ROLE_ARN }}
153+
aws-region: us-west-2
154+
155+
- name: Upload metrics to S3
156+
if: always()
157+
env:
158+
GH_REF: ${{ github.ref }}
159+
IS_EXPERIMENT_INPUT: ${{ inputs.is_experiment }}
160+
run: |
161+
DATE=$(date +%Y-%m-%d)
162+
IS_EXPERIMENT="false"
163+
# Set as an experiment if we are not on the main branch or input as an experiment
164+
if [[ "$GH_REF" != "refs/heads/main" || "$IS_EXPERIMENT_INPUT" == "true" ]]; then
165+
IS_EXPERIMENT="true"
166+
fi
167+
echo "Uploading metrics: is_experiment=$IS_EXPERIMENT, language=$SDK_LANG, date=$DATE"
168+
aws s3 cp omes/$RUN_ID.parquet \
169+
"s3://cloud-data-ingest-prod/github/sdk_load_test/is_experiment=$IS_EXPERIMENT/language=$SDK_LANG/date=$DATE/$RUN_ID.parquet"
170+
128171
- name: Upload logs on failure/cancellation
129172
if: failure() || cancelled()
130173
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)