Skip to content

fix(asf): let the Write role bypass main's CI ruleset, as airflow does - #2190

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/asf-yaml-ruleset-write-role
Nov 18, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/asf-yaml-ruleset-write-role

Conversation

@potiuk

@potiuk potiuk commented Nov 18, 2026

Copy link
Copy Markdown
Member

Summary

main has had no protection since #2184: the classic protection was removed, and ASF Infra's .asf.yaml run could not create the main ruleset. After #2189 fixed the first error, the second one is:

Validation failed while creating ruleset 'main': ['Actor magpie committers team must be part of the ruleset source or owner organization']

GitHub does not accept the magpie-committers team as a bypass actor. apache/airflow hit the same problem with airflow-committers and solved it with the Write repository role instead; this follows its .asf.yaml:

  • "Require CI on main" (raw Rulesets API payload): the zizmor, prek and tests-ok required checks, not strict. Bypass actor: the Write repository role (actor_id: 4, bypass_mode: always). On this repository only committers hold Write, granted by ASF Infra from the project's LDAP group, so the bypass list follows committer changes with no update to .asf.yaml. The external collaborators get Triage, not Write.
  • "Branch protection" (convenience syntax, no bypass): linear history, resolved review threads, the pull-request requirement with zero required approvals (the approval requirement stays lifted), and no branch deletion or force push. Because every change to main needs a PR and nobody can bypass this ruleset, the CI bypass cannot be used to push to main directly.
  • protected_branches: ~ stays, so classic protection does not come back and block the bypass.

Type of change

  • Other: repository configuration (.asf.yaml)

Test plan

  • The file parses; the raw entry uses only raw keys and the convenience entry only convenience keys, as asfyaml requires. The bypass actor and rule shapes match apache/airflow's working rulesets.
  • After merge: no new "Error while running github feature" mail from ASF Infra; gh api repos/apache/magpie/rules/branches/main lists the required status checks, pull request, linear history, deletion and non-fast-forward rules; a PR with a failing required check shows as blocked, with the bypass option offered to committers.

🤖 Generated with Claude Code

GitHub refuses the magpie-committers team as a ruleset bypass actor, so
the `main` ruleset was never created and main had no protection. Follow
apache/airflow: a raw "Require CI on main" ruleset with the required
checks, bypassable by the Write repository role (actor_id 4), which
only committers hold and which ASF Infra grants from LDAP; and a
"Branch protection" ruleset with no bypass for linear history,
resolved conversations, the pull-request requirement, and no branch
deletion or force push.

Generated-by: Claude Opus 5
@potiuk potiuk added family:ci .github workflows, prek, validators capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) labels Nov 18, 2026
@potiuk
potiuk merged commit 49100b6 into apache:main Nov 18, 2026
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) family:ci .github workflows, prek, validators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant