Skip to content

[SPARK-58944][INFRA][FOLLOWUP] Handle manually completed cherry-picks - #58521

Open
zhengruifeng wants to merge 1 commit into
apache:masterfrom
zhengruifeng:infra-fix-manual-backport-dev-1
Open

[SPARK-58944][INFRA][FOLLOWUP] Handle manually completed cherry-picks#58521
zhengruifeng wants to merge 1 commit into
apache:masterfrom
zhengruifeng:infra-fix-manual-backport-dev-1

Conversation

@zhengruifeng

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Record the target branch's HEAD before starting a cherry-pick. After a conflict is resolved,
continue the cherry-pick in the merge script only when HEAD is unchanged. If the committer already
completed the cherry-pick manually, proceed with the backport instead of invoking
git cherry-pick --continue a second time.

Why are the changes needed?

Git tells committers resolving a cherry-pick conflict to run git cherry-pick --continue. If they
follow that instruction before returning to the merge script, the script currently tries to
continue the already-completed cherry-pick and fails with no cherry-pick or revert in progress.

Does this PR introduce any user-facing change?

Yes, for Spark committers using dev/merge_spark_pr.py. The script now accepts an already-completed
manual conflict resolution. This only changes unreleased committer tooling.

How was this patch tested?

Ran git diff --check.

Ran dev/merge_spark_pr.py --dry-run 58404, selected branch-4.2, reproduced the cherry-pick
conflict, resolved it, and manually ran git cherry-pick --continue. The script detected the new
HEAD, skipped its second --continue, reached the dry-run push, restored the original branch, and
exited successfully without external changes.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: OpenAI Codex (GPT-5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant