|
4 | 4 | schedule: |
5 | 5 | # Run at 3 AM PST (11:00 UTC) - offset from existing nightly |
6 | 6 | - cron: '00 11 * * *' |
7 | | - push: |
8 | | - branches: |
9 | | - - add-nightly-throughput-stress-workflow |
10 | 7 | workflow_dispatch: |
11 | 8 | inputs: |
12 | 9 | duration: |
|
33 | 30 | TEST_DURATION: ${{ inputs.duration || vars.NIGHTLY_TEST_DURATION || '5h' }} |
34 | 31 | TEST_TIMEOUT: ${{ inputs.timeout || vars.NIGHTLY_TEST_TIMEOUT || '5h30m' }} |
35 | 32 |
|
| 33 | + # AWS S3 metrics upload ARN |
| 34 | + AWS_S3_METRICS_UPLOAD_ROLE_ARN: ${{ vars.AWS_S3_METRICS_UPLOAD_ROLE_ARN }} |
| 35 | + |
36 | 36 | # Logging and artifacts |
37 | 37 | WORKER_LOG_DIR: /tmp/throughput-stress-logs |
38 | 38 |
|
@@ -107,6 +107,14 @@ jobs: |
107 | 107 | - name: Install Temporal CLI |
108 | 108 | uses: temporalio/setup-temporal@v0 |
109 | 109 |
|
| 110 | + - name: Install Prometheus |
| 111 | + run: | |
| 112 | + PROM_VERSION="3.8.0" |
| 113 | + wget -q https://github.com/prometheus/prometheus/releases/download/v${PROM_VERSION}/prometheus-${PROM_VERSION}.linux-amd64.tar.gz |
| 114 | + tar xzf prometheus-${PROM_VERSION}.linux-amd64.tar.gz |
| 115 | + sudo mv prometheus-${PROM_VERSION}.linux-amd64/prometheus /usr/local/bin/ |
| 116 | + prometheus --version |
| 117 | +
|
110 | 118 | - name: Setup log directory |
111 | 119 | run: mkdir -p $WORKER_LOG_DIR |
112 | 120 |
|
@@ -139,13 +147,37 @@ jobs: |
139 | 147 | --duration $TEST_DURATION \ |
140 | 148 | --timeout $TEST_TIMEOUT \ |
141 | 149 | --max-concurrent 10 \ |
| 150 | + --prom-listen-address 127.0.0.1:9091 \ |
| 151 | + --worker-prom-listen-address 127.0.0.1:9092 \ |
| 152 | + --prom-instance-addr 127.0.0.1:9090 \ |
| 153 | + --prom-instance-config \ |
| 154 | + --prom-export-worker-metrics $RUN_ID.parquet \ |
142 | 155 | --option internal-iterations=10 \ |
143 | 156 | --option continue-as-new-after-iterations=3 \ |
144 | 157 | --option sleep-time=1s \ |
145 | 158 | --option visibility-count-timeout=5m \ |
146 | 159 | --option min-throughput-per-hour=1000 \ |
147 | 160 | 2>&1 | tee $WORKER_LOG_DIR/scenario.log |
148 | 161 |
|
| 162 | + - name: Configure AWS credentials |
| 163 | + if: always() |
| 164 | + uses: aws-actions/configure-aws-credentials@v4 |
| 165 | + with: |
| 166 | + role-to-assume: ${{ env.AWS_S3_METRICS_UPLOAD_ROLE_ARN }} |
| 167 | + aws-region: us-west-2 |
| 168 | + |
| 169 | + - name: Upload metrics to S3 |
| 170 | + if: always() |
| 171 | + run: | |
| 172 | + 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" |
| 177 | + fi |
| 178 | + aws s3 cp omes/$RUN_ID.parquet \ |
| 179 | + "s3://cloud-data-ingest-prod/github/sdk_load_test/$PREFIX/$RUN_ID.parquet" |
| 180 | +
|
149 | 181 | - name: Upload logs on failure |
150 | 182 | if: failure() || cancelled() |
151 | 183 | uses: actions/upload-artifact@v4 |
|
0 commit comments