Hyukjin Kwon created SPARK-59104:
------------------------------------

             Summary: Fix connect-rust fix-version resolution for backport 
branches in the PR merge script
                 Key: SPARK-59104
                 URL: https://issues.apache.org/jira/browse/SPARK-59104
             Project: Spark
          Issue Type: Bug
          Components: Connect
    Affects Versions: connect-rust-4.3.0
            Reporter: Hyukjin Kwon


The PR merge script (dev/merge_connect_rust_pr.py) fails to resolve the JIRA 
fix version for a backport branch, printing:

    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.

Root cause: resolve_jira_issue() maps a branch to a version with

    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 is always 
False and the fix version is skipped.

Fix: match the connect-rust-prefixed name for the branch line:

    if v.name.startswith("connect-rust-%s." % b.replace("branch-", "")):

The trailing dot 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. Verified: 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), branch-4.20 -> connect-rust-4.20.0 
only.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to