You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gobblin.apache.org by ab...@apache.org on 2018/03/21 08:30:49 UTC

[31/50] incubator-gobblin git commit: [Gobblin-371][GOBBLIN-371] eagerly test for jira-python package

[Gobblin-371][GOBBLIN-371] eagerly test for jira-python package

Merge remote-tracking branch 'apache/master'

Eagerly load jira-python library so that things
don't break because of a missing dependency while
running

Merge branch 'master' into GOBBLIN-
371__eagerly_test_for_jira_package

Closes #2246 from kadaan/GOBBLIN-
371__eagerly_test_for_jira_package


Project: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/commit/4997fa9b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/tree/4997fa9b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/diff/4997fa9b

Branch: refs/heads/0.12.0
Commit: 4997fa9bb286dbe451456e48cf6d07f0f0aa48f8
Parents: c43cf26
Author: Joel Baranick <jb...@apache.org>
Authored: Wed Feb 14 00:06:25 2018 -0800
Committer: Joel Baranick <jo...@ensighten.com>
Committed: Wed Feb 14 00:06:25 2018 -0800

----------------------------------------------------------------------
 dev/gobblin-jira-version | 12 ++++++------
 dev/gobblin-pr           | 12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/4997fa9b/dev/gobblin-jira-version
----------------------------------------------------------------------
diff --git a/dev/gobblin-jira-version b/dev/gobblin-jira-version
index 5796c54..c8bb65d 100755
--- a/dev/gobblin-jira-version
+++ b/dev/gobblin-jira-version
@@ -49,6 +49,12 @@ try:
 except ImportError:
     print("Could not find the keyring library. Run 'sudo pip install keyring' to install.")
     sys.exit(-1)
+
+try:
+    import jira.client
+except ImportError:
+    print("Could not find jira-python library; exiting. Run 'sudo pip install jira' to install.")
+    sys.exit(-1)
     
 JIRA_BASE = "https://issues.apache.org/jira/browse"
 JIRA_API_BASE = "https://issues.apache.org/jira"
@@ -87,12 +93,6 @@ def update_jira_issue(fix_version):
 
     fix_version: the version to assign to the Gobblin JIRAs.
     """
-    try:
-        import jira.client
-    except ImportError:
-        print("Could not find jira-python library; exiting. Run "
-            "'sudo pip install jira' to install.")
-        sys.exit(-1)
 
     # ASF JIRA username
     JIRA_USERNAME = os.environ.get("JIRA_USERNAME", '')

http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/4997fa9b/dev/gobblin-pr
----------------------------------------------------------------------
diff --git a/dev/gobblin-pr b/dev/gobblin-pr
index a7b3209..8b34ad9 100755
--- a/dev/gobblin-pr
+++ b/dev/gobblin-pr
@@ -61,6 +61,12 @@ except ImportError:
     print("Could not find the keyring library. Run 'sudo pip3 install keyring' to install.")
     sys.exit(-1)
 
+try:
+    import jira.client
+except ImportError:
+    print("Could not find jira-python library; exiting. Run 'sudo pip3 install jira' to install.")
+    sys.exit(-1)
+
 # Location of your Gobblin git development area
 GOBBLIN_GIT_LOCATION = os.environ.get(
     "GOBBLIN_GIT",
@@ -531,12 +537,6 @@ def resolve_jira_issue(comment=None, jira_id=None, merge_branches=None):
     jira_id: an Gobblin JIRA id, either an integer or a string with the form
         GOBBLIN-X. If not provided, the user will be prompted to provide one.
     """
-    try:
-        import jira.client
-    except ImportError:
-        raise PRToolError(
-            "Could not find jira-python library; exiting. Run "
-            "'sudo pip3 install jira' to install.")
 
     if merge_branches is None:
         merge_branches = []