Project

General

Profile

Actions

Bug #11226

closed

[SDK] Python client tries to cache discovery document at the same local path regardless of user

Added by Peter Amstutz about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
0.5

Description

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'

https://github.com/google/google-api-python-client/blob/dc6c1efea8e6c89afa94df984d9291359cb04797/googleapiclient/discovery_cache/file_cache.py#L87

Proposed fix

See note-6.


Subtasks 1 (0 open1 closed)

Task #11233: ReviewResolvedTom Clegg03/10/2017Actions

Related issues

Related to Arvados - Bug #10669: googleapiclient.errors.InvalidJsonError retrieving discovery documentResolvedTom Clegg12/06/2016Actions
Actions

Also available in: Atom PDF