Skip to content

Commit d37149c

Browse files
rambleraptorkevinjqliuCopilot
authored
move required status checks into Merge Queue ruleset (#4113)
* move required status checks into Merge Queue ruleset * Let committers bypass the Merge Queue ruleset for urgent fixes Replace classic branch protection with an equivalent ruleset, since classic protection blocks ruleset bypass, and add apache/iceberg-public as a pull-request bypass actor on the Merge Queue ruleset. Ports apache/iceberg-rust#3458, #3481, and #3489. * Move urgent PR merge docs to end of contributing guide Keep the committer-only procedure out of the contributor setup flow, and indent the code block 4 spaces so mkdocs renders it inside the list. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Kevin Liu <kevin.jq.liu@gmail.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 7d51e52 commit d37149c

3 files changed

Lines changed: 58 additions & 22 deletions

File tree

‎.asf.yaml‎

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,38 +33,60 @@ github:
3333
squash: true
3434
squash_commit_message: PR_TITLE_AND_COMMIT_DETAILS
3535
rebase: true
36-
protected_branches:
37-
main:
38-
required_status_checks:
39-
contexts:
40-
# Repository policy and security checks.
41-
- Analyze Actions
42-
- Run zizmor 🌈
43-
- asf-allowlist-check
44-
- rat
45-
46-
# Documentation checks.
47-
- docs
48-
- markdown-link-check
49-
50-
# Python workflow gates.
51-
- python-ci-required
52-
- python-integration-required
53-
36+
# Disabled: GitHub blocks ruleset bypass while classic protection exists.
37+
# The "Default Branch Protection" ruleset replaces it.
38+
protected_branches: ~
39+
rulesets:
40+
- name: "Default Branch Protection"
41+
type: branch
42+
branches:
43+
includes:
44+
- "~DEFAULT_BRANCH"
45+
excludes: []
46+
bypass_teams:
47+
- root
48+
restrict_deletion: true
49+
restrict_force_push: true
50+
required_linear_history: true
5451
required_pull_request_reviews:
5552
required_approving_review_count: 1
56-
57-
required_linear_history: true
58-
rulesets:
5953
- name: Merge Queue
6054
target: branch
6155
enforcement: active
56+
bypass_actors:
57+
# apache/root (ASF Infra).
58+
- actor_id: 118420
59+
actor_type: Team
60+
bypass_mode: always
61+
# apache/iceberg-public. Iceberg committers can opt into this team via
62+
# https://gitbox.apache.org/boxer/.
63+
- actor_id: 20107235
64+
actor_type: Team
65+
bypass_mode: pull_request
6266
conditions:
6367
ref_name:
6468
include:
6569
- "~DEFAULT_BRANCH"
6670
exclude: []
6771
rules:
72+
- type: required_status_checks
73+
parameters:
74+
# Merge Queue already tests each entry against the latest main
75+
strict_required_status_checks_policy: false
76+
required_status_checks:
77+
# Repository policy and security checks.
78+
- context: Analyze Actions
79+
- context: Run zizmor 🌈
80+
- context: asf-allowlist-check
81+
- context: rat
82+
83+
# Documentation checks.
84+
- context: docs
85+
- context: markdown-link-check
86+
87+
# Python workflow gates.
88+
- context: python-ci-required
89+
- context: python-integration-required
6890
- type: merge_queue
6991
parameters:
7092
check_response_timeout_minutes: 90

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ lives under `pyiceberg/`, organized by concern rather than by engine:
6868

6969
### Required CI and Merge Queue
7070

71-
- Keep the `required_status_checks.contexts` list in `.asf.yaml` synchronized whenever a required job/check is added, renamed, or removed. Each entry is a job/check context name, not a workflow filename.
71+
- Keep the `required_status_checks` list in the `Merge Queue` ruleset in `.asf.yaml` synchronized whenever a required job/check is added, renamed, or removed. Each entry is a job/check context name, not a workflow filename.
7272
- Verify that every required context reports for both `pull_request` and `merge_group`. Its producer workflow must run on both events.
7373
- When a workflow uses an aggregate required job, such as `python-ci-required`, keep `if: always()` and its `needs` list in sync with every job whose result should block merging.
7474
- Do not use `pull_request` path filters in workflows that produce required contexts. A skipped workflow does not report its required context, which blocks pull requests and causes Merge Queue entries to time out.

‎mkdocs/docs/contributing.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,3 +338,17 @@ For the type annotation the types from the `Typing` package are used.
338338
### Third party libraries
339339

340340
PyIceberg naturally integrates into the rich Python ecosystem, however it is important to be hesitant adding third party packages. Adding a lot of packages makes the library heavyweight, and causes incompatibilities with other projects if they use a different version of the library. Also, big libraries such as `s3fs`, `adlfs`, `pyarrow`, `thrift` should be optional to avoid downloading everything, while not being sure if is actually being used.
341+
342+
## Merging an urgent PR
343+
344+
Committers can merge an urgent, approved pull request without waiting for the merge queue or required checks (for example, a security fix while CI is stuck). Use this only when necessary; otherwise, let the merge queue run.
345+
346+
<!-- markdown-link-check-disable-next-line -->
347+
1. Join the [`apache/iceberg-public`](https://github.com/orgs/apache/teams/iceberg-public) team via [Boxer](https://gitbox.apache.org/boxer/) (one-time; membership syncs in about 15 minutes).
348+
2. Get the pull request approved by a committer.
349+
3. If the pull request is in the merge queue, click **Remove from queue**.
350+
4. Merge it directly:
351+
352+
```sh
353+
gh pr merge <number> --squash --admin
354+
```

0 commit comments

Comments
 (0)