feat: add merge queue to osac-test-infra, grant wg-infra bypass on github-config - #186
Conversation
WalkthroughThe changes add conditional merge queue bypass and pull-request enforcement to the repository ruleset. Repository configurations grant ChangesMerge queue rulesets
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant MergeQueue
participant RepositoryRuleset
participant GitHubRepository
MergeQueue->>RepositoryRuleset: Push rebased commit
RepositoryRuleset->>GitHubRepository: Apply Integration bypass
GitHubRepository-->>MergeQueue: Accept commit
RepositoryRuleset->>GitHubRepository: Require pull request
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches 💡 1⚔️ Resolve merge conflicts 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@modules/common_repository/main.tf`:
- Around line 150-153: Separate the update restriction from the ruleset that
uses ruleset_bypass_team_ids: create or reuse a dedicated ruleset for update
with only approved bypass actors, and remove update from the shared ruleset
controlled by the update expression in the Terraform configuration. Preserve
merge-queue behavior while ensuring wg-infra cannot bypass the update
restriction.
In `@repositories.tf`:
- Around line 315-334: Do not enable the merge_queue configuration in the
ruleset until osac-test-infra deploys workflows with merge_group triggers that
emit all four required contexts: e2e-vmaas-gate, e2e-bmaas-gate, e2e-caas-gate,
and check-labels. Keep the queue settings unchanged once those workflow changes
are available.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: da619d4d-bbaf-4b9f-9397-a81d7cd46158
📒 Files selected for processing (2)
modules/common_repository/main.tfrepositories.tf
…348) Add workflows required for GitHub merge queue support: - label-gate.yml: required status check that validates lgtm, approved, and jira/valid-reference labels are present - auto-queue.yml: enables auto-merge for collaborator PRs, respects do-not-merge/hold and needs-rebase blocking labels - Add merge_group trigger to all three e2e caller workflows so they run on merge queue entries - Add gate jobs (e2e-vmaas-gate, e2e-bmaas-gate, e2e-caas-gate) as required status checks for the merge queue Depends on: osac-project/github-config#186 Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: omer-vishlitzky <omer.vishlitzky@gmail.com>
…thub-config osac-test-infra: - Add merge queue with same settings as osac (REBASE, ALLGREEN, batch 4) - Add required status checks (e2e gates + check-labels) - Add wg-infra as ruleset bypass team - Remove push_allowances (conflicts with merge queue bot) - Depends on: label-gate, e2e gate jobs, and auto-queue workflows being added to osac-test-infra repo first github-config: - Add wg-infra team with admin permission - Add wg-infra as ruleset bypass team (can force merge) Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: omer-vishlitzky <omer.vishlitzky@gmail.com>
The update rule blocks ALL ref updates including auto-merge evaluation,
causing "Cannot update this protected ref" on every PR. The pull_request
rule blocks direct pushes ("Changes must be made through a pull request")
without interfering with the merge queue or auto-merge.
required_approving_review_count = 0 because native GitHub reviews are
not used — approval is handled by Prow labels and the check-labels gate.
Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: omer-vishlitzky <omer.vishlitzky@gmail.com>
8e92f7f to
b78026a
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@modules/common_repository/main.tf`:
- Around line 150-159: Move the dynamic pull_request rule out of the ruleset
that grants wg-infra bypass_mode = "always", placing it in a separate ruleset
without that team bypass. Preserve the merge_queue condition and
required_approving_review_count = 0 so direct pushes remain blocked while
merge-queue behavior is unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 32dba2ce-f757-4334-8d13-88a12902d684
📒 Files selected for processing (1)
modules/common_repository/main.tf
Summary
osac-test-infra:
github-config:
Dependencies
Depends on osac-test-infra PR adding label-gate, e2e gate jobs, and auto-queue workflows.
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes