From 27c2ed19b793643d952f78c35a7cac71afc0b6a7 Mon Sep 17 00:00:00 2001 From: Adam Gutglick Date: Thu, 26 Mar 2026 14:11:22 +0000 Subject: [PATCH 1/2] Try and keep benchmark run in UI Signed-off-by: Adam Gutglick --- .github/workflows/bench-pr.yml | 8 +++++++- .github/workflows/sql-pr.yml | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bench-pr.yml b/.github/workflows/bench-pr.yml index b708aad2482..63a4d41db52 100644 --- a/.github/workflows/bench-pr.yml +++ b/.github/workflows/bench-pr.yml @@ -4,7 +4,13 @@ name: PR Benchmarks concurrency: # The group causes runs to queue instead of running in parallel. - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + # Use a unique group for non-benchmark label events so they don't interfere with in-progress benchmark runs. + group: >- + ${{ github.workflow }}-${{ + github.event.label.name == 'action/benchmark' + && github.head_ref + || github.run_id + }} # Don't cancel benchmarks that are already running, instead just queue them up. cancel-in-progress: false diff --git a/.github/workflows/sql-pr.yml b/.github/workflows/sql-pr.yml index a46a7891c38..ad6447a9335 100644 --- a/.github/workflows/sql-pr.yml +++ b/.github/workflows/sql-pr.yml @@ -3,7 +3,13 @@ name: PR SQL Benchmarks concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + # Use a unique group for non-benchmark label events so they don't interfere with in-progress benchmark runs. + group: >- + ${{ github.workflow }}-${{ + github.event.label.name == 'action/benchmark-sql' + && github.head_ref + || github.run_id + }} cancel-in-progress: true on: From 19897db3d21e36d5f97cdc9234c9064a69aa0934 Mon Sep 17 00:00:00 2001 From: Adam Gutglick Date: Thu, 26 Mar 2026 14:49:18 +0000 Subject: [PATCH 2/2] Restructure to multi-layer workflow dispatch Signed-off-by: Adam Gutglick --- .github/workflows/bench-dispatch.yml | 49 ++++++++++++++++++++++++++++ .github/workflows/bench-pr.yml | 35 ++++---------------- .github/workflows/sql-pr.yml | 29 +++------------- 3 files changed, 59 insertions(+), 54 deletions(-) create mode 100644 .github/workflows/bench-dispatch.yml diff --git a/.github/workflows/bench-dispatch.yml b/.github/workflows/bench-dispatch.yml new file mode 100644 index 00000000000..264dfaf94e8 --- /dev/null +++ b/.github/workflows/bench-dispatch.yml @@ -0,0 +1,49 @@ +# Dispatches benchmark workflows when benchmark labels are added to pull requests. +# This is a separate workflow so that non-benchmark label events don't create +# phantom check suites that obscure in-progress benchmark runs on the PR. + +name: Benchmark Dispatch + +on: + pull_request: + types: [labeled] + branches: ["develop"] + +permissions: + actions: write + contents: read + pull-requests: write # for label removal and PR comments + id-token: write # enables AWS-GitHub OIDC + +jobs: + remove-bench-label: + runs-on: ubuntu-latest + timeout-minutes: 2 + if: github.event.label.name == 'action/benchmark' + steps: + - uses: actions-ecosystem/action-remove-labels@v1 + if: github.event.pull_request.head.repo.full_name == 'vortex-data/vortex' + with: + labels: action/benchmark + fail_on_error: true + + bench: + needs: remove-bench-label + uses: ./.github/workflows/bench-pr.yml + secrets: inherit + + remove-sql-label: + runs-on: ubuntu-latest + timeout-minutes: 2 + if: github.event.label.name == 'action/benchmark-sql' + steps: + - uses: actions-ecosystem/action-remove-labels@v1 + if: github.event.pull_request.head.repo.full_name == 'vortex-data/vortex' + with: + labels: action/benchmark-sql + fail_on_error: true + + sql-bench: + needs: remove-sql-label + uses: ./.github/workflows/sql-pr.yml + secrets: inherit diff --git a/.github/workflows/bench-pr.yml b/.github/workflows/bench-pr.yml index 63a4d41db52..1fab5eb28bc 100644 --- a/.github/workflows/bench-pr.yml +++ b/.github/workflows/bench-pr.yml @@ -1,46 +1,25 @@ -# Runs all benchmarks once when we add the `action/benchmark` tag to a pull request. +# Runs all benchmarks once for a pull request. +# Called from bench-dispatch.yml when the `action/benchmark` label is added. name: PR Benchmarks concurrency: # The group causes runs to queue instead of running in parallel. - # Use a unique group for non-benchmark label events so they don't interfere with in-progress benchmark runs. - group: >- - ${{ github.workflow }}-${{ - github.event.label.name == 'action/benchmark' - && github.head_ref - || github.run_id - }} + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} # Don't cancel benchmarks that are already running, instead just queue them up. cancel-in-progress: false on: - pull_request: - types: [labeled, synchronize] - branches: ["develop"] + workflow_call: { } workflow_dispatch: { } permissions: - actions: write # for removing labels contents: read pull-requests: write # for commenting on PRs id-token: write # enables AWS-GitHub OIDC jobs: - label_trigger: - runs-on: ubuntu-latest - timeout-minutes: 120 - if: ${{ contains(github.event.head_commit.message, '[benchmark]') || github.event.label.name == 'action/benchmark' && github.event_name == 'pull_request' }} - steps: - # We remove the benchmark label first so that the workflow can be re-triggered. - - uses: actions-ecosystem/action-remove-labels@v1 - if: ${{ github.event.pull_request.head.repo.full_name == 'vortex-data/vortex' }} - with: - labels: action/benchmark - fail_on_error: true - bench: - needs: label_trigger timeout-minutes: 120 runs-on: >- ${{ github.repository == 'vortex-data/vortex' @@ -54,7 +33,6 @@ jobs: build_args: "--features lance" - id: compress-bench name: Compression - if: ${{ contains(github.event.head_commit.message, '[benchmark]') || github.event.label.name == 'action/benchmark' && github.event_name == 'pull_request' }} steps: - uses: runs-on/action@v2 if: github.event.pull_request.head.repo.fork == false @@ -143,17 +121,16 @@ jobs: comment-tag: bench-pr-comment-${{ matrix.benchmark.id }} - name: Comment PR on failure - if: failure() && inputs.mode == 'pr' && github.event.pull_request.head.repo.fork == false + if: failure() && github.event.pull_request.head.repo.fork == false uses: thollander/actions-comment-pull-request@v3 with: message: | - # 🚨🚨🚨❌❌❌ BENCHMARK FAILED ❌❌❌🚨🚨🚨 + # BENCHMARK FAILED Benchmark `${{ matrix.benchmark.name }}` failed! Check the [workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details. comment-tag: bench-pr-comment-${{ matrix.benchmark.id }} sql: - needs: label_trigger uses: ./.github/workflows/sql-benchmarks.yml secrets: inherit with: diff --git a/.github/workflows/sql-pr.yml b/.github/workflows/sql-pr.yml index ad6447a9335..420425a4321 100644 --- a/.github/workflows/sql-pr.yml +++ b/.github/workflows/sql-pr.yml @@ -1,44 +1,23 @@ -# Runs once when we add the `benchmark-sql` tag to a pull request. +# Runs SQL benchmarks once for a pull request. +# Called from bench-dispatch.yml when the `action/benchmark-sql` label is added. name: PR SQL Benchmarks concurrency: - # Use a unique group for non-benchmark label events so they don't interfere with in-progress benchmark runs. - group: >- - ${{ github.workflow }}-${{ - github.event.label.name == 'action/benchmark-sql' - && github.head_ref - || github.run_id - }} + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true on: - pull_request: - types: [labeled, synchronize] - branches: ["develop"] + workflow_call: { } workflow_dispatch: { } permissions: - actions: write # for removing labels contents: read pull-requests: write # for commenting on PRs id-token: write # enables AWS-GitHub OIDC jobs: - label_trigger: - runs-on: ubuntu-latest - timeout-minutes: 2 - if: ${{ contains(github.event.head_commit.message, '[benchmark-sql]') || github.event.label.name == 'action/benchmark-sql' && github.event_name == 'pull_request' }} - steps: - # We remove the benchmark label first so that the workflow can be re-triggered. - - uses: actions-ecosystem/action-remove-labels@v1 - if: ${{ github.event.pull_request.head.repo.full_name == 'vortex-data/vortex' }} - with: - labels: action/benchmark-sql - fail_on_error: true - sql: - needs: label_trigger uses: ./.github/workflows/sql-benchmarks.yml secrets: inherit with: