13892: Add jobs API deprecation notice to arvados-cwl-runner
authorPeter Amstutz <pamstutz@veritasgenetics.com>
Thu, 26 Jul 2018 13:42:49 +0000 (09:42 -0400)
committerPeter Amstutz <pamstutz@veritasgenetics.com>
Thu, 26 Jul 2018 13:46:18 +0000 (09:46 -0400)
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 <pamstutz@veritasgenetics.com>

doc/install/install-api-server.html.textile.liquid
sdk/cwl/arvados_cwl/__init__.py

index 7201460ddeeefc03e22f63479afb485bb76dfd35..1e762706f6b4833a153560561c11c99d7e772a82 100644 (file)
@@ -158,6 +158,16 @@ Example @application.yml@:
 </code></pre>
 </notextile>
 
+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
+
+<notextile>
+<pre><code>
+  disable_api_methods: ["jobs.create", "pipeline_instances.create"]
+</code></pre>
+</notextile>
+
 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.
index 131795ee2c0173703a7385c8676d11536ff17398..7e4142b1086acdc95a7beb15d15243e5ec8a5c56 100644 (file)
@@ -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)