Skip to content

Commit bb3e6ed

Browse files
committed
[SPARK-25287][INFRA] Add up-front check for JIRA_USERNAME and JIRA_PASSWORD
## What changes were proposed in this pull request? Add an up-front check that `JIRA_USERNAME` and `JIRA_PASSWORD` have been set. If they haven't, ask user if they want to continue. This prevents the JIRA state update from failing at the very end of the process because user forgot to set these environment variables. ## How was this patch tested? I ran the script with environment vars set, and unset, to verify it works as specified. Please review http://spark.apache.org/contributing.html before opening a pull request. Closes apache#22294 from erikerlandson/spark-25287. Authored-by: Erik Erlandson <[email protected]> Signed-off-by: Erik Erlandson <[email protected]>
1 parent d6d1224 commit bb3e6ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dev/merge_spark_pr.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@ def main():
438438
os.chdir(SPARK_HOME)
439439
original_head = get_current_ref()
440440

441+
# Check this up front to avoid failing the JIRA update at the very end
442+
if not JIRA_USERNAME or not JIRA_PASSWORD:
443+
continue_maybe("The env-vars JIRA_USERNAME and/or JIRA_PASSWORD are not set. Continue?")
444+
441445
branches = get_json("%s/branches" % GITHUB_API_BASE)
442446
branch_names = filter(lambda x: x.startswith("branch-"), [x['name'] for x in branches])
443447
# Assumes branch names can be sorted lexicographically

0 commit comments

Comments
 (0)