Skip to content

Commit

Permalink
[SPARK-25287][INFRA] Add up-front check for JIRA_USERNAME and JIRA_PA…
Browse files Browse the repository at this point in the history
…SSWORD

## 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 #22294 from erikerlandson/spark-25287.

Authored-by: Erik Erlandson <eerlands@redhat.com>
Signed-off-by: Erik Erlandson <eerlands@redhat.com>
  • Loading branch information
erikerlandson committed Aug 30, 2018
1 parent d6d1224 commit bb3e6ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dev/merge_spark_pr.py
Expand Up @@ -438,6 +438,10 @@ def main():
os.chdir(SPARK_HOME)
original_head = get_current_ref()

# Check this up front to avoid failing the JIRA update at the very end
if not JIRA_USERNAME or not JIRA_PASSWORD:
continue_maybe("The env-vars JIRA_USERNAME and/or JIRA_PASSWORD are not set. Continue?")

branches = get_json("%s/branches" % GITHUB_API_BASE)
branch_names = filter(lambda x: x.startswith("branch-"), [x['name'] for x in branches])
# Assumes branch names can be sorted lexicographically
Expand Down

0 comments on commit bb3e6ed

Please sign in to comment.