← Back to Pull requests

ci: let committers bypass the merge queue for urgent fixes #7540

Open
unknown opened this pull request with 608 lines diff across 7 files
View on GitHub
unknown unknown commented on Nov 06, 2026 17:23 UTC
Author

Which issue does this PR close?

N/A. No issue filed. This ports the committer bypass apache/iceberg-rust added in apache/iceberg-rust#3459, apache/iceberg-rust#3458 and apache/iceberg-rust#3481.

Rationale for this change

Today nothing reaches main except through the merge queue, and only ASF Infra (apache/root) can bypass it. That leaves no fast path for an urgent, approved fix, for example a security fix, or the fix for a queue that evicts every entry for a reason outside the PR. That happened on 2026-11-06, when GitHub retired the macos-14 runner image. It also means a required context that never reports blocks every merge, including the one that would fix .asf.yaml, until Infra steps in.

iceberg-rust solved this with a ruleset bypass for a public committer team. This PR does the same for Comet with apache/datafusion-public.

What changes are included in this PR?

.asf.yaml:

| Ruleset | Rules | Who can bypass |
|---|---|---|
| Default Branch Protection (new) | 1 approving review, no force push, no deletion | apache/root |
| Merge Queue | merge queue, plus Required Checks (moved here from classic protection) | apache/root, apache/datafusion-public with bypass_mode: pull_request (new) |

  • main is removed from protected_branches, and the release branches keep their entries. iceberg-rust found that GitHub refuses a ruleset bypass while classic protection exists on the branch, even on an approved PR with green checks (DIRECT_MERGE: BLOCKED, apache/iceberg-rust#3481). asfyaml removes classic protection from branches no longer listed, so only main changes.

  • Default Branch Protection carries the rules classic protection gave main. Classic protection blocked force pushes and deletion implicitly, so the ruleset lists them. It sets no required_linear_history, same as today. Squash is the only merge method anyway.

  • strict_required_status_checks_policy: false keeps today's behavior. PR branches need not be up to date, because the queue tests against the latest main.

  • apache/datafusion-public (team id 19468222) is the public team DataFusion committers opt into through Boxer. Secret teams such as datafusion-committers cannot be bypass actors. pull_request mode allows the bypass only through a PR, never a direct push. Because of the Default Branch Protection ruleset, a bypass merge still needs an approval.
  • dev/ci/check-ci-config.py: asf_required_contexts() now reads the - context: entries under rulesets:. It used to read protected_branches.main, so without this change it would have silently stopped checking the context. A new check fails if main reappears under protected_branches, since that would quietly disable the bypass.

    Docs: a "Merging an urgent pull request" section in docs/source/contributor-guide/ci.md. The "Branch protection" section of .github/workflows/README.md now describes the two rulesets. release_process.md no longer shows a main: entry, and the "needs an INFRA ticket" comments are updated.

    To merge an urgent PR, a committer joins apache/datafusion-public once, gets the PR approved, removes it from the queue, and runs gh pr merge <number> --squash --admin.

    For discussion before this leaves draft

  • apache/datafusion-public is shared by every DataFusion repository, so any DataFusion committer who joins can bypass on Comet. Comet committers are DataFusion committers, so this matches iceberg-rust's setup with iceberg-public, but the PMC should agree to it.

  • main changes from classic protection to rulesets in one asfyaml run. I have not checked the order in which asfyaml applies protected_branches and rulesets. If the ruleset step failed after the classic step, main would be left with only the Merge Queue ruleset, which has no review requirement. iceberg-rust made the same switch in one PR (apache/iceberg-rust#3481) without trouble. Splitting this PR is the cautious alternative.
  • How are these changes tested?

  • python3 dev/ci/check-ci-config.py passes. With a main: entry added back under protected_branches, it fails with the new message.

  • I ran both rulesets through asfyaml's own normalize_rulesets and ensure_no_copilot_overlap (from apache/infrastructure-asfyaml, with GitHub lookups stubbed out). They produce the expected Rulesets API payloads.
  • After merge, these should hold. This is unverified until then.

    gh api repos/apache/datafusion-comet/branches/main --jq .protection.enabled   # false
    gh api repos/apache/datafusion-comet/rulesets --jq '.[].name'                  # includes Default Branch Protection
    gh api repos/apache/datafusion-comet/rulesets/22969349 --jq .current_user_can_bypass   # pull_requests_only for a datafusion-public member
    gh api repos/apache/datafusion-comet/branches/branch-1.2 --jq .protected       # still true
    

    Diff: 608 lines (+456 / -152) across 7 files Reviewer: sunchao Review duration: 35123m
    All Vouch review confidence checks passed
    Residual risk 0.27 = Change Risk (0.50) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 608 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.384
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #7540"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 50.1% (MEDIUM) · Higher = larger blast radius
    50.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 26.7% · Safe to merge
    26.7%