Merge branch '17286-print-urls' refs #17286
authorPeter Amstutz <peter.amstutz@curii.com>
Mon, 25 Jan 2021 19:56:15 +0000 (14:56 -0500)
committerPeter Amstutz <peter.amstutz@curii.com>
Mon, 25 Jan 2021 19:56:15 +0000 (14:56 -0500)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

sdk/cwl/arvados_cwl/arvcontainer.py
sdk/cwl/arvados_cwl/executor.py

index 7b81bfb447a54b15674095508f7a95b4ec21c1e1..72ef14f6731baf83de87df28534a5c76b5a7dc42 100644 (file)
@@ -547,6 +547,17 @@ class RunnerContainer(Runner):
 
         logger.info("%s submitted container_request %s", self.arvrunner.label(self), response["uuid"])
 
+        workbench1 = self.arvrunner.api.config()["Services"]["Workbench1"]["ExternalURL"]
+        workbench2 = self.arvrunner.api.config()["Services"]["Workbench2"]["ExternalURL"]
+        url = ""
+        if workbench2:
+            url = "{}processes/{}".format(workbench2, response["uuid"])
+        elif workbench1:
+            url = "{}container_requests/{}".format(workbench1, response["uuid"])
+        if url:
+            logger.info("Monitor workflow progress at %s", url)
+
+
     def done(self, record):
         try:
             container = self.arvrunner.api.containers().get(
index 947b630bab9d861deebf3772bb1ef53376fb2be4..f60c480873b833dca11b0dba1a6cc853f4c29e2c 100644 (file)
@@ -524,7 +524,10 @@ The 'jobs' API is no longer supported.
     def arv_executor(self, updated_tool, job_order, runtimeContext, logger=None):
         self.debug = runtimeContext.debug
 
-        logger.info("Using cluster %s (%s)", self.api.config()["ClusterID"], self.api.config()["Services"]["Controller"]["ExternalURL"])
+        workbench1 = self.api.config()["Services"]["Workbench1"]["ExternalURL"]
+        workbench2 = self.api.config()["Services"]["Workbench2"]["ExternalURL"]
+        controller = self.api.config()["Services"]["Controller"]["ExternalURL"]
+        logger.info("Using cluster %s (%s)", self.api.config()["ClusterID"], workbench2 or workbench1 or controller)
 
         updated_tool.visit(self.check_features)
 
@@ -760,6 +763,8 @@ The 'jobs' API is no longer supported.
 
         if runtimeContext.submit and isinstance(tool, Runner):
             logger.info("Final output collection %s", tool.final_output)
+            if workbench2 or workbench1:
+                logger.info("Output at %scollections/%s", workbench2 or workbench1, tool.final_output)
         else:
             if self.output_name is None:
                 self.output_name = "Output of %s" % (shortname(tool.tool["id"]))