Skip to content

[SPARK-51493] Refine merge_spark_pr.py to use connect-swift-x.y.z version #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Mar 12, 2025

What changes were proposed in this pull request?

This PR aims to refine merge_spark_pr.py to use connect-swift-x.y.z version pattern.

Why are the changes needed?

To avoid using the version of Apache Spark repository.

Does this PR introduce any user-facing change?

No, this is an dev script.

How was this patch tested?

Manual review.

Was this patch authored or co-authored using generative AI tooling?

No.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-51493] Refine merge_spark_pr.py to use connect-swift-x.y.z [SPARK-51493] Refine merge_spark_pr.py to use connect-swift-x.y.z version Mar 12, 2025
@dongjoon-hyun
Copy link
Member Author

Could you review this PR when you have some time, @attilapiros ?

@attilapiros
Copy link

I see this connect-swift-x.y.z is already used in the tickets:
image

@attilapiros
Copy link

Let me do a quick test..

@dongjoon-hyun
Copy link
Member Author

Thank you, @attilapiros .

This PR aims to filter when it chooses Fixed Version.

@dongjoon-hyun
Copy link
Member Author

To test, you can try to merge this PR (SPARK-51493) with this script.
Screenshot 2025-03-12 at 13 23 17

Copy link

@attilapiros attilapiros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Small test:

>>> import re
>>> import jira.client
>>> JIRA_API_BASE = "https://issues.apache.org/jira"
>>> jira_server = {"server": JIRA_API_BASE}
>>> asf_jira = jira.client.JIRA(jira_server)
>>> versions = asf_jira.project_versions("SPARK")
>>> versions
[<JIRA Version: name='0.5.0', id='12326667'>, <JIRA Version: name='0.5.1', id='12326668'>, <JIRA Version: name='0.5.2', id='12326674'>, <JIRA Version: name='0.6.0', id='123
26669'>, <JIRA Version: name='0.6.1', id='12326670'>, <JIRA Version: name='0.6.2', id='12326672'>, <JIRA Version: name='0.7.0', id='12326671'>, <JIRA Version: name='0.7.1',
 id='12326676'>, <JIRA Version: name='0.7.2', id='12326678'>, <JIRA Version: name='0.7.3', id='12326679'>, <JIRA Version: name='0.8.0', id='12326677'>, <JIRA Version: name=
'0.8.1', id='12326681'>, <JIRA Version: name='0.8.2', id='12326685'>, <JIRA Version: name='0.9.0', id='12326682'>, <JIRA Version: name='0.9.1', id='12326684'>, <JIRA Versio
n: name='0.9.2', id='12326687'>, <JIRA Version: name='0.9.3', id='12327384'>, <JIRA Version: name='1.0.0', id='12326683'>, <JIRA Version: name='1.0.1', id='12326744'>, <JIR
A Version: name='1.0.2', id='12327168'>, <JIRA Version: name='1.0.3', id='12327468'>, <JIRA Version: name='1.1.0', id='12326686'>, <JIRA Version: name='1.1.1', id='12327368
'>, <JIRA Version: name='1.1.2', id='12328982'>, <JIRA Version: name='1.2.0', id='12327369'>, <JIRA Version: name='1.2.1', id='12329029'>, <JIRA Version: name='1.2.2', id='
12329321'>, <JIRA Version: name='1.2.3', id='12331971'>, <JIRA Version: name='1.3.0', id='12327642'>, <JIRA Version: name='1.3.1', id='12329486'>, <JIRA Version: name='1.3.
2', id='12329871'>, <JIRA Version: name='1.4.0', id='12329359'>, <JIRA Version: name='1.4.1', id='12332153'>, <JIRA Version: name='1.4.2', id='12332833'>, <JIRA Version: na
me='1.5.0', id='12332078'>, <JIRA Version: name='1.5.1', id='12333108'>, <JIRA Version: name='1.5.2', id='12333643'>, <JIRA Version: name='1.5.3', id='12333969'>, <JIRA Ver
sion: name='1.6.0', id='12333083'>, <JIRA Version: name='1.6.1', id='12334009'>, <JIRA Version: name='1.6.2', id='12334910'>, <JIRA Version: name='1.6.3', id='12336854'>, <
JIRA Version: name='1.6.4', id='12338653'>, <JIRA Version: name='2.0.0', id='12329449'>, <JIRA Version: name='2.0.1', id='12336857'>, <JIRA Version: name='2.0.2', id='12338
301'>, <JIRA Version: name='2.0.3', id='12338608'>, <JIRA Version: name='2.1.0', id='12335644'>, <JIRA Version: name='2.1.1', id='12338779'>, <JIRA Version: name='2.1.2', i
d='12340295'>, <JIRA Version: name='2.1.3', id='12341660'>, <JIRA Version: name='2.1.4', id='12343550'>, <JIRA Version: name='2.2.0', id='12338275'>, <JIRA Version: name='2
.2.1', id='12340470'>, <JIRA Version: name='2.2.2', id='12342171'>, <JIRA Version: name='2.2.3', id='12343560'>, <JIRA Version: name='2.2.4', id='12344921'>, <JIRA Version:
 name='2.3.0', id='12339551'>, <JIRA Version: name='2.3.1', id='12342432'>, <JIRA Version: name='2.3.2', id='12343289'>, <JIRA Version: name='2.3.3', id='12343759'>, <JIRA
Version: name='2.3.4', id='12344844'>, <JIRA Version: name='2.3.5', id='12346043'>, <JIRA Version: name='2.4.0', id='12342385'>, <JIRA Version: name='2.4.1', id='12344117'>
, <JIRA Version: name='2.4.2', id='12344996'>, <JIRA Version: name='2.4.3', id='12345410'>, <JIRA Version: name='2.4.4', id='12345466'>, <JIRA Version: name='2.4.5', id='12
346042'>, <JIRA Version: name='2.4.6', id='12346781'>, <JIRA Version: name='2.4.7', id='12348242'>, <JIRA Version: name='2.4.8', id='12348669'>, <JIRA Version: name='2.4.9'
, id='12350084'>, <JIRA Version: name='3.0.0', id='12339177'>, <JIRA Version: name='3.0.1', id='12347862'>, <JIRA Version: name='3.0.2', id='12348739'>, <JIRA Version: name
='3.0.3', id='12349723'>, <JIRA Version: name='3.1.0', id='12346518'>, <JIRA Version: name='3.1.1', id='12349541'>, <JIRA Version: name='3.1.2', id='12349602'>, <JIRA Versi
on: name='3.2.0', id='12349407'>, <JIRA Version: name='3.1.3', id='12350224'>, <JIRA Version: name='3.0.4', id='12350319'>, <JIRA Version: name='3.2.1', id='12350582'>, <JI
RA Version: name='3.3.0', id='12350369'>, <JIRA Version: name='3.1.4', id='12351224'>, <JIRA Version: name='3.2.2', id='12351232'>, <JIRA Version: name='3.3.1', id='1235171
0'>, <JIRA Version: name='3.2.3', id='12352105'>, <JIRA Version: name='3.2.4', id='12352607'>, <JIRA Version: name='3.3.3', id='12352932'>, <JIRA Version: name='3.4.2', id=
'12353368'>, <JIRA Version: name='3.3.2', id='12352299'>, <JIRA Version: name='3.4.0', id='12351465'>, <JIRA Version: name='3.4.1', id='12352874'>, <JIRA Version: name='3.5
.0', id='12352848'>, <JIRA Version: name='4.0.0', id='12353359'>, <JIRA Version: name='3.5.1', id='12353495'>, <JIRA Version: name='3.3.4', id='12353505'>, <JIRA Version: n
ame='3.5.2', id='12353980'>, <JIRA Version: name='3.4.3', id='12353987'>, <JIRA Version: name='3.4.4', id='12354565'>, <JIRA Version: name='kubernetes-operator-0.1.0', id='
12354567'>, <JIRA Version: name='3.5.3', id='12354954'>, <JIRA Version: name='3.5.4', id='12355093'>, <JIRA Version: name='3.5.5', id='12355518'>, <JIRA Version: name='4.1.
0', id='12355581'>, <JIRA Version: name='3.5.6', id='12355703'>, <JIRA Version: name='connect-swift-0.1.0', id='12355780'>, <JIRA Version: name='4.1', id='12355782'>]
versions_mapped = [
...         x
...         for x in versions
...         if not x.raw["released"]
...         and not x.raw["archived"]
...         and re.match(r"connect-swift-\d+\.\d+\.\d+", x.name)
...  ]
>>> versions_mapped
[<JIRA Version: name='connect-swift-0.1.0', id='12355780'>]

@dongjoon-hyun
Copy link
Member Author

Thank you so much, @attilapiros !

@dongjoon-hyun
Copy link
Member Author

Merged to main~ (I also used this new script to merge this PR.)

...
Would you like to update an associated JIRA? (y/N): y
Enter a JIRA id [SPARK-51493]:
=== JIRA SPARK-51493 ===
Summary		Refine `merge_spark_pr.py` to use `connect-swift-x.y.z` version
Assignee	None
Status		Open
Url		https://issues.apache.org/jira/browse/SPARK-51493
Affected	['connect-swift-0.1.0']

Check if the JIRA information is as expected (y/N): y
JIRA is unassigned, choose assignee
[0] Dongjoon Hyun (Reporter)
Enter number of user, or userid, to assign to (blank to leave unassigned): 0
Enter comma-separated fix version(s) [connect-swift-0.1.0]:
=== JIRA SPARK-51493 ===
Summary		Refine `merge_spark_pr.py` to use `connect-swift-x.y.z` version
Assignee	Dongjoon Hyun
Status		Resolved
Url		https://issues.apache.org/jira/browse/SPARK-51493
Affected	['connect-swift-0.1.0']
Fixed		['connect-swift-0.1.0']

Successfully resolved SPARK-51493 with fixVersions=['connect-swift-0.1.0']!

@dongjoon-hyun dongjoon-hyun deleted the SPARK-51493 branch March 12, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants