This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 2189f9bf289 [MINOR][INFRA] Skip if JIRA ID is an empty string
2189f9bf289 is described below
commit 2189f9bf2894dfb9a6ae1e74b0863486aaf49621
Author: Hyukjin Kwon <[email protected]>
AuthorDate: Tue Oct 17 20:10:10 2023 -0700
[MINOR][INFRA] Skip if JIRA ID is an empty string
### What changes were proposed in this pull request?
This PR skips when an empty string is provided as a JIRA ID.
### Why are the changes needed?
When you merge a minor PR that does not have a JIRA ID, and you say `y` to
update associated JIRA, you face an error as below:
```
...
Would you like to update an associated JIRA? (y/n): y
Enter a JIRA id []:
ASF JIRA could not find
JiraError HTTP 405 url: https://issues.apache.org/jira/rest/api/2/issue/
response headers = {'Date': 'Wed, 18 Oct 2023 02:44:24 GMT',
'Server': 'Apache', 'X-AREQUESTID': '164x103019855x17', 'X-ASESSIONID':
'1bxvboa', 'Referrer-Policy': 'strict-origin-when-cross-origin',
'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff',
'X-Frame-Options': 'SAMEORIGIN', 'Content-Security-Policy': "frame-ancestors
'self'", 'Strict-Transport-Security': 'max-age=31536000',
'X-Seraph-LoginReason': 'OK', 'X-AUSERNAME': 'gurwls223', 'Allow': 'POST,O [...]
response text =
...
```
After this PR, it doesn't fail but shows a warning `JIRA ID not found,
skipping`.
### Does this PR introduce _any_ user-facing change?
No, dev-only.
### How was this patch tested?
I am going to test this change against this PR.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #43417 from HyukjinKwon/minor-merge-script.
Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
dev/merge_spark_pr.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dev/merge_spark_pr.py b/dev/merge_spark_pr.py
index 4021999f19b..41ea921bb86 100755
--- a/dev/merge_spark_pr.py
+++ b/dev/merge_spark_pr.py
@@ -246,6 +246,9 @@ def resolve_jira_issue(merge_branches, comment,
default_jira_id=""):
jira_id = input("Enter a JIRA id [%s]: " % default_jira_id)
if jira_id == "":
jira_id = default_jira_id
+ if jira_id == "":
+ print("JIRA ID not found, skipping.")
+ return
try:
issue = asf_jira.issue(jira_id)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]