[ARVADOS] updated: 4b9208f2b118fa4f8baab6ad3ad3caa77f6cb143

git at public.curoverse.com git at public.curoverse.com
Tue Jan 6 16:23:36 EST 2015


Summary of changes:
 services/api/script/crunch-failure-report.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

       via  4b9208f2b118fa4f8baab6ad3ad3caa77f6cb143 (commit)
      from  a686dcbfc02914af289fceec63d68645b4ffb13f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 4b9208f2b118fa4f8baab6ad3ad3caa77f6cb143
Author: Tim Pierce <twp at clinicalfuture.com>
Date:   Tue Jan 6 21:21:10 2015 +0000

    4598: catch exceptions more aggressively when looking up pipeline names
    
    Added exception handling for cases where:
    * job is not recorded as belonging to any pipeline instance
    * pipeline instance has no pipeline template

diff --git a/services/api/script/crunch-failure-report.py b/services/api/script/crunch-failure-report.py
index 5183684..31ad0fe 100755
--- a/services/api/script/crunch-failure-report.py
+++ b/services/api/script/crunch-failure-report.py
@@ -90,18 +90,18 @@ def job_user_name(api, user_uuid):
 job_pipeline_names = {}
 def job_pipeline_name(api, job_uuid):
     def _lookup_pipeline_name(api, job_uuid):
-        pipelines = api.pipeline_instances().list(
-            filters='[["components", "like", "%{}%"]]'.format(job_uuid)).execute()
-        if pipelines['items']:
+        try:
+            pipelines = api.pipeline_instances().list(
+                filters='[["components", "like", "%{}%"]]'.format(job_uuid)).execute()
             pi = pipelines['items'][0]
             if pi['name']:
                 return pi['name']
             else:
                 # Use the pipeline template name
                 pt = api.pipeline_templates().get(uuid=pi['pipeline_template_uuid']).execute()
-                if pt:
-                    return pt['name']
-        return ""
+                return pt['name']
+        except (TypeError, ValueError, IndexError):
+            return ""
 
     if job_uuid not in job_pipeline_names:
         job_pipeline_names[job_uuid] = _lookup_pipeline_name(api, job_uuid)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list