This is an automated email from the ASF dual-hosted git repository.

HyukjinKwon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark-connect-rust.git


The following commit(s) were added to refs/heads/master by this push:
     new 8bdd9b0  [SPARK-59104] Fix connect-rust fix-version resolution for 
backport branches in the PR merge script
8bdd9b0 is described below

commit 8bdd9b0f69b140edee8cd669c8392ddc4dc70ad5
Author: Hyukjin Kwon <[email protected]>
AuthorDate: Sat Aug 29 17:22:57 2026 +0900

    [SPARK-59104] Fix connect-rust fix-version resolution for backport branches 
in the PR merge script
    
    ### What changes were proposed in this pull request?
    
    Fix `dev/merge_connect_rust_pr.py` so it resolves the JIRA fix version for 
a backport branch. It printed:
    
    ```
    Target version for branch-4.2 is not found on JIRA, it may be archived or 
not created. Skipping it.
    ```
    
    even though `connect-rust-4.2.0` exists and is unreleased.
    
    `resolve_jira_issue()` mapped a branch to a version with:
    
    ```python
    if v.name.startswith(b.replace("branch-", "")):
    ```
    
    For `branch-4.2` this checks whether the version name starts with `"4.2"`. 
But spark-connect-rust versions are named `connect-rust-X.Y.Z` (e.g. 
`connect-rust-4.2.0`), which start with `"connect-rust-"`, so the match was 
always `False` and the fix version was skipped. The change matches the full 
prefixed name:
    
    ```python
    if v.name.startswith("connect-rust-%s." % b.replace("branch-", "")):
    ```
    
    The trailing `.` prevents `branch-4.2` from matching `connect-rust-4.20.0`. 
The downstream version dedup (`v.split(".")` / previous-minor) already works 
with `connect-rust-*` names because the prefix contains no dots, so no other 
change is needed.
    
    ### Why are the changes needed?
    
    Without this, backporting a merged PR to `branch-4.2` silently drops the 
fix version, so the JIRA is not tagged with the release it actually shipped in.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No — developer tooling only.
    
    ### How was this patch tested?
    
    `python3 -m py_compile` passes, and the matching + dedup logic was 
unit-tested against the real version names:
    
    - `branch-4.2` → `connect-rust-4.2.0`
    - `master` → `connect-rust-4.3.0`
    - `master` + `branch-4.2` → `connect-rust-4.2.0` (release branch wins, per 
the existing dedup)
    - `branch-4.20` → `connect-rust-4.20.0` only (no false match with `4.2.x`)
    
    This pull request and its description were written by Isaac.
    
    Closes #86 from HyukjinKwon/fix-mergescript-jira-version.
    
    Authored-by: Hyukjin Kwon <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 dev/merge_connect_rust_pr.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dev/merge_connect_rust_pr.py b/dev/merge_connect_rust_pr.py
index fd18661..e351071 100755
--- a/dev/merge_connect_rust_pr.py
+++ b/dev/merge_connect_rust_pr.py
@@ -328,7 +328,11 @@ def resolve_jira_issue(merge_branches, comment, 
default_jira_id=""):
             found = False
             found_versions = []
             for v in versions:
-                if v.name.startswith(b.replace("branch-", "")):
+                # spark-connect-rust versions are named connect-rust-X.Y.Z, so 
branch-X.Y
+                # maps to the connect-rust-X.Y.* line. Comparing the bare 
"X.Y" from the
+                # branch name against v.name never matches, because v.name 
carries the
+                # "connect-rust-" prefix; match the full prefixed name instead.
+                if v.name.startswith("connect-rust-%s." % b.replace("branch-", 
"")):
                     found_versions.append(v.name)
                     found = True
             if found:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to