zhengruifeng opened a new pull request, #57981: URL: https://github.com/apache/spark/pull/57981
### What changes were proposed in this pull request? Update `dev/merge_spark_pr.py` so that JIRA handling is not skipped when a backport is cancelled after the original merge has already been pushed. The script now also runs JIRA handling when an already-merged pull request is invoked again in backport mode. If the associated issue is already resolved, the script preserves its existing Fix Versions and offers to add only the versions inferred from newly discovered backport branches. ### Why are the changes needed? The JIRA update previously ran after the optional cherry-pick loop. Cancelling a cherry-pick exited through the loop's cleanup path and never reached the JIRA update. A later invocation recognized the closed pull request as a backport, but that path also exited before JIRA handling. This happened with #57754: the first invocation merged into `master` and was cancelled while starting the `branch-4.x` backport. The second invocation completed that backport, but neither invocation updated SPARK-58556, so it had to be resolved manually with both Fix Versions. ### Does this PR introduce _any_ user-facing change? No. This only changes the Spark committer merge tool. ### How was this patch tested? Added inline doctests for retaining existing Fix Versions while selecting only newly inferred backport versions. The following checks passed: ``` cd dev conda run -n spark-dev-313 python -m doctest -v merge_spark_pr.py ``` 79 doctests passed. ``` conda run -n spark-dev-313 ruff check --config pyproject.toml dev/merge_spark_pr.py conda run -n spark-dev-313 ruff format --check --config pyproject.toml dev/merge_spark_pr.py ``` ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Codex (GPT-5) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
