11226: Disable google api client discovery doc caching, use only httplib2 caching.
authorPeter Amstutz <peter.amstutz@curoverse.com>
Thu, 9 Mar 2017 18:49:15 +0000 (13:49 -0500)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Thu, 9 Mar 2017 19:40:25 +0000 (14:40 -0500)
Google API client has its own caching mechanism.  The problem is, by default
this goes to /tmp/google-api-python-client-discovery-doc.cache This is a
problem on a multi-user system.  Arvados already provides for discovery doc
caching via httplib2.

sdk/python/arvados/api.py

index f24b1ed8142d3e3678ff819bfe4823ebe2add874..ccf16a5fcef3be02b6450bd4b527e6ff682c88d1 100644 (file)
@@ -205,7 +205,7 @@ def api(version=None, cache=True, host=None, token=None, insecure=False, **kwarg
 
     kwargs['http'] = _patch_http_request(kwargs['http'], token)
 
 
     kwargs['http'] = _patch_http_request(kwargs['http'], token)
 
-    svc = apiclient_discovery.build('arvados', version, **kwargs)
+    svc = apiclient_discovery.build('arvados', version, cache_discovery=False, **kwargs)
     svc.api_token = token
     svc.insecure = insecure
     kwargs['http'].max_request_size = svc._rootDesc.get('maxRequestSize', 0)
     svc.api_token = token
     svc.insecure = insecure
     kwargs['http'].max_request_size = svc._rootDesc.get('maxRequestSize', 0)