|
6 | 6 | - cron: '00 11 * * *' |
7 | 7 | push: |
8 | 8 | branches: |
9 | | - - add-nightly-throughput-stress-workflow |
10 | | - - cleanup-nightly-tps-workflow |
| 9 | + - upload-nightly-metrics-to-s3 |
11 | 10 | workflow_dispatch: |
12 | 11 | inputs: |
13 | 12 | duration: |
|
34 | 33 | TEST_DURATION: ${{ inputs.duration || vars.NIGHTLY_TEST_DURATION || '5h' }} |
35 | 34 | TEST_TIMEOUT: ${{ inputs.timeout || vars.NIGHTLY_TEST_TIMEOUT || '5h30m' }} |
36 | 35 |
|
| 36 | + # AWS S3 metrics upload ARN |
| 37 | + AWS_S3_METRICS_UPLOAD_ROLE_ARN: ${{ vars.AWS_S3_METRICS_UPLOAD_ROLE_ARN }} |
| 38 | + |
37 | 39 | # Logging and artifacts |
38 | 40 | WORKER_LOG_DIR: /tmp/throughput-stress-logs |
39 | 41 |
|
|
49 | 51 | permissions: |
50 | 52 | contents: read |
51 | 53 | actions: write |
| 54 | + id-token: write |
52 | 55 |
|
53 | 56 | steps: |
54 | 57 | - name: Print test configuration |
@@ -118,13 +121,37 @@ jobs: |
118 | 121 | --duration $TEST_DURATION \ |
119 | 122 | --timeout $TEST_TIMEOUT \ |
120 | 123 | --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 \ |
121 | 129 | --option internal-iterations=10 \ |
122 | 130 | --option continue-as-new-after-iterations=3 \ |
123 | 131 | --option sleep-time=1s \ |
124 | 132 | --option visibility-count-timeout=5m \ |
125 | 133 | --option min-throughput-per-hour=1000 \ |
126 | 134 | 2>&1 | tee $WORKER_LOG_DIR/scenario.log |
127 | 135 |
|
| 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 | +
|
128 | 155 | - name: Upload logs on failure/cancellation |
129 | 156 | if: failure() || cancelled() |
130 | 157 | uses: actions/upload-artifact@v4 |
|
0 commit comments