Skip to content

Commit 4f9a228

Browse files
committed
upload nightly worker prom metrics to S3
1 parent 13ff29d commit 4f9a228

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

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

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ on:
66
- cron: '00 11 * * *'
77
push:
88
branches:
9-
- add-nightly-throughput-stress-workflow
10-
- cleanup-nightly-tps-workflow
9+
- upload-nightly-metrics-to-s3
1110
workflow_dispatch:
1211
inputs:
1312
duration:
@@ -34,6 +33,9 @@ env:
3433
TEST_DURATION: ${{ inputs.duration || vars.NIGHTLY_TEST_DURATION || '5h' }}
3534
TEST_TIMEOUT: ${{ inputs.timeout || vars.NIGHTLY_TEST_TIMEOUT || '5h30m' }}
3635

36+
# AWS S3 metrics upload ARN
37+
AWS_S3_METRICS_UPLOAD_ROLE_ARN: ${{ vars.AWS_S3_METRICS_UPLOAD_ROLE_ARN }}
38+
3739
# Logging and artifacts
3840
WORKER_LOG_DIR: /tmp/throughput-stress-logs
3941

@@ -49,6 +51,7 @@ jobs:
4951
permissions:
5052
contents: read
5153
actions: write
54+
id-token: write
5255

5356
steps:
5457
- name: Print test configuration
@@ -118,13 +121,37 @@ jobs:
118121
--duration $TEST_DURATION \
119122
--timeout $TEST_TIMEOUT \
120123
--max-concurrent 10 \
124+
--prom-listen-address 127.0.0.1:9091 \
125+
--worker-prom-listen-address 127.0.0.1:9092 \
126+
--prom-instance-addr 127.0.0.1:9090 \
127+
--prom-instance-config \
128+
--prom-export-worker-metrics $RUN_ID.parquet \
121129
--option internal-iterations=10 \
122130
--option continue-as-new-after-iterations=3 \
123131
--option sleep-time=1s \
124132
--option visibility-count-timeout=5m \
125133
--option min-throughput-per-hour=1000 \
126134
2>&1 | tee $WORKER_LOG_DIR/scenario.log
127135
136+
- name: Configure AWS credentials
137+
if: always()
138+
uses: aws-actions/configure-aws-credentials@v4
139+
with:
140+
role-to-assume: ${{ env.AWS_S3_METRICS_UPLOAD_ROLE_ARN }}
141+
aws-region: us-west-2
142+
143+
- name: Upload metrics to S3
144+
if: always()
145+
run: |
146+
DATE=$(date +%Y-%m-%d)
147+
# Use test/ prefix on non-main branches
148+
PREFIX="language=go/date=$DATE"
149+
if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then
150+
PREFIX="test/$PREFIX"
151+
fi
152+
aws s3 cp omes/$RUN_ID.parquet \
153+
"s3://cloud-data-ingest-prod/github/sdk_load_test/$PREFIX/$RUN_ID.parquet"
154+
128155
- name: Upload logs on failure/cancellation
129156
if: failure() || cancelled()
130157
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)