1010 required : false
1111 type : string
1212 default : c6id.8xlarge
13+ pr_head_sha :
14+ required : false
15+ type : string
16+ default : " "
17+ is_fork :
18+ required : false
19+ type : string
20+ default : " false"
21+ pr_number :
22+ required : false
23+ type : string
24+ default : " "
1325 benchmark_matrix :
1426 required : false
1527 type : string
@@ -107,17 +119,17 @@ jobs:
107119
108120 runs-on : >-
109121 ${{ github.repository == 'vortex-data/vortex'
110- && format('runs-on={0}/runner=bench-dedicated/tag={1}{2}', github.run_id, matrix.id, (inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false ) && '/extras=s3-cache' || '')
122+ && format('runs-on={0}/runner=bench-dedicated/tag={1}{2}', github.run_id, matrix.id, (inputs.mode != 'pr' || inputs.is_fork != 'true' ) && '/extras=s3-cache' || '')
111123 || 'ubuntu-latest' }}
112124 steps :
113125 - uses : runs-on/action@v2
114- if : inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false
126+ if : inputs.mode != 'pr' || inputs.is_fork != 'true'
115127 with :
116128 sccache : s3
117129 - uses : actions/checkout@v6
118130 if : inputs.mode == 'pr'
119131 with :
120- ref : ${{ github.event.pull_request.head.sha }}
132+ ref : ${{ inputs.pr_head_sha }}
121133
122134 - uses : actions/checkout@v6
123135 if : inputs.mode != 'pr'
@@ -166,14 +178,14 @@ jobs:
166178 $opts
167179
168180 - name : Setup AWS CLI
169- if : inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false
181+ if : inputs.mode != 'pr' || inputs.is_fork != 'true'
170182 uses : aws-actions/configure-aws-credentials@v6
171183 with :
172184 role-to-assume : arn:aws:iam::245040174862:role/GitHubBenchmarkRole
173185 aws-region : us-east-1
174186
175187 - name : Upload data
176- if : matrix.remote_storage != null && (inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false )
188+ if : matrix.remote_storage != null && (inputs.mode != 'pr' || inputs.is_fork != 'true' )
177189 shell : bash
178190 env :
179191 AWS_REGION : " us-east-1"
@@ -182,7 +194,7 @@ jobs:
182194 aws s3 cp --recursive ${{matrix.local_dir}} ${{ matrix.remote_storage }}
183195
184196 - name : Setup Polar Signals
185- if : inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false
197+ if : inputs.mode != 'pr' || inputs.is_fork != 'true'
186198 uses : polarsignals/gh-actions-ps-profiling@v0.8.1
187199 with :
188200 polarsignals_cloud_token : ${{ secrets.POLAR_SIGNALS_API_KEY }}
@@ -192,28 +204,28 @@ jobs:
192204 extra_args : " --off-cpu-threshold=0.03" # Personally tuned by @brancz
193205
194206 - name : Run ${{ matrix.name }} benchmark
195- if : matrix.remote_storage == null || github.event.pull_request.head.repo.fork == true
207+ if : matrix.remote_storage == null || inputs.is_fork == ' true'
196208 shell : bash
197209 env :
198210 OTEL_SERVICE_NAME : " vortex-bench"
199211 OTEL_EXPORTER_OTLP_PROTOCOL : " http/protobuf"
200- OTEL_EXPORTER_OTLP_ENDPOINT : " ${{ (inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false ) && secrets.OTEL_EXPORTER_OTLP_ENDPOINT || '' }}"
201- OTEL_EXPORTER_OTLP_HEADERS : " ${{ (inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false ) && secrets.OTEL_EXPORTER_OTLP_HEADERS || '' }}"
212+ OTEL_EXPORTER_OTLP_ENDPOINT : " ${{ (inputs.mode != 'pr' || inputs.is_fork != 'true' ) && secrets.OTEL_EXPORTER_OTLP_ENDPOINT || '' }}"
213+ OTEL_EXPORTER_OTLP_HEADERS : " ${{ (inputs.mode != 'pr' || inputs.is_fork != 'true' ) && secrets.OTEL_EXPORTER_OTLP_HEADERS || '' }}"
202214 OTEL_RESOURCE_ATTRIBUTES : " bench-name=${{ matrix.id }}"
203215 run : |
204216 bash scripts/bench-taskset.sh .github/scripts/run-sql-bench.sh "${{ matrix.subcommand }}" "${{ matrix.targets }}" \
205217 ${{ matrix.iterations && format('--iterations {0}', matrix.iterations) || '' }} \
206218 ${{ matrix.scale_factor && format('--scale-factor {0}', matrix.scale_factor) || '' }}
207219
208220 - name : Run ${{ matrix.name }} benchmark (remote)
209- if : matrix.remote_storage != null && (inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false )
221+ if : matrix.remote_storage != null && (inputs.mode != 'pr' || inputs.is_fork != 'true' )
210222 shell : bash
211223 env :
212224 AWS_REGION : " us-east-1"
213225 OTEL_SERVICE_NAME : " vortex-bench"
214226 OTEL_EXPORTER_OTLP_PROTOCOL : " http/protobuf"
215- OTEL_EXPORTER_OTLP_ENDPOINT : " ${{ (inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false ) && secrets.OTEL_EXPORTER_OTLP_ENDPOINT || '' }}"
216- OTEL_EXPORTER_OTLP_HEADERS : " ${{ (inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false ) && secrets.OTEL_EXPORTER_OTLP_HEADERS || '' }}"
227+ OTEL_EXPORTER_OTLP_ENDPOINT : " ${{ (inputs.mode != 'pr' || inputs.is_fork != 'true' ) && secrets.OTEL_EXPORTER_OTLP_ENDPOINT || '' }}"
228+ OTEL_EXPORTER_OTLP_HEADERS : " ${{ (inputs.mode != 'pr' || inputs.is_fork != 'true' ) && secrets.OTEL_EXPORTER_OTLP_HEADERS || '' }}"
217229 OTEL_RESOURCE_ATTRIBUTES : " bench-name=${{ matrix.id }}"
218230 run : |
219231 bash scripts/bench-taskset.sh .github/scripts/run-sql-bench.sh "${{ matrix.subcommand }}" "${{ matrix.targets }}" \
@@ -251,24 +263,26 @@ jobs:
251263 cat comment.md >> $GITHUB_STEP_SUMMARY
252264
253265 - name : Comment PR
254- if : inputs.mode == 'pr' && github.event.pull_request.head.repo.fork == false
266+ if : inputs.mode == 'pr' && inputs.is_fork != 'true' && inputs.pr_number != ''
255267 uses : thollander/actions-comment-pull-request@v3
256268 with :
257269 file-path : comment.md
258270 # There is exactly one comment per comment-tag. If a comment with this tag already exists,
259271 # this action will *update* the comment instead of posting a new comment. Therefore, each
260272 # unique benchmark configuration must have a unique comment-tag.
261273 comment-tag : bench-pr-comment-${{ matrix.id }}
274+ pr-number : ${{ inputs.pr_number }}
262275
263276 - name : Comment PR on failure
264- if : failure() && inputs.mode == 'pr' && github.event.pull_request.head.repo.fork == false
277+ if : failure() && inputs.mode == 'pr' && inputs.is_fork != 'true' && inputs.pr_number != ''
265278 uses : thollander/actions-comment-pull-request@v3
266279 with :
267280 message : |
268- # 🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨
281+ # SQL BENCHMARK FAILED
269282
270283 Benchmark `${{ matrix.name }}` failed! Check the [workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.
271284 comment-tag : bench-pr-comment-${{ matrix.id }}
285+ pr-number : ${{ inputs.pr_number }}
272286
273287 - name : Upload Benchmark Results
274288 if : inputs.mode == 'develop'
0 commit comments