summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
200cc5e)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>
default=None)
parser.add_argument("--always-submit-runner", action="store_true",
default=None)
parser.add_argument("--always-submit-runner", action="store_true",
- help="Always submit a runner to manage the workflow, even when running only a single CommandLineTool",
+ help="When invoked with --submit --wait, always submit a runner to manage the workflow, even when only running a single CommandLineTool",
default=False)
exgroup = parser.add_mutually_exclusive_group()
exgroup.add_argument("--submit-request-uuid", type=str,
default=False)
exgroup = parser.add_mutually_exclusive_group()
exgroup.add_argument("--submit-request-uuid", type=str,
- default=None,
- help="Update and commit to supplied container request instead of creating a new one (containers API only).")
+ default=None,
+ help="Update and commit to supplied container request instead of creating a new one (containers API only).",
+ metavar="UUID")
exgroup.add_argument("--submit-runner-cluster", type=str,
exgroup.add_argument("--submit-runner-cluster", type=str,
- help="Submit toplevel runner to a remote cluster (containers API only)",
- default=None)
+ help="Submit workflow runner to a remote cluster (containers API only)",
+ default=None,
+ metavar="CLUSTER_ID")
parser.add_argument("--name", type=str,
help="Name to use for workflow execution instance.",
parser.add_argument("--name", type=str,
help="Name to use for workflow execution instance.",
from schema_salad.sourceline import SourceLine
from cwltool.errors import WorkflowException
from schema_salad.sourceline import SourceLine
from cwltool.errors import WorkflowException
+def validate_cluster_target(arvrunner, runtimeContext):
+ if (runtimeContext.submit_runner_cluster and
+ runtimeContext.submit_runner_cluster not in arvrunner.api._rootDesc["remoteHosts"] and
+ runtimeContext.submit_runner_cluster != arvrunner.api._rootDesc["uuidPrefix"]):
+ raise WorkflowException("Unknown or invalid cluster id '%s' known remote clusters are %s" % (runtimeContext.submit_runner_cluster,
+ ", ".join(arvrunner.api._rootDesc["remoteHosts"].keys())))
def set_cluster_target(tool, arvrunner, builder, runtimeContext):
cluster_target_req = None
for field in ("hints", "requirements"):
def set_cluster_target(tool, arvrunner, builder, runtimeContext):
cluster_target_req = None
for field in ("hints", "requirements"):
runtimeContext = runtimeContext.copy()
runtimeContext.submit_runner_cluster = builder.do_eval(cluster_target_req.get("cluster_id")) or runtimeContext.submit_runner_cluster
runtimeContext.project_uuid = builder.do_eval(cluster_target_req.get("project_uuid")) or runtimeContext.project_uuid
runtimeContext = runtimeContext.copy()
runtimeContext.submit_runner_cluster = builder.do_eval(cluster_target_req.get("cluster_id")) or runtimeContext.submit_runner_cluster
runtimeContext.project_uuid = builder.do_eval(cluster_target_req.get("project_uuid")) or runtimeContext.project_uuid
- if (runtimeContext.submit_runner_cluster and
- runtimeContext.submit_runner_cluster not in arvrunner.api._rootDesc["remoteHosts"] and
- runtimeContext.submit_runner_cluster != arvrunner.api._rootDesc["uuidPrefix"]):
- raise WorkflowException("Unknown or invalid cluster id '%s' known remote clusters are %s" % (runtimeContext.submit_runner_cluster,
- ", ".join(arvrunner.api._rootDesc["remoteHosts"].keys())))
+ validate_cluster_target(arvrunner, runtimeContext)
+
return runtimeContext
class ArvadosCommandTool(CommandLineTool):
return runtimeContext
class ArvadosCommandTool(CommandLineTool):
from .arvcontainer import RunnerContainer
from .arvjob import RunnerJob, RunnerTemplate
from .runner import Runner, upload_docker, upload_job_order, upload_workflow_deps
from .arvcontainer import RunnerContainer
from .arvjob import RunnerJob, RunnerTemplate
from .runner import Runner, upload_docker, upload_job_order, upload_workflow_deps
-from .arvtool import ArvadosCommandTool
+from .arvtool import ArvadosCommandTool, validate_cluster_target
from .arvworkflow import ArvadosWorkflow, upload_workflow
from .fsaccess import CollectionFsAccess, CollectionFetcher, collectionResolver, CollectionCache
from .perf import Perf
from .arvworkflow import ArvadosWorkflow, upload_workflow
from .fsaccess import CollectionFsAccess, CollectionFetcher, collectionResolver, CollectionCache
from .perf import Perf
self.runtimeContext.make_fs_access = partial(CollectionFsAccess,
collection_cache=self.collection_cache)
self.runtimeContext.make_fs_access = partial(CollectionFsAccess,
collection_cache=self.collection_cache)
+ validate_cluster_target(self, self.runtimeContext)
+
def arv_make_tool(self, toolpath_object, loadingContext):
if "class" in toolpath_object and toolpath_object["class"] == "CommandLineTool":
def arv_make_tool(self, toolpath_object, loadingContext):
if "class" in toolpath_object and toolpath_object["class"] == "CommandLineTool":