Repository: spark Updated Branches: refs/heads/master d6d1224ff -> bb3e6ed92
[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 #22294 from erikerlandson/spark-25287. Authored-by: Erik Erlandson <eerla...@redhat.com> Signed-off-by: Erik Erlandson <eerla...@redhat.com> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/bb3e6ed9 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/bb3e6ed9 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/bb3e6ed9 Branch: refs/heads/master Commit: bb3e6ed9216f98f3a3b96c8c52f20042d65e2181 Parents: d6d1224 Author: Erik Erlandson <eerla...@redhat.com> Authored: Thu Aug 30 15:08:12 2018 -0700 Committer: Erik Erlandson <eerla...@redhat.com> Committed: Thu Aug 30 15:08:12 2018 -0700 ---------------------------------------------------------------------- dev/merge_spark_pr.py | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/bb3e6ed9/dev/merge_spark_pr.py ---------------------------------------------------------------------- diff --git a/dev/merge_spark_pr.py b/dev/merge_spark_pr.py index 28a6714..81daa90 100755 --- a/dev/merge_spark_pr.py +++ b/dev/merge_spark_pr.py @@ -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 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org