You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "pan3793 (via GitHub)" <gi...@apache.org> on 2026/08/24 08:56:08 UTC
[PR] [CELEBORN-2440][INFRA] Post a merge summary comment on the PR in merge_pr.py [celeborn]
pan3793 opened a new pull request, #3823:
URL: https://github.com/apache/celeborn/pull/3823
### What changes were proposed in this pull request?
Port three `merge_pr.py` improvements from Spark's `merge_spark_pr.py`:
1. Post a "Merge Summary" comment on the PR after the merge, recording every branch the
change landed on and a link to the resulting commit. `cherry_pick` now returns the
`(ref, hash)` pair it pushed so backports are included, and the comment is posted from
a `finally` block, so a cancelled cherry-pick does not drop what already landed. The
backport path (PR already merged) posts a summary too. Without `GITHUB_OAUTH_KEY` the
summary is printed to the console and the POST is skipped.
2. Close the PR through the API when it is still open after the push. `Closes #N` only
auto-closes the PR when the commit lands on the default branch, so merges into
`branch-x.y` leave it open.
3. Polish the interactive prompts: capitalize `N` in the `(y/n)` prompts, since all of
them treat any input other than `y` as no, and add the missing space after `":"` in
the JIRA assignee prompt.
The comment looks like:
> **Merge Summary:**
> - merged into main https://github.com/apache/celeborn/commit/cd44172a
> - merged into branch-0.6 https://github.com/apache/celeborn/commit/abcd1234
>
> *Posted by `merge_pr.py`*
### Why are the changes needed?
A merged PR currently records nothing about where the change landed: the commit is
reachable only by searching for the `Closes #N` footer, and backport targets are not
visible from the PR page at all. Backport PRs against `branch-x.y` also stay open after
being merged and have to be closed by hand.
### Does this PR resolve a correctness bug?
- [ ] Yes
### Does this PR introduce _any_ user-facing change?
- [ ] Yes
### How was this patch tested?
Manually: `python3 -m py_compile dev/merge_pr.py` and the module doctests pass, and the
merge summary rendering was smoke-tested locally with and without `GITHUB_OAUTH_KEY`.
The GitHub API calls will be exercised by the next real merge.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2440][INFRA] Post a merge summary comment on the PR in merge_pr.py [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas closed pull request #3823: [CELEBORN-2440][INFRA] Post a merge summary comment on the PR in merge_pr.py
URL: https://github.com/apache/celeborn/pull/3823
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2440][INFRA] Post a merge summary comment on the PR in merge_pr.py [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #3823:
URL: https://github.com/apache/celeborn/pull/3823#discussion_r3844657345
##########
dev/merge_pr.py:
##########
@@ -90,6 +91,59 @@ def get_json(url):
sys.exit(-1)
+def close_pr(pr_num):
+ url = "%s/pulls/%s" % (GITHUB_API_BASE, pr_num)
+ data = json.dumps({"state": "closed"}).encode("utf-8")
+ request = Request(url, data=data, method="PATCH")
+ request.add_header("Content-Type", "application/json")
+ request.add_header("Accept", "application/vnd.github+json")
+ if GITHUB_OAUTH_KEY:
Review Comment:
**[P1] Require authentication before trying to close the PR**\n\n is still documented as optional, but when it is unset this sends an unauthenticated PATCH. GitHub requires write permission for updating PR state, so the call fails, the result is ignored, and maintenance-branch PRs remain open. Please either require and validate a write-capable token before the push, or explicitly skip this feature and update the configuration documentation.\n\nhttps://docs.github.com/en/rest/pulls/pulls#update-a-pull-request
##########
dev/merge_pr.py:
##########
@@ -634,11 +691,27 @@ def main():
merge_hash = merge_pr(pr_num, target_ref, title, body, pr_repo_desc)
+ # Ordered (branch, commit hash) pairs for the merge comment: the merge sink first,
+ # then each cherry-pick target as it is picked.
+ merged_commits = [(target_ref, merge_hash)]
+
pick_prompt = "Would you like to pick %s into another branch?" % merge_hash
- while input("\n%s (y/n): " % pick_prompt).lower() == "y":
- merged_refs = merged_refs + [
- cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
- ]
+ # Post the summary in a finally block: the merge into the target branch has already
+ # been pushed, so aborting a later cherry-pick must not drop that line.
+ try:
+ while input("\n%s (y/N): " % pick_prompt).lower() == "y":
+ picked = cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
+ merged_refs = merged_refs + [picked[0]]
+ merged_commits = merged_commits + [picked]
+ finally:
+ # The "Closes #N" string in the commit message only auto-closes the PR when the
+ # commit lands on the default branch. For merges into other branches (e.g.
+ # branch-X.Y backport PRs), GitHub leaves the PR open, so close it through the API.
+ pr_state = get_json("%s/pulls/%s" % (GITHUB_API_BASE, pr_num)).get("state")
+ if pr_state != "closed":
+ print("\nPR #%s is still open after push; closing it explicitly.\n" % pr_num)
+ close_pr(pr_num)
Review Comment:
**[P1] Preserve a merge marker when closing the PR**\n\nThis PATCH creates a regular close event whose is null, while lines 658-660 recognize a previous merge only from close events with a non-null . On a later invocation for another backport, the script therefore misses the already-merged path and attempts a fresh merge. This is observable on #3697: commit landed on , but its close event has . Please adapt merge detection to the pushed hash/state, or record and consume another durable marker, before automatically closing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2440][INFRA] Post a merge summary comment on the PR in merge_pr.py [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #3823:
URL: https://github.com/apache/celeborn/pull/3823#discussion_r3844659139
##########
dev/merge_pr.py:
##########
@@ -634,11 +691,27 @@ def main():
merge_hash = merge_pr(pr_num, target_ref, title, body, pr_repo_desc)
+ # Ordered (branch, commit hash) pairs for the merge comment: the merge sink first,
+ # then each cherry-pick target as it is picked.
+ merged_commits = [(target_ref, merge_hash)]
+
pick_prompt = "Would you like to pick %s into another branch?" % merge_hash
- while input("\n%s (y/n): " % pick_prompt).lower() == "y":
- merged_refs = merged_refs + [
- cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
- ]
+ # Post the summary in a finally block: the merge into the target branch has already
+ # been pushed, so aborting a later cherry-pick must not drop that line.
+ try:
+ while input("\n%s (y/N): " % pick_prompt).lower() == "y":
+ picked = cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
+ merged_refs = merged_refs + [picked[0]]
+ merged_commits = merged_commits + [picked]
+ finally:
+ # The "Closes #N" string in the commit message only auto-closes the PR when the
+ # commit lands on the default branch. For merges into other branches (e.g.
+ # branch-X.Y backport PRs), GitHub leaves the PR open, so close it through the API.
+ pr_state = get_json("%s/pulls/%s" % (GITHUB_API_BASE, pr_num)).get("state")
Review Comment:
**[P2] Keep post-push bookkeeping best-effort**\n\nThis calls , which exits on HTTP errors and lets connection errors escape. Because the target commit has already been pushed, a rate-limit or network failure here prevents and all later JIRA handling; rerunning the merge is not a safe recovery. Please catch and report this state check locally, and ensure the remaining bookkeeping still runs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2440][INFRA] Post a merge summary comment on the PR in merge_pr.py [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on PR #3823:
URL: https://github.com/apache/celeborn/pull/3823#issuecomment-5661231255
Thanks. Merged to main(v1.0.0).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2440][INFRA] Post a merge summary comment on the PR in merge_pr.py [celeborn]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #3823:
URL: https://github.com/apache/celeborn/pull/3823#discussion_r3916877654
##########
dev/merge_pr.py:
##########
@@ -90,6 +91,59 @@ def get_json(url):
sys.exit(-1)
+def close_pr(pr_num):
+ url = "%s/pulls/%s" % (GITHUB_API_BASE, pr_num)
+ data = json.dumps({"state": "closed"}).encode("utf-8")
+ request = Request(url, data=data, method="PATCH")
+ request.add_header("Content-Type", "application/json")
+ request.add_header("Accept", "application/vnd.github+json")
+ if GITHUB_OAUTH_KEY:
Review Comment:
Fixed in 11671f45a: `close_pr` now returns early with `GITHUB_OAUTH_KEY is not set; skipping closing PR #N.`, the guard `post_merge_comment` already had, and the `GITHUB_OAUTH_KEY` doc comment no longer describes the key as a rate-limit convenience. Note the failure was reported rather than silently ignored (`Failed to close PR #N: HTTP 401 Unauthorized`), but the pre-check is clearer and consistent.
##########
dev/merge_pr.py:
##########
@@ -634,11 +691,27 @@ def main():
merge_hash = merge_pr(pr_num, target_ref, title, body, pr_repo_desc)
+ # Ordered (branch, commit hash) pairs for the merge comment: the merge sink first,
+ # then each cherry-pick target as it is picked.
+ merged_commits = [(target_ref, merge_hash)]
+
pick_prompt = "Would you like to pick %s into another branch?" % merge_hash
- while input("\n%s (y/n): " % pick_prompt).lower() == "y":
- merged_refs = merged_refs + [
- cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
- ]
+ # Post the summary in a finally block: the merge into the target branch has already
+ # been pushed, so aborting a later cherry-pick must not drop that line.
+ try:
+ while input("\n%s (y/N): " % pick_prompt).lower() == "y":
+ picked = cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
+ merged_refs = merged_refs + [picked[0]]
+ merged_commits = merged_commits + [picked]
+ finally:
+ # The "Closes #N" string in the commit message only auto-closes the PR when the
+ # commit lands on the default branch. For merges into other branches (e.g.
+ # branch-X.Y backport PRs), GitHub leaves the PR open, so close it through the API.
+ pr_state = get_json("%s/pulls/%s" % (GITHUB_API_BASE, pr_num)).get("state")
+ if pr_state != "closed":
+ print("\nPR #%s is still open after push; closing it explicitly.\n" % pr_num)
+ close_pr(pr_num)
Review Comment:
The detection gap predates this PR: GitHub links a commit to the `closed` event only when it lands on the default branch, so a pull request merged into branch-x.y never had one. On #3697 the `commit_id: null` close event was created manually on 2026-05-21, and the old filter was already empty for it, so the API close does not lose anything that used to work.
368bec8f0 fixes the gap: `find_merge_commit` prefers `closed` events and falls back to `referenced` events confirmed against the `Closes #N from <ref>` merge footer. Verified against the real events of #3697: previously undetected, now resolves `0bf9c5a58`.
11671f45a additionally skips the API close for merges into main, so it can never race GitHub's own auto-close.
##########
dev/merge_pr.py:
##########
@@ -634,11 +691,27 @@ def main():
merge_hash = merge_pr(pr_num, target_ref, title, body, pr_repo_desc)
+ # Ordered (branch, commit hash) pairs for the merge comment: the merge sink first,
+ # then each cherry-pick target as it is picked.
+ merged_commits = [(target_ref, merge_hash)]
+
pick_prompt = "Would you like to pick %s into another branch?" % merge_hash
- while input("\n%s (y/n): " % pick_prompt).lower() == "y":
- merged_refs = merged_refs + [
- cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
- ]
+ # Post the summary in a finally block: the merge into the target branch has already
+ # been pushed, so aborting a later cherry-pick must not drop that line.
+ try:
+ while input("\n%s (y/N): " % pick_prompt).lower() == "y":
+ picked = cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
+ merged_refs = merged_refs + [picked[0]]
+ merged_commits = merged_commits + [picked]
+ finally:
+ # The "Closes #N" string in the commit message only auto-closes the PR when the
+ # commit lands on the default branch. For merges into other branches (e.g.
+ # branch-X.Y backport PRs), GitHub leaves the PR open, so close it through the API.
+ pr_state = get_json("%s/pulls/%s" % (GITHUB_API_BASE, pr_num)).get("state")
Review Comment:
Fixed in 11671f45a: the state lookup is gone, since the close is now conditional on the target branch instead, so there is no API call between the push and the bookkeeping. `post_merge_comment` runs first, and `close_pr`/`comment_pr` catch `Exception` rather than only `HTTPError`, so a connection error can no longer skip the merge summary or the JIRA update.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2440][INFRA] Post a merge summary comment on the PR in merge_pr.py [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #3823:
URL: https://github.com/apache/celeborn/pull/3823#discussion_r3844658265
##########
dev/merge_pr.py:
##########
@@ -634,11 +691,27 @@ def main():
merge_hash = merge_pr(pr_num, target_ref, title, body, pr_repo_desc)
+ # Ordered (branch, commit hash) pairs for the merge comment: the merge sink first,
+ # then each cherry-pick target as it is picked.
+ merged_commits = [(target_ref, merge_hash)]
+
pick_prompt = "Would you like to pick %s into another branch?" % merge_hash
- while input("\n%s (y/n): " % pick_prompt).lower() == "y":
- merged_refs = merged_refs + [
- cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
- ]
+ # Post the summary in a finally block: the merge into the target branch has already
+ # been pushed, so aborting a later cherry-pick must not drop that line.
+ try:
+ while input("\n%s (y/N): " % pick_prompt).lower() == "y":
+ picked = cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
+ merged_refs = merged_refs + [picked[0]]
+ merged_commits = merged_commits + [picked]
+ finally:
+ # The "Closes #N" string in the commit message only auto-closes the PR when the
+ # commit lands on the default branch. For merges into other branches (e.g.
+ # branch-X.Y backport PRs), GitHub leaves the PR open, so close it through the API.
+ pr_state = get_json("%s/pulls/%s" % (GITHUB_API_BASE, pr_num)).get("state")
+ if pr_state != "closed":
+ print("\nPR #%s is still open after push; closing it explicitly.\n" % pr_num)
+ close_pr(pr_num)
Review Comment:
This PATCH creates a regular close event whose `commit_id` is null, while lines 658-660 recognize a previous merge only from close events with a non-null `commit_id`. On a later invocation for another backport, the script therefore misses the already-merged path and attempts a fresh merge. This is observable on #3697: commit `0bf9c5a58` landed on `branch-0.6`, but its close event has `commit_id: null`. Please adapt merge detection to the pushed hash/state, or record and consume another durable marker, before automatically closing.
##########
dev/merge_pr.py:
##########
@@ -90,6 +91,59 @@ def get_json(url):
sys.exit(-1)
+def close_pr(pr_num):
+ url = "%s/pulls/%s" % (GITHUB_API_BASE, pr_num)
+ data = json.dumps({"state": "closed"}).encode("utf-8")
+ request = Request(url, data=data, method="PATCH")
+ request.add_header("Content-Type", "application/json")
+ request.add_header("Accept", "application/vnd.github+json")
+ if GITHUB_OAUTH_KEY:
Review Comment:
`GITHUB_OAUTH_KEY` is still documented as optional, but when it is unset this sends an unauthenticated PATCH. GitHub requires write permission for updating PR state, so the call fails, the `None` result is ignored, and maintenance-branch PRs remain open. Please either require and validate a write-capable token before the push, or explicitly skip this feature and update the configuration documentation.
https://docs.github.com/en/rest/pulls/pulls#update-a-pull-request
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2440][INFRA] Post a merge summary comment on the PR in merge_pr.py [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #3823:
URL: https://github.com/apache/celeborn/pull/3823#discussion_r3844657345
##########
dev/merge_pr.py:
##########
@@ -90,6 +91,59 @@ def get_json(url):
sys.exit(-1)
+def close_pr(pr_num):
+ url = "%s/pulls/%s" % (GITHUB_API_BASE, pr_num)
+ data = json.dumps({"state": "closed"}).encode("utf-8")
+ request = Request(url, data=data, method="PATCH")
+ request.add_header("Content-Type", "application/json")
+ request.add_header("Accept", "application/vnd.github+json")
+ if GITHUB_OAUTH_KEY:
Review Comment:
**[P1] Require authentication before trying to close the PR**
`GITHUB_OAUTH_KEY` is still documented as optional, but when it is unset this sends an unauthenticated PATCH. GitHub requires write permission for updating PR state, so the call fails, the `None` result is ignored, and maintenance-branch PRs remain open. Please either require and validate a write-capable token before the push, or explicitly skip this feature and update the configuration documentation.
https://docs.github.com/en/rest/pulls/pulls#update-a-pull-request
##########
dev/merge_pr.py:
##########
@@ -634,11 +691,27 @@ def main():
merge_hash = merge_pr(pr_num, target_ref, title, body, pr_repo_desc)
+ # Ordered (branch, commit hash) pairs for the merge comment: the merge sink first,
+ # then each cherry-pick target as it is picked.
+ merged_commits = [(target_ref, merge_hash)]
+
pick_prompt = "Would you like to pick %s into another branch?" % merge_hash
- while input("\n%s (y/n): " % pick_prompt).lower() == "y":
- merged_refs = merged_refs + [
- cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
- ]
+ # Post the summary in a finally block: the merge into the target branch has already
+ # been pushed, so aborting a later cherry-pick must not drop that line.
+ try:
+ while input("\n%s (y/N): " % pick_prompt).lower() == "y":
+ picked = cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
+ merged_refs = merged_refs + [picked[0]]
+ merged_commits = merged_commits + [picked]
+ finally:
+ # The "Closes #N" string in the commit message only auto-closes the PR when the
+ # commit lands on the default branch. For merges into other branches (e.g.
+ # branch-X.Y backport PRs), GitHub leaves the PR open, so close it through the API.
+ pr_state = get_json("%s/pulls/%s" % (GITHUB_API_BASE, pr_num)).get("state")
+ if pr_state != "closed":
+ print("\nPR #%s is still open after push; closing it explicitly.\n" % pr_num)
+ close_pr(pr_num)
Review Comment:
**[P1] Preserve a merge marker when closing the PR**
This PATCH creates a regular close event whose `commit_id` is null, while lines 658-660 recognize a previous merge only from close events with a non-null `commit_id`. On a later invocation for another backport, the script therefore misses the already-merged path and attempts a fresh merge. This is observable on #3697: commit `0bf9c5a58` landed on `branch-0.6`, but its close event has `commit_id: null`. Please adapt merge detection to the pushed hash/state, or record and consume another durable marker, before automatically closing.
##########
dev/merge_pr.py:
##########
@@ -634,11 +691,27 @@ def main():
merge_hash = merge_pr(pr_num, target_ref, title, body, pr_repo_desc)
+ # Ordered (branch, commit hash) pairs for the merge comment: the merge sink first,
+ # then each cherry-pick target as it is picked.
+ merged_commits = [(target_ref, merge_hash)]
+
pick_prompt = "Would you like to pick %s into another branch?" % merge_hash
- while input("\n%s (y/n): " % pick_prompt).lower() == "y":
- merged_refs = merged_refs + [
- cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
- ]
+ # Post the summary in a finally block: the merge into the target branch has already
+ # been pushed, so aborting a later cherry-pick must not drop that line.
+ try:
+ while input("\n%s (y/N): " % pick_prompt).lower() == "y":
+ picked = cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
+ merged_refs = merged_refs + [picked[0]]
+ merged_commits = merged_commits + [picked]
+ finally:
+ # The "Closes #N" string in the commit message only auto-closes the PR when the
+ # commit lands on the default branch. For merges into other branches (e.g.
+ # branch-X.Y backport PRs), GitHub leaves the PR open, so close it through the API.
+ pr_state = get_json("%s/pulls/%s" % (GITHUB_API_BASE, pr_num)).get("state")
Review Comment:
**[P2] Keep post-push bookkeeping best-effort**
This calls `get_json()`, which exits on HTTP errors and lets connection errors escape. Because the target commit has already been pushed, a rate-limit or network failure here prevents `post_merge_comment()` and all later JIRA handling; rerunning the merge is not a safe recovery. Please catch and report this state check locally, and ensure the remaining bookkeeping still runs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2440][INFRA] Post a merge summary comment on the PR in merge_pr.py [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #3823:
URL: https://github.com/apache/celeborn/pull/3823#discussion_r3844659139
##########
dev/merge_pr.py:
##########
@@ -634,11 +691,27 @@ def main():
merge_hash = merge_pr(pr_num, target_ref, title, body, pr_repo_desc)
+ # Ordered (branch, commit hash) pairs for the merge comment: the merge sink first,
+ # then each cherry-pick target as it is picked.
+ merged_commits = [(target_ref, merge_hash)]
+
pick_prompt = "Would you like to pick %s into another branch?" % merge_hash
- while input("\n%s (y/n): " % pick_prompt).lower() == "y":
- merged_refs = merged_refs + [
- cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
- ]
+ # Post the summary in a finally block: the merge into the target branch has already
+ # been pushed, so aborting a later cherry-pick must not drop that line.
+ try:
+ while input("\n%s (y/N): " % pick_prompt).lower() == "y":
+ picked = cherry_pick(pr_num, merge_hash, next(branch_iter, branch_names[0]))
+ merged_refs = merged_refs + [picked[0]]
+ merged_commits = merged_commits + [picked]
+ finally:
+ # The "Closes #N" string in the commit message only auto-closes the PR when the
+ # commit lands on the default branch. For merges into other branches (e.g.
+ # branch-X.Y backport PRs), GitHub leaves the PR open, so close it through the API.
+ pr_state = get_json("%s/pulls/%s" % (GITHUB_API_BASE, pr_num)).get("state")
Review Comment:
This calls `get_json()`, which exits on HTTP errors and lets connection errors escape. Because the target commit has already been pushed, a rate-limit or network failure here prevents `post_merge_comment()` and all later JIRA handling; rerunning the merge is not a safe recovery. Please catch and report this state check locally, and ensure the remaining bookkeeping still runs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org