Repository navigation
Conversation
A pull request whose code maintainers had already approved still waited for one of them to approve its CI runs by hand, as a pilot contributor pointed out on #74696. A maintainer who approved the exact head commit has reviewed all of it, CI changes included, which is what approving the runs asks of them. Generated-by: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01NyQq9U7i5HhjDgrQ9qd3gq
Dev-iL
left a comment
There was a problem hiding this comment.
lgtm + a couple of suggestions/questions on the docs.
| too, whatever the rules above say: the maintainer has read the change, CI changes included. A | ||
| review of an earlier commit does not count for a later push, and neither does an approval the |
There was a problem hiding this comment.
Is there a way to detect a "ui rebase" that has no code changes? If yes - I think maintainer approvals should carry over.
There was a problem hiding this comment.
Looks like GitHub already does this: after a force-push that doesn't change the diff, the approval's commit_id moves to the new head.
e.g. #77024 an approval followed a clean rebase, but stayed on the old commit after the next push that changed code.
|
|
||
| The runs of a PR whose head commit a maintainer approved are approved whatever the PR changes, as | ||
| for a trusted stakeholder. The reviewer's latest verdict on the PR must be an `APPROVED` review of | ||
| that exact commit (a later `CHANGES_REQUESTED` or a dismissal withdraws it, a comment does not), and |
There was a problem hiding this comment.
a later
CHANGES_REQUESTEDor a dismissal withdraws it
Unclear: is it by the same maintainer/reviewer, or any reviewer?
There was a problem hiding this comment.
Looks like only the same reviewer counts here -- another maintainer's changes requested doesn't block it
There was a problem hiding this comment.
The use self-hosted runners check in selective_checks.py works the other way (any committer's changes requested blocks it), maybe worth keeping the two the same?
During the fork CI pilot, Iliya Romm pointed out that #74696 was waiting for a maintainer to approve its CI even though maintainers had already approved its code three times. He suggested that maintainer approvals should count as workflow approvals. (#76282 has since removed the reason that particular pull request waited:
dev/breeze/tests/no longer counts as CI-defining.)With this change,
breeze ci approve-workflow-runsapproves a commit's waiting runs, whatever the other rules say, when a maintainer has approved that exact commit. In detail:Which review counts: each reviewer's latest verdict on the pull request. A later
CHANGES_REQUESTEDor a dismissal withdraws an approval; a comment does not.Which commit: the review's
commit_idmust be the pull request's head commit. An approval of an earlier commit does not cover a later push.Who counts as a maintainer: someone with
writeoradminpermission, read fromGET /repos/apache/airflow/collaborators/<login>/permission. Collaborators granted triage in.asf.yamlreportreadand do not count. The review's author association can't be used for this, because it saysCOLLABORATORfor triagers too.What still waits for a maintainer:
Labels no longer matter for these runs, because the approval doesn't depend on how many tests they select.
This is the same kind of rule as the one for trusted stakeholders' repositories, and it is checked after it. The reasoning: a maintainer who approved the exact head commit has reviewed every change in it, CI changes included, which is what approving its runs by hand asks of them.
dev/breeze/doc/ci/05_workflows.md("Approval of pull request runs") and the contributor section ofcontributing-docs/05_pull_requests.rstdescribe the rule.Tested:
dev/breeze/tests/test_workflow_run_approval.pypasses (179 tests, 16 of them new). The new tests cover the approval checks, the end-to-end approval of a waiting run, a head commit shared by two pull requests, and the two new API calls. Static checks pass.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Claude Opus 5) following the guidelines
🤖 Generated with Claude Code
https://claude.ai/code/session_01NyQq9U7i5HhjDgrQ9qd3gq