This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 32c92b69620 Tell fork CI authors at the open pull request limit to
free a slot (#77100)
32c92b69620 is described below
commit 32c92b696204a2739c0755fcac09e56365a88c14
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sun Nov 15 06:06:47 2026 +0100
Tell fork CI authors at the open pull request limit to free a slot (#77100)
The state comment of a green author's draft told an author whom GitHub
would not let mark the draft ready to ask a maintainer to do it. That does
not work: drafts do not count towards the open pull request limit, so
marking one ready needs a free slot, and GitHub refuses it at the limit
whoever tries. The only way forward is to close or finish another open
pull request first, which the comment and the contributor documentation
now say.
Generated-by: Claude Opus 5
---
contributing-docs/18_contribution_workflow.rst | 5 ++++-
contributing-docs/32_open_pull_request_limit.rst | 3 +++
.../doc/ci/08_fork_ci_for_external_contributors.md | 7 ++++---
dev/breeze/src/airflow_breeze/utils/fork_ci_messages.py | 16 +++++++++++-----
dev/breeze/tests/test_fork_ci_messages.py | 5 ++++-
5 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/contributing-docs/18_contribution_workflow.rst
b/contributing-docs/18_contribution_workflow.rst
index 617cf0c6c03..8c2e23990f6 100644
--- a/contributing-docs/18_contribution_workflow.rst
+++ b/contributing-docs/18_contribution_workflow.rst
@@ -189,7 +189,10 @@ draft it. A
``Fork CI / Tests (AMD)`` status on the pull request links to that run, and
one comment on the pull
request explains the current state. Once the run is green, a pull request the
monitor drafted is
marked ready for review and labelled ``ready for maintainer review``; a pull
request you drafted
-yourself stays a draft, and gets the label, once you mark it ready. A pull
request whose fork CI
+yourself stays a draft, and gets the label, once you mark it ready. Marking a
draft ready needs a
+free slot under the `limit on open pull requests
<32_open_pull_request_limit.rst>`__: at the limit,
+GitHub refuses it, also when a maintainer tries, so close or finish one of
your other open pull
+requests first. A pull request whose fork CI
does not run for 30 days is closed with an explanation; you can reopen it
after setting up fork CI. If your pull request changes
files that decide which CI jobs run and where, such as ``.github/``, the
breeze sources or
``scripts/ci/prek/``, a green fork run is not enough: a maintainer reviews the
change and runs project CI for it.
diff --git a/contributing-docs/32_open_pull_request_limit.rst
b/contributing-docs/32_open_pull_request_limit.rst
index 4dd370d0bea..281509f5604 100644
--- a/contributing-docs/32_open_pull_request_limit.rst
+++ b/contributing-docs/32_open_pull_request_limit.rst
@@ -59,6 +59,9 @@ How the limit works
* Draft Pull Requests do not count towards the limit yet, because GitHub does
not support counting
them. Once GitHub adds that, we will start counting drafts as well - so do
not rely on drafts to
get around the limit. Keep unfinished work on a branch in your fork instead.
+* Marking a draft ready for review makes it count, so GitHub refuses it while
you are at the limit -
+ also when a maintainer tries to do it for you. Close or finish one of your
other open Pull
+ Requests first, then mark the draft ready.
* When you have 5 open Pull Requests, GitHub does not let you open another
one. A slot frees up when
one of your Pull Requests is merged or closed.
* The limit counts Pull Requests you have open at the same time - there is no
limit on how many
diff --git a/dev/breeze/doc/ci/08_fork_ci_for_external_contributors.md
b/dev/breeze/doc/ci/08_fork_ci_for_external_contributors.md
index af80afc3f65..3ecdca3e9d4 100644
--- a/dev/breeze/doc/ci/08_fork_ci_for_external_contributors.md
+++ b/dev/breeze/doc/ci/08_fork_ci_for_external_contributors.md
@@ -556,9 +556,10 @@ request is the author's draft: a draft whose last
convert-to-draft event was not
`fork_ci_reconcile.py` holds this table, and `test_projection_table` checks
it. The table follows
one rule: a draft waits for the author, `ready for maintainer review` waits
for a maintainer
review, and `needs project ci` waits for a maintainer to review the CI change
and add
-`use project ci`. GitHub can refuse to let an author at the open pull request
limit mark a draft
-ready, so the state comment of a green author's draft tells the author to ask
a maintainer to mark
-it ready instead.
+`use project ci`. Drafts do not count towards the open pull request limit, so
marking a draft ready
+needs a free slot: GitHub refuses it for an author at the limit, whoever
tries, maintainers
+included. The state comment of a green author's draft therefore tells the
author to close or finish
+one of their other open pull requests first.
| State | Next | Draft | `ready for maintainer review` | `needs project ci` |
|---|---|---|---|---|
diff --git a/dev/breeze/src/airflow_breeze/utils/fork_ci_messages.py
b/dev/breeze/src/airflow_breeze/utils/fork_ci_messages.py
index d6fe9f4d06b..9d852c7a9fc 100644
--- a/dev/breeze/src/airflow_breeze/utils/fork_ci_messages.py
+++ b/dev/breeze/src/airflow_breeze/utils/fork_ci_messages.py
@@ -69,6 +69,9 @@ CONTRIBUTING_URL = (
"https://github.com/apache/airflow/blob/main/contributing-docs/18_contribution_workflow.rst"
"#ci-in-your-fork"
)
+OPEN_PR_LIMIT_URL = (
+
"https://github.com/apache/airflow/blob/main/contributing-docs/32_open_pull_request_limit.rst"
+)
WHY_AUTOMATED_URL = (
"https://github.com/apache/airflow/blob/main/contributing-docs/25_maintainer_pr_triage.md"
"#why-the-first-pass-is-automated"
@@ -219,18 +222,21 @@ _STATE_TEXTS = {
"gate_modified": "**Fork CI: closed.** This pull request changes the fork
CI gate; see the comment below.",
}
-_ASK_A_MAINTAINER_TO_MARK_READY = (
- "If GitHub does not let you mark it ready because you reached the limit of
open pull requests, "
- "comment here and ask a maintainer to mark it ready for you."
+# Drafts do not count towards the open pull request limit, so marking one
ready needs a free slot.
+# GitHub refuses it at the limit whoever tries, maintainers included.
+_FREE_A_SLOT_TO_MARK_READY = (
+ f"If GitHub does not let you mark it ready, you have reached the [limit of
open pull requests]"
+ f"({OPEN_PR_LIMIT_URL}): drafts do not count towards it, so this one needs
a free slot. Close or "
+ "finish one of your other open pull requests first; a maintainer cannot
mark it ready for you either."
)
_AUTHOR_DRAFT_TEXTS = {
"green": "**Fork CI: green.** CI for the latest commit passed in your
fork. The pull request is a "
"draft, so maintainers do not review it yet. Mark it ready for review when
it is. "
- f"{_ASK_A_MAINTAINER_TO_MARK_READY}",
+ f"{_FREE_A_SLOT_TO_MARK_READY}",
"green_unverified": "**Fork CI: green.** CI for the latest commit passed
in your fork, but "
f"{_CHANGES_CI_FILES} The pull request is a draft. Once you mark it ready
for review, a maintainer "
- f"will review the change and run project CI for it.
{_ASK_A_MAINTAINER_TO_MARK_READY}",
+ f"will review the change and run project CI for it.
{_FREE_A_SLOT_TO_MARK_READY}",
}
diff --git a/dev/breeze/tests/test_fork_ci_messages.py
b/dev/breeze/tests/test_fork_ci_messages.py
index 7cb6336e241..d945dfe3576 100644
--- a/dev/breeze/tests/test_fork_ci_messages.py
+++ b/dev/breeze/tests/test_fork_ci_messages.py
@@ -36,6 +36,7 @@ from airflow_breeze.utils.fork_ci_messages import (
MAX_BEHIND_COMMITS,
MAX_LISTED_CI_FILES,
MAX_LISTED_FAILED_JOBS,
+ OPEN_PR_LIMIT_URL,
OVERLAP_LISTED,
BaseCheck,
FailedJob,
@@ -169,7 +170,9 @@ def
test_state_comment_asks_the_author_to_mark_a_green_draft_ready(state, author
)
assert ("mark it ready for review" in text.lower()) is asks_to_mark_ready
- assert ("ask a maintainer to mark it ready" in text) is asks_to_mark_ready
+ assert ("Close or finish one of your other open pull requests first" in
text) is asks_to_mark_ready
+ assert (OPEN_PR_LIMIT_URL in text) is asks_to_mark_ready
+ assert "ask a maintainer to mark it ready" not in text
@pytest.mark.parametrize("startup_failure", [False, True])