Bug #11226

Updated by Tom Clegg almost 3 years ago

The Python SDK instructs httplib2 to cache the discovery document in @~/.cache/arvados/discovery@. However, the google API client code also has its own cache logic, which caches the discovery document in @/tmp/google-api-python-client-discovery-doc.cache@.

This is a problem particularly on a multi-user system such as a shell node. The file gets created in a global location like /tmp, then only the original user can update the file.

From looking at the google-api-python-client code, the destination is chosen as @os.path.join(tempfile.gettempdir(), FILENAME)@ where @FILENAME = 'google-api-python-client-discovery-doc.cache'@


h3. Proposed fix

See note-6. In the Python SDK, set tempfile.tempdir to @~/.cache/arvados/{conn-hash}@ before doing anything with google-api-client.