cloud-fan opened a new pull request, #56282: URL: https://github.com/apache/spark/pull/56282
### What changes were proposed in this pull request? Harden `dev/merge_spark_pr.py` so it refuses to run when a prerequisite for a correct merge is missing, instead of silently proceeding: - `initialize_jira()` now fails fast when the `jira` library is not installed or when no JIRA credentials are configured, rather than prompting `Continue without jira?` and merging without resolving the ticket. It runs before any git work, so nothing is merged when it aborts. - Add `check_script_up_to_date()`, run first in `main()`, which asks GitHub for the latest commit on `master` touching this script and fails if that commit is not in the local history (i.e. the committer is missing an upstream update). It compares commit reachability rather than downloading the file, so being ahead of `master` is fine and does not trip the check. Set `SKIP_VERSION_CHECK=1` to bypass when iterating on the script itself. - Drop the now-unreachable `asf_jira is None` guards and the misleading `Exiting without trying to close the associated JIRA` branch, since JIRA access is now mandatory. ### Why are the changes needed? When the `jira` library is not installed (or credentials are unset), the merge script would prompt to continue without JIRA and then merge the PR while leaving the associated ticket Open. This is easy to miss and tedious to reconcile after the fact. A stale local copy of the merge script can likewise reintroduce already-fixed behavior. Failing loudly on both makes a correct merge the only path. ### Does this PR introduce _any_ user-facing change? No. This only affects committers running the merge tooling. ### How was this patch tested? - `python3 -m py_compile dev/merge_spark_pr.py` and `python3 -m doctest dev/merge_spark_pr.py`. - Exercised `check_script_up_to_date()` for three paths: up-to-date/ahead (passes), `SKIP_VERSION_CHECK=1` (bypasses), and a missing-upstream-commit SHA (loud `fail()` + non-zero exit). ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8) This pull request and its description were written by Isaac. -- 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]
