Skip to content

Commit 38f1057

Browse files
fix: add merge_group triggers to critical workflows for merge queue (#2027)
# Fix GitHub merge queue workflow re-execution ## Summary This PR fixes the GitHub merge queue configuration to properly re-run workflows before merging. Previously, when PRs were added to the merge queue, GitHub workflows were not being executed, causing the merge queue to bypass critical checks. **Key Changes:** - Added `merge_group:` event triggers to 14 critical workflow files so merge queue re-runs workflows before merging - Maintained original `merge-queue.yml` configuration with `status-success~=.*` pattern for individual workflow management - Removed consolidated status check approach per user feedback (user prefers manual configuration of individual required checks) **Workflow files modified:** `lints.yml`, `build.yml`, `vm.yml`, `cli.yml`, `primitives.yml`, `sdk.yml`, `recursion.yml`, `extension-tests.yml`, `riscv.yml`, `guest-lib-tests.yml`, `benchmarks.yml`, `benchmarks-execute.yml`, `docs.yml`, `native-compiler.yml` ## Review & Testing Checklist for Human - [ ] **End-to-end merge queue testing**: Enable merge queue in repository settings, create a test PR, add to merge queue, and verify all workflows re-run before merging to main - [ ] **Verify workflow trigger completeness**: Confirm all critical workflows that should run during merge queue have `merge_group:` triggers added - [ ] **Test individual required check setup**: Add specific workflows as required checks in branch protection rules and verify they work with merge queue - [ ] **Check for unintended workflow execution**: Verify `merge_group:` triggers don't cause workflows to run in unexpected scenarios - [ ] **Validate workflow selection**: Review the 14 modified workflows to ensure they represent the critical checks needed for merge safety **Recommended test plan**: Enable merge queue in repository settings → create test PR with small change → add to merge queue → observe workflow re-execution → verify automatic merge only after all checks pass. --- ### Diagram ```mermaid %%{ init : { "theme" : "default" }}%% graph TD MergeQueue["GitHub<br/>Merge Queue"] --> WorkflowFiles["14 Modified<br/>Workflow Files"]:::minor-edit MergeQueue --> MergeQueueConfig["merge-queue.yml<br/>(No Changes)"]:::context WorkflowFiles --> MergeGroupTrigger["merge_group:<br/>triggers added"] WorkflowFiles --> Lints["lints.yml"]:::minor-edit WorkflowFiles --> Build["build.yml"]:::minor-edit WorkflowFiles --> VM["vm.yml"]:::minor-edit WorkflowFiles --> CLI["cli.yml"]:::minor-edit WorkflowFiles --> OtherWorkflows["+ 10 other<br/>workflows"]:::minor-edit MergeQueueConfig --> StatusPattern["status-success~=.*<br/>(Requires all checks)"] BranchProtection["Branch Protection<br/>Rules"]:::context --> IndividualChecks["Individual Required<br/>Checks (Manual Setup)"]:::context subgraph Legend L1["Major Edit"]:::major-edit L2["Minor Edit"]:::minor-edit L3["Context/No Edit"]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFF ``` ### Notes - **Communication issue resolved**: Initially implemented a consolidated status check approach that user didn't want; reverted to individual workflow management per feedback - **Testing limitation**: Cannot test merge queue functionality end-to-end without repository settings access - requires human verification - **Maintenance consideration**: If new critical workflows are added, they will need `merge_group:` triggers added manually - **Session info**: Requested by @jonathanpwang, Link to Devin run: https://app.devin.ai/sessions/e3a24a93e1f9454c866f2b77f11c5704 --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Jonathan Wang <[email protected]>
1 parent 3122ce7 commit 38f1057

14 files changed

+14
-0
lines changed

.github/workflows/benchmarks-execute.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
- "extensions/**"
1818
- "Cargo.toml"
1919
- ".github/workflows/benchmarks-execute.yml"
20+
merge_group:
2021
workflow_dispatch:
2122

2223
concurrency:

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
- ".github/workflows/benchmark-call.yml"
1818
- ".github/workflows/benchmarks.yml"
1919
- "Cargo.toml"
20+
merge_group:
2021
workflow_dispatch:
2122
inputs:
2223
flamegraphs:

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: ["main"]
66
pull_request:
77
branches: ["**"]
8+
merge_group:
89

910
concurrency:
1011
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}

.github/workflows/cli.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
- "examples/**"
1616
- "Cargo.toml"
1717
- ".github/workflows/cli.yml"
18+
merge_group:
1819
workflow_dispatch:
1920
inputs:
2021
use_local_openvm:

.github/workflows/docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
branches: [main]
1010
paths:
1111
- ".github/workflows/docs.yml"
12+
merge_group:
1213

1314
env:
1415
CARGO_NET_GIT_FETCH_WITH_CLI: true

.github/workflows/extension-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- "extensions/**"
1313
- "Cargo.toml"
1414
- ".github/workflows/extension-tests.yml"
15+
merge_group:
1516

1617
concurrency:
1718
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}

.github/workflows/guest-lib-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
- "Cargo.toml"
1515
- ".github/workflows/guest-lib-tests.yml"
1616
- "crates/sdk/guest/fib/**"
17+
merge_group:
1718

1819
concurrency:
1920
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}

.github/workflows/lints.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: ["main"]
66
pull_request:
77
branches: ["**"]
8+
merge_group:
89

910
concurrency:
1011
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}

.github/workflows/native-compiler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- "extensions/native/compiler/**"
1212
- "Cargo.toml"
1313
- ".github/workflows/native-compiler.yml"
14+
merge_group:
1415

1516
concurrency:
1617
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}

.github/workflows/primitives.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- "crates/circuits/mod-builder/**"
1313
- "Cargo.toml"
1414
- ".github/workflows/primitives.yml"
15+
merge_group:
1516

1617
concurrency:
1718
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}

0 commit comments

Comments
 (0)