|
6 | 6 | - cron: '00 11 * * *' |
7 | 7 | push: |
8 | 8 | branches: |
9 | | - - add-nightly-throughput-stress-workflow |
| 9 | + - upload-nightly-metrics-to-s3 |
10 | 10 | workflow_dispatch: |
11 | 11 | inputs: |
12 | 12 | duration: |
|
35 | 35 | # Logging and artifacts |
36 | 36 | WORKER_LOG_DIR: /tmp/throughput-stress-logs |
37 | 37 |
|
| 38 | + # AWS S3 metrics upload ARN |
| 39 | + AWS_S3_METRICS_UPLOAD_ROLE_ARN: ${{ vars.AWS_S3_METRICS_UPLOAD_ROLE_ARN }} |
| 40 | + |
38 | 41 | # Omes configuration |
39 | 42 | OMES_REPO: temporalio/omes |
40 | 43 | OMES_REF: main |
|
44 | 47 | throughput-stress: |
45 | 48 | runs-on: ubuntu-latest-4-cores |
46 | 49 | timeout-minutes: ${{ fromJSON(inputs.job_timeout_minutes || vars.NIGHTLY_JOB_TIMEOUT_MINUTES || 360) }} |
| 50 | + permissions: |
| 51 | + contents: read |
| 52 | + actions: write |
| 53 | + id-token: write |
47 | 54 |
|
48 | 55 | steps: |
49 | 56 | - name: Print test configuration |
|
88 | 95 | - name: Install Temporal CLI |
89 | 96 | uses: temporalio/setup-temporal@v0 |
90 | 97 |
|
| 98 | + - name: Install Prometheus |
| 99 | + run: | |
| 100 | + PROM_VERSION="3.8.0" |
| 101 | + wget -q https://github.com/prometheus/prometheus/releases/download/v${PROM_VERSION}/prometheus-${PROM_VERSION}.linux-amd64.tar.gz |
| 102 | + tar xzf prometheus-${PROM_VERSION}.linux-amd64.tar.gz |
| 103 | + sudo mv prometheus-${PROM_VERSION}.linux-amd64/prometheus /usr/local/bin/ |
| 104 | + prometheus --version |
| 105 | +
|
91 | 106 | - name: Setup log directory |
92 | 107 | run: mkdir -p $WORKER_LOG_DIR |
93 | 108 |
|
@@ -120,13 +135,37 @@ jobs: |
120 | 135 | --duration $TEST_DURATION \ |
121 | 136 | --timeout $TEST_TIMEOUT \ |
122 | 137 | --max-concurrent 10 \ |
| 138 | + --prom-listen-address 127.0.0.1:9091 \ |
| 139 | + --worker-prom-listen-address 127.0.0.1:9092 \ |
| 140 | + --prom-instance-addr 127.0.0.1:9090 \ |
| 141 | + --prom-instance-config \ |
| 142 | + --prom-export-worker-metrics $RUN_ID.parquet \ |
123 | 143 | --option internal-iterations=10 \ |
124 | 144 | --option continue-as-new-after-iterations=3 \ |
125 | 145 | --option sleep-time=1s \ |
126 | 146 | --option visibility-count-timeout=5m \ |
127 | 147 | --option min-throughput-per-hour=1000 \ |
128 | 148 | 2>&1 | tee $WORKER_LOG_DIR/scenario.log |
129 | 149 |
|
| 150 | + - name: Configure AWS credentials |
| 151 | + if: always() |
| 152 | + uses: aws-actions/configure-aws-credentials@v4 |
| 153 | + with: |
| 154 | + role-to-assume: ${{ env.AWS_S3_METRICS_UPLOAD_ROLE_ARN }} |
| 155 | + aws-region: us-west-2 |
| 156 | + |
| 157 | + - name: Upload metrics to S3 |
| 158 | + if: always() |
| 159 | + run: | |
| 160 | + DATE=$(date +%Y-%m-%d) |
| 161 | + # Use test/ prefix on non-main branches |
| 162 | + PREFIX="language=java/date=$DATE" |
| 163 | + if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then |
| 164 | + PREFIX="test/$PREFIX" |
| 165 | + fi |
| 166 | + aws s3 cp omes/$RUN_ID.parquet \ |
| 167 | + "s3://cloud-data-ingest-prod/github/sdk_load_test/$PREFIX/$RUN_ID.parquet" |
| 168 | +
|
130 | 169 | - name: Upload logs on failure |
131 | 170 | if: failure() || cancelled() |
132 | 171 | uses: actions/upload-artifact@v4 |
|
0 commit comments