cloud-fan opened a new pull request, #55878:
URL: https://github.com/apache/spark/pull/55878
### What changes were proposed in this pull request?
When `dev/merge_spark_pr.py` resolves a JIRA after merging a PR to multiple
branches, it computes a default Fix Versions list from the merge targets. This
PR adjusts that computation in two ways:
1. When master is merged alongside any `branch-M.x` integration dev branch,
drop master's `N.0.0` entry. `branch-M.x -> master` is a merge-forward chain,
so master's next release inherits anything that lands on `branch-M.x` and
listing `N.0.0` is redundant. This matches the convention Spark committers
already apply by hand.
2. Remove `_dedupe_fix_versions_adjacent_major_zero`. Its intra-major rule
("drop `M.minor.0` when `M.(minor-1).0` is present") fired across contributing
refs and wrongly dropped the `branch-M.x` entry whenever the corresponding
`branch-M.N` release branch was also in the merge set (e.g. `master +
branch-4.x + branch-4.2` produced `[5.0.0, 4.2.0]` instead of `[4.3.0,
4.2.0]`). Exact duplicates are now removed with `dict.fromkeys`.
Sanity check against the current unreleased SPARK versions (`5.0.0, 4.3.0,
4.2.0, 4.1.2, 4.0.3, 3.5.9`):
| Merge branches | Before | After |
|---|---|---|
| `master` | `[5.0.0]` | `[5.0.0]` |
| `master`, `branch-4.x` | `[5.0.0, 4.3.0]` | `[4.3.0]` |
| `master`, `branch-4.x`, `branch-4.2` | `[5.0.0, 4.2.0]` | `[4.3.0, 4.2.0]`
|
| `master`, `branch-4.2` | `[5.0.0, 4.2.0]` | `[5.0.0, 4.2.0]` |
The last row is unchanged because `branch-4.2` is a release branch, not an
integration dev branch. This matches the actual fix-versions on recent master +
`branch-4.2` backports (e.g. SPARK-56680, SPARK-56811).
### Why are the changes needed?
The current defaults force committers to manually edit Fix Versions in two
cases:
- `master + branch-M.x`: strip the extra `N.0.0`.
- `master + branch-M.x + branch-M.N`: re-add the `M.x` entry that the old
dedupe dropped.
Both cases are addressed by the rule change.
### Does this PR introduce _any_ user-facing change?
No. The committer prompt still lets the user override the defaults, so any
committer who prefers the old behavior can type it in. Only the suggested
default changes.
### How was this patch tested?
- `python3 -m doctest dev/merge_spark_pr.py -v` — 31 tests pass, including a
new doctest for `master + branch-4.x + branch-4.2`.
- Manually ran `compute_merge_default_fix_versions` against the live
unreleased SPARK versions from JIRA for the four scenarios in the table above.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.7)
--
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]