Skip to content

ci: require the quality-gate check on master - #20903

Draft
amaechler wants to merge 2 commits into
apache:masterfrom
amaechler:require-ci-ruleset
Draft

amaechler wants to merge 2 commits into
apache:masterfrom
amaechler:require-ci-ruleset

Conversation

@amaechler

Copy link
Copy Markdown
Contributor

Description

This PR makes a passing CI run a merge requirement on master. It adds a Require CI ruleset to .asf.yaml that requires the quality-gate status check, which #20878 adds as the one check that reports on every PR and fails unless the whole CI run passed. Today a PR shows a green merge button even when CI never ran or failed; with this ruleset, GitHub waits for quality-gate to pass.

Merge this only after #20878. Until quality-gate exists on master, no PR reports it, so every PR would wait for it and need a committer to bypass the rule.

Committers can bypass the rule

The ruleset uses the same raw syntax and bypass actor as the Require review ruleset from #20804: the Write repository role (actor_id: 4), which on this repository only committers hold. A committer can still merge a PR whose CI is red for an unrelated reason, such as a flaky test, by choosing to bypass the rules in the merge box. As with Require review, this is an explicit choice rather than the default green button.

Scope and settings

  • Only master is covered. Release branches are left out for now.
  • strict_required_status_checks_policy: false, so a PR does not have to be up to date with master before it can merge.
  • The check is not pinned to the GitHub Actions app. asfyaml passes raw ruleset values to the API as strings, apart from a fixed set of keys, and GitHub rejects a string integration_id. Every raw-syntax ruleset in other Apache repos that requires a check names it by context only, including Airflow's CI passed (also bypassed through the Write role), Iceberg's ci-required and SeaTunnel's Build.
  • A cancelled CI run reports quality-gate as cancelled, not skipped, so it blocks the merge until a new run passes. GitHub would count a skipped required check as passed.
  • It is a separate ruleset rather than another rule in Require review, so either can be changed or dropped on its own.

After merge

An open PR whose latest CI run started before #20878 landed has no quality-gate result. GitHub shows the check as expected and waiting until the author pushes a new commit, or a committer bypasses the rule. Merging master into the branch or rebasing it is enough.

The gate is a merge requirement, not a security boundary. A PR runs its own copy of the workflow, so a PR that edits quality-gate can make it pass. Committers still need to review workflow changes before merging.

The check name is not validated by ASF Infra. If the job is ever renamed in unit-and-integration-tests-unified.yml, this ruleset has to be updated in the same PR.


This PR has:

  • been self-reviewed.

Add a "Require CI" ruleset so a pull request into master can only merge
once the quality-gate job of the CI workflow has passed. Committers can
bypass it, with the same Write repository role bypass as the review
ruleset, to merge a PR whose CI is red for an unrelated reason.

The check is not pinned to the GitHub Actions app: asfyaml passes raw
ruleset values to the API as strings, apart from a fixed set of keys,
and GitHub rejects a string integration_id.

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No actionable issues found. The new active ruleset is correctly scoped to the default branch, requires the documented quality-gate check, and follows the existing repository-role bypass pattern.

Reviewed 1 of 1 changed files.

Validation: git diff --check and YAML parsing passed.


This is an automated review by Codex GPT-5.6-Luna(max)

@FrankChen021 FrankChen021 added the Approval Recommended Used when AI completes a review and reports no findings label Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approval Recommended Used when AI completes a review and reports no findings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants