From 0433738fd3c5f040cdc39c0c42732b20cd585b95 Mon Sep 17 00:00:00 2001 From: Eddy Ashton Date: Tue, 16 Dec 2025 10:07:49 +0000 Subject: [PATCH 1/4] Anchors for all label trigger conditions --- .github/workflows/bencher-ab.yml | 6 +++--- .github/workflows/long-verification.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bencher-ab.yml b/.github/workflows/bencher-ab.yml index 3ad0e3930c04..672d3a4636e8 100644 --- a/.github/workflows/bencher-ab.yml +++ b/.github/workflows/bencher-ab.yml @@ -22,7 +22,7 @@ jobs: 1ES.Pool=gha-vmss-d16av5-ci, "JobId=bab_benchmark_pr-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}", ] - if: ${{ contains(github.event.pull_request.labels.*.name, 'bench-ab') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'}} + if: &check_trigger_conditions ${{ contains(github.event.pull_request.labels.*.name, 'bench-ab') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'}} container: image: mcr.microsoft.com/azurelinux/base/core:3.0 options: --user root @@ -72,7 +72,7 @@ jobs: 1ES.Pool=gha-vmss-d16av5-ci, "JobId=bab_benchmark_main-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}", ] - if: ${{ contains(github.event.pull_request.labels.*.name, 'bench-ab') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'}} + if: *check_trigger_conditions container: image: mcr.microsoft.com/azurelinux/base/core:3.0 options: --user root @@ -127,7 +127,7 @@ jobs: image: mcr.microsoft.com/azurelinux/base/core:3.0 options: --user root needs: [benchmark_pr, benchmark_main] - if: ${{ contains(github.event.pull_request.labels.*.name, 'bench-ab') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'}} + if: *check_trigger_conditions steps: - name: Setup container dependencies run: | diff --git a/.github/workflows/long-verification.yml b/.github/workflows/long-verification.yml index c7313e809b73..ffdcc33501d3 100644 --- a/.github/workflows/long-verification.yml +++ b/.github/workflows/long-verification.yml @@ -16,7 +16,7 @@ permissions: read-all jobs: model-checking-with-atomic-reconfig-consensus: name: Model Checking With Atomic Reconfig - Consensus - if: ${{ contains(github.event.pull_request.labels.*.name, 'run-long-verification') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} + if: &check_trigger_conditions ${{ contains(github.event.pull_request.labels.*.name, 'run-long-verification') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} runs-on: [ self-hosted, @@ -54,7 +54,7 @@ jobs: model-checking-with-reconfig-consensus: name: Model Checking With Reconfig - Consensus - if: ${{ contains(github.event.pull_request.labels.*.name, 'run-long-verification') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} + if: *check_trigger_conditions runs-on: [ self-hosted, @@ -92,7 +92,7 @@ jobs: simulation-consensus: name: Simulation - Consensus - if: ${{ contains(github.event.pull_request.labels.*.name, 'run-long-verification') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} + if: *check_trigger_conditions runs-on: ubuntu-latest defaults: run: From 9ad602cf297b5fccad653d20fa3d671924de08b3 Mon Sep 17 00:00:00 2001 From: Eddy Ashton Date: Tue, 16 Dec 2025 13:49:07 +0000 Subject: [PATCH 2/4] Ignore the language server - try a complex condition --- .github/workflows/bencher-ab.yml | 10 +++++++++- .github/workflows/long-test.yml | 10 +++++++++- .github/workflows/long-verification.yml | 10 +++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bencher-ab.yml b/.github/workflows/bencher-ab.yml index 672d3a4636e8..7fc8721cd2ba 100644 --- a/.github/workflows/bencher-ab.yml +++ b/.github/workflows/bencher-ab.yml @@ -22,7 +22,15 @@ jobs: 1ES.Pool=gha-vmss-d16av5-ci, "JobId=bab_benchmark_pr-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}", ] - if: &check_trigger_conditions ${{ contains(github.event.pull_request.labels.*.name, 'bench-ab') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'}} + if: &check_trigger_conditions >- + ${{ + (github.event.pull_request.action == "labeled" + && github.event.pull_request.label.name == 'bench-ab') + || (github.event.pull_request.action != "labeled" + && contains(github.event.pull_request.labels.*.name, 'bench-ab')) + || github.event_name == 'workflow_dispatch' + || github.event_name == 'schedule' + }} container: image: mcr.microsoft.com/azurelinux/base/core:3.0 options: --user root diff --git a/.github/workflows/long-test.yml b/.github/workflows/long-test.yml index ce924486b682..ac29d49f7eb2 100644 --- a/.github/workflows/long-test.yml +++ b/.github/workflows/long-test.yml @@ -15,7 +15,15 @@ permissions: read-all jobs: long-asan: - if: &check_trigger_conditions ${{ contains(github.event.pull_request.labels.*.name, 'run-long-test') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'}} + if: &check_trigger_conditions >- + ${{ + (github.event.pull_request.action == "labeled" + && github.event.pull_request.label.name == 'run-long-test') + || (github.event.pull_request.action != "labeled" + && contains(github.event.pull_request.labels.*.name, 'run-long-test')) + || github.event_name == 'workflow_dispatch' + || github.event_name == 'schedule' + }} name: "ASAN" runs-on: [ diff --git a/.github/workflows/long-verification.yml b/.github/workflows/long-verification.yml index ffdcc33501d3..399e9da90ef6 100644 --- a/.github/workflows/long-verification.yml +++ b/.github/workflows/long-verification.yml @@ -16,7 +16,15 @@ permissions: read-all jobs: model-checking-with-atomic-reconfig-consensus: name: Model Checking With Atomic Reconfig - Consensus - if: &check_trigger_conditions ${{ contains(github.event.pull_request.labels.*.name, 'run-long-verification') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} + if: &check_trigger_conditions >- + ${{ + (github.event.pull_request.action == "labeled" + && github.event.pull_request.label.name == 'run-long-verification') + || (github.event.pull_request.action != "labeled" + && contains(github.event.pull_request.labels.*.name, 'run-long-verification')) + || github.event_name == 'workflow_dispatch' + || github.event_name == 'schedule' + }} runs-on: [ self-hosted, From f366516b56422eaae4e960a73b8f9de3731c3586 Mon Sep 17 00:00:00 2001 From: Eddy Ashton Date: Tue, 16 Dec 2025 14:04:36 +0000 Subject: [PATCH 3/4] YAML single quotes --- .github/workflows/bencher-ab.yml | 4 ++-- .github/workflows/long-test.yml | 4 ++-- .github/workflows/long-verification.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bencher-ab.yml b/.github/workflows/bencher-ab.yml index 7fc8721cd2ba..20b61d508e48 100644 --- a/.github/workflows/bencher-ab.yml +++ b/.github/workflows/bencher-ab.yml @@ -24,9 +24,9 @@ jobs: ] if: &check_trigger_conditions >- ${{ - (github.event.pull_request.action == "labeled" + (github.event.pull_request.action == 'labeled' && github.event.pull_request.label.name == 'bench-ab') - || (github.event.pull_request.action != "labeled" + || (github.event.pull_request.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'bench-ab')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' diff --git a/.github/workflows/long-test.yml b/.github/workflows/long-test.yml index ac29d49f7eb2..70123fc628dc 100644 --- a/.github/workflows/long-test.yml +++ b/.github/workflows/long-test.yml @@ -17,9 +17,9 @@ jobs: long-asan: if: &check_trigger_conditions >- ${{ - (github.event.pull_request.action == "labeled" + (github.event.pull_request.action == 'labeled' && github.event.pull_request.label.name == 'run-long-test') - || (github.event.pull_request.action != "labeled" + || (github.event.pull_request.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'run-long-test')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' diff --git a/.github/workflows/long-verification.yml b/.github/workflows/long-verification.yml index 399e9da90ef6..4f95bc96ab7b 100644 --- a/.github/workflows/long-verification.yml +++ b/.github/workflows/long-verification.yml @@ -18,9 +18,9 @@ jobs: name: Model Checking With Atomic Reconfig - Consensus if: &check_trigger_conditions >- ${{ - (github.event.pull_request.action == "labeled" + (github.event.pull_request.action == 'labeled' && github.event.pull_request.label.name == 'run-long-verification') - || (github.event.pull_request.action != "labeled" + || (github.event.pull_request.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'run-long-verification')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' From 280fef4ceb029494ca223a4b6db75b9a746ded66 Mon Sep 17 00:00:00 2001 From: Eddy Ashton Date: Tue, 16 Dec 2025 17:02:27 +0000 Subject: [PATCH 4/4] Trust the robot --- .github/workflows/bencher-ab.yml | 8 ++++---- .github/workflows/long-test.yml | 8 ++++---- .github/workflows/long-verification.yml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/bencher-ab.yml b/.github/workflows/bencher-ab.yml index 20b61d508e48..4c53ab7b27ec 100644 --- a/.github/workflows/bencher-ab.yml +++ b/.github/workflows/bencher-ab.yml @@ -24,10 +24,10 @@ jobs: ] if: &check_trigger_conditions >- ${{ - (github.event.pull_request.action == 'labeled' - && github.event.pull_request.label.name == 'bench-ab') - || (github.event.pull_request.action != 'labeled' - && contains(github.event.pull_request.labels.*.name, 'bench-ab')) + (github.event.action == 'labeled' + && github.event.label.name == 'bench-ab') + || (github.event.action != 'labeled' + && contains(github.event.labels.*.name, 'bench-ab')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} diff --git a/.github/workflows/long-test.yml b/.github/workflows/long-test.yml index 70123fc628dc..9fb9734c35ba 100644 --- a/.github/workflows/long-test.yml +++ b/.github/workflows/long-test.yml @@ -17,10 +17,10 @@ jobs: long-asan: if: &check_trigger_conditions >- ${{ - (github.event.pull_request.action == 'labeled' - && github.event.pull_request.label.name == 'run-long-test') - || (github.event.pull_request.action != 'labeled' - && contains(github.event.pull_request.labels.*.name, 'run-long-test')) + (github.event.action == 'labeled' + && github.event.label.name == 'run-long-test') + || (github.event.action != 'labeled' + && contains(github.event.labels.*.name, 'run-long-test')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} diff --git a/.github/workflows/long-verification.yml b/.github/workflows/long-verification.yml index 4f95bc96ab7b..a5482554093c 100644 --- a/.github/workflows/long-verification.yml +++ b/.github/workflows/long-verification.yml @@ -18,10 +18,10 @@ jobs: name: Model Checking With Atomic Reconfig - Consensus if: &check_trigger_conditions >- ${{ - (github.event.pull_request.action == 'labeled' - && github.event.pull_request.label.name == 'run-long-verification') - || (github.event.pull_request.action != 'labeled' - && contains(github.event.pull_request.labels.*.name, 'run-long-verification')) + (github.event.action == 'labeled' + && github.event.label.name == 'run-long-verification') + || (github.event.action != 'labeled' + && contains(github.event.labels.*.name, 'run-long-verification')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}