[SPARK-57795][INFRA][FOLLOWUP] Refine the merge summary comment in merge_spark_pr.py#56925
Closed
zhengruifeng wants to merge 2 commits into
Closed
[SPARK-57795][INFRA][FOLLOWUP] Refine the merge summary comment in merge_spark_pr.py#56925zhengruifeng wants to merge 2 commits into
zhengruifeng wants to merge 2 commits into
Conversation
…ent in merge_spark_pr.py" This reverts commit eb3d853.
…a backport is cancelled Once the PR is merged into the target branch and pushed, the merge summary comment should record that landing regardless of what happens to subsequent cherry-picks. Previously, aborting or cancelling a backport (e.g. answering "n" at a cherry-pick conflict) raised through fail()/sys.exit() before post_merge_comment ran, so the already-successful target-branch merge was never recorded. Wrap the backport loop in try/finally so post_merge_comment always runs with whatever landed (at minimum the target-branch merge).
Contributor
Author
|
use this script to merge #56949, |
dongjoon-hyun
approved these changes
Jul 2, 2026
Contributor
Author
|
Merge summary (posted by
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This reapplies the merge summary comment refinement that was merged as
1ea6ed10d75and then reverted byeb3d853db89(the merge was unintentional), and adds one behavioral fix on top.Reapplied change (refines the merge summary comment posted by
merge_spark_pr.py):**Merge summary** (posted bymerge_spark_pr.py):to**Merge Summary:**.[:8]truncation is dropped inmerge_prand_do_cherry_pick, with.strip()added sincerun_cmddoes not strip the trailing newline.merge_spark_pr.pyattribution to a trailing italic line:*Posted bymerge_spark_pr.py*.Additional fix (second commit):
nat a cherry-pick conflict) raised throughfail()/sys.exit()beforepost_merge_commentran, so the already-successful target-branch merge was never recorded. The backport loop is now wrapped intry/finallysopost_merge_commentalways runs with whatever landed (at minimum the target-branch merge).Example rendered comment:
Why are the changes needed?
A cleaner, more readable merge summary comment, and a correct one: cancelling a backport must not drop the record of the merge that already landed on the target branch.
Does this PR introduce any user-facing change?
No. This only affects the developer merge tooling. The
git cherry-pick -x"cherry picked from commit ..." line is unaffected (git always records the full SHA regardless of the abbreviation passed).How was this patch tested?
Manually verified the generated comment body and confirmed the full SHA is carried through. Existing lint (
ruff) passes.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (model: claude-opus-4-8)