[CELEBORN-2437][INFRA] Fix JIRA fix version suggestion in merge_pr.py - #3818
Open
pan3793 wants to merge 2 commits into
Open
[CELEBORN-2437][INFRA] Fix JIRA fix version suggestion in merge_pr.py#3818pan3793 wants to merge 2 commits into
pan3793 wants to merge 2 commits into
Conversation
Suggested fix versions for main used the first version returned by the JIRA API, which is ordered by creation time, so it could suggest an old unreleased version (e.g. 0.3.3) instead of the next main release (e.g. 1.0.0). Sort unreleased versions by semantic version: main maps to the greatest unreleased N.0.0, and branch-M.N maps to the greatest unreleased M.N.x version. Version names are now required to be exactly x.y.z to exclude non-semver entries. Assisted-by: deepseek-v4-pro
Member
Author
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR fixes how dev/merge_pr.py suggests default JIRA fix versions after a PR merge by selecting versions based on semantic version ordering (instead of JIRA API creation order), and by requiring strictly-formed x.y.z version names.
Changes:
- Add semantic-version max helper and a dedicated
compute_default_fix_versions(...)function. - Filter unreleased JIRA versions using
re.fullmatchto exclude malformed version names. - Replace inline fix-version selection logic in
resolve_jira_issuewith the new helper.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+274
to
+275
| chosen = _semver_max_version( | ||
| [n for n in unreleased_version_names if n.startswith(prefix)] |
| def _semver_max_version(names): | ||
| if not names: | ||
| return None | ||
| parsed = [(tuple(int(p) for p in n.split(".")), n) for n in names] |
Match branch-M.N fix versions with a dot boundary so 0.70.1 is not considered for branch-0.7, and skip malformed version names in _semver_max_version instead of raising ValueError. Assisted-by: deepseek-v4-pro
yew1eb
approved these changes
Aug 20, 2026
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?
When resolving a JIRA after merging a PR, the suggested fix version for
mainwas the first unreleased version returned by the JIRA API, which is ordered by creation time rather than version number. As a result,maincould suggest an old unreleased version (e.g.0.3.3) instead of the next main release (e.g.1.0.0).This PR follows the version inference approach of SPARK-56865 in
dev/merge_spark_pr.py: suggested fix versions are picked by semantic version, withmaincontributing the greatest unreleasedN.0.0andbranch-M.Ncontributing the greatest unreleasedM.N.x. It also requires JIRA version names to be exactlyx.y.z, excluding malformed entries such as the current0.5.2, 0.4.3, 0.6.0.Why are the changes needed?
The default suggestion was wrong for PRs merged to
main, requiring committers to correct it manually.Does this PR introduce any user-facing change?
No.
How was this patch tested?
python3 -m py_compile dev/merge_pr.py, plus manual checks ofcompute_default_fix_versionsagainst the current unreleased CELEBORN versions:main + branch-0.7now suggests1.0.0,0.7.1instead of0.3.3,0.7.1.Assisted-by: deepseek-v4-pro