This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-connect-swift.git
The following commit(s) were added to refs/heads/main by this push:
new b9c48a5 [SPARK-55650] Improve `create_spark_jira.py` to support the
version parameter
b9c48a5 is described below
commit b9c48a5daadfd4679a8d7503d1591266e48bb3e4
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Mon Feb 23 21:12:13 2026 -0800
[SPARK-55650] Improve `create_spark_jira.py` to support the version
parameter
### What changes were proposed in this pull request?
This PR aims to improve `create_spark_jira.py` to support the version
parameter.
### Why are the changes needed?
To accept `Affected Version` for `Bug` type issues easily.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Manually.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: `Gemini 3.1 Pro (High)` on `Antigravity`
Closes #299 from dongjoon-hyun/SPARK-55650.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
dev/create_spark_jira.py | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/dev/create_spark_jira.py b/dev/create_spark_jira.py
index 12d13e7..9ad2b3d 100755
--- a/dev/create_spark_jira.py
+++ b/dev/create_spark_jira.py
@@ -50,27 +50,31 @@ def run_cmd(cmd):
import argparse
-def create_jira_issue(title, parent_jira_id=None, issue_type=None):
+def create_jira_issue(title, parent_jira_id=None, issue_type=None,
version=None):
asf_jira = jira.client.JIRA(
{"server": JIRA_API_BASE},
token_auth=JIRA_ACCESS_TOKEN,
timeout=(3.05, 60)
)
- versions = asf_jira.project_versions("SPARK")
- # Consider only connect-swift-x.y.z, unreleased, unarchived versions
- versions = [
- 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 = sorted(versions, key=lambda x: x.name, reverse=True)
+ if version:
+ affected_version = version
+ else:
+ versions = asf_jira.project_versions("SPARK")
+ # Consider only connect-swift-x.y.z, unreleased, unarchived versions
+ versions = [
+ 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 = sorted(versions, key=lambda x: x.name, reverse=True)
+ affected_version = versions[0].name
issue_dict = {
'project': {'key': 'SPARK'},
'summary': title,
'description': '',
'components': [{'name': 'Connect'}],
- 'versions': [{'name': versions[0].name}],
+ 'versions': [{'name': affected_version}],
}
if parent_jira_id:
@@ -113,6 +117,7 @@ def main():
parser.add_argument("title", help="Title of the JIRA issue")
parser.add_argument("-p", "--parent", help="Parent JIRA ID for subtasks")
parser.add_argument("-t", "--type", help="Issue type to create when no
parent is specified (e.g. Bug). Defaults to Improvement.")
+ parser.add_argument("-v", "--version", help="Version to use (e.g.
connect-swift-1.0.0)")
args = parser.parse_args()
if args.parent:
@@ -120,7 +125,7 @@ def main():
else:
print("Creating JIRA issue with title: %s" % args.title)
- jira_id = create_jira_issue(args.title, args.parent, args.type)
+ jira_id = create_jira_issue(args.title, args.parent, args.type,
args.version)
print("Created JIRA issue: %s" % jira_id)
create_and_checkout_branch(jira_id)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]