From: Peter Amstutz Date: Thu, 26 Jul 2018 13:42:49 +0000 (-0400) Subject: 13892: Add jobs API deprecation notice to arvados-cwl-runner X-Git-Tag: 1.2.0~50^2~2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/c7cbb121dec3c356bf7d72087d601c7593410b8c 13892: Add jobs API deprecation notice to arvados-cwl-runner Also document how to disable the jobs API so that a-c-r selects the containers API automatically. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- diff --git a/doc/install/install-api-server.html.textile.liquid b/doc/install/install-api-server.html.textile.liquid index 7201460dde..1e762706f6 100644 --- a/doc/install/install-api-server.html.textile.liquid +++ b/doc/install/install-api-server.html.textile.liquid @@ -158,6 +158,16 @@ Example @application.yml@: +h3(#disable_api_methods). disable_api_methods + +Set the @disable_api_methods@ configuration option to disable the deprecated @jobs@ API. This will prevent users from accidentally submitting jobs that won't run. "All new installations should use the containers API.":crunch2-slurm/install-prerequisites.html + + +

+  disable_api_methods: ["jobs.create", "pipeline_instances.create"]
+
+
+ h2(#set_up). Set up Nginx and Passenger The Nginx server will serve API requests using Passenger. It will also be used to proxy SSL requests to other services which are covered later in this guide. diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py index 131795ee2c..7e4142b108 100644 --- a/sdk/cwl/arvados_cwl/__init__.py +++ b/sdk/cwl/arvados_cwl/__init__.py @@ -135,6 +135,11 @@ class ArvCwlRunner(object): else: raise Exception("Unsupported API '%s', expected one of %s" % (work_api, expected_api)) + if self.work_api == "jobs": + logger.warn("""Using the deprecated 'jobs' API. +Suggest '--api=containers' or configure the cluster to disable the 'jobs' API as described at: +http://doc.arvados.org/install/install-api-server.html#disable_api_methods""") + self.loadingContext = ArvLoadingContext(vars(arvargs)) self.loadingContext.fetcher_constructor = self.fetcher_constructor self.loadingContext.resolver = partial(collectionResolver, self.api, num_retries=self.num_retries)