You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
0 commit comments