GoogleCloudPlatform / GoogleCloudPlatform/professional-services
gce-to-adminsdk generates a lot of errors despite working
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 1.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 44
Description
Is it normal for gce-to-adminsdk to log a bunch of errors while running in CloudFunctions? It works (makes authenticated API calls to admin sdk APIs), but every time it runs produces a good 20 entries of errors to Stackdriver logging.
```
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 ImportError: file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 'file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth') activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 File "/env/local/lib/python3.7/site-packages/googleapiclient/discovery_cache/file_cache.py", line 41, in activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 from . import file_cache activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 File "/env/local/lib/python3.7/site-packages/googleapiclient/discovery_cache/__init__.py", line 41, in autodetect activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 Traceback (most recent call last): activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 {"insertId":"000021-84c0778b-e6aa-4ddb-9877-3124648fb453","resource":{"type":"cloud_function","labels":{"function_name":"activities_list_to_json","project_id":"pg-gx-n-app-934447","region":"us-central1"}},"timestamp":"2019-08-23T13:50:20.535Z","severity":"ERROR","labels":{"execution_id":"71596292954… activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 During handling of the above exception, another exception occurred: activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 {"insertId":"000019-84c0778b-e6aa-4ddb-9877-3124648fb453","resource":{"type":"cloud_function","labels":{"project_id":"pg-gx-n-app-934447","region":"us-central1","function_name":"activities_list_to_json"}},"timestamp":"2019-08-23T13:50:20.535Z","severity":"ERROR","labels":{"execution_id":"71596292954… activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 ModuleNotFoundError: No module named 'oauth2client' activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 from oauth2client.locked_file import LockedFile activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 File "/env/local/lib/python3.7/site-packages/googleapiclient/discovery_cache/file_cache.py", line 37, in activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 Traceback (most recent call last): activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 {"insertId":"000014-84c0778b-e6aa-4ddb-9877-3124648fb453","resource":{"type":"cloud_function","labels":{"project_id":"pg-gx-n-app-934447","region":"us-central1","function_name":"activities_list_to_json"}},"timestamp":"2019-08-23T13:50:20.535Z","severity":"ERROR","labels":{"execution_id":"71596292954… activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 During handling of the above exception, another exception occurred: activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 {"insertId":"000012-84c0778b-e6aa-4ddb-9877-3124648fb453","resource":{"type":"cloud_function","labels":{"project_id":"pg-gx-n-app-934447","region":"us-central1","function_name":"activities_list_to_json"}},"timestamp":"2019-08-23T13:50:20.535Z","severity":"ERROR","labels":{"execution_id":"71596292954… activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 ModuleNotFoundError: No module named 'oauth2client' activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 from oauth2client.contrib.locked_file import LockedFile activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 File "/env/local/lib/python3.7/site-packages/googleapiclient/discovery_cache/file_cache.py", line 33, in activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 Traceback (most recent call last): activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 {"insertId":"000007-84c0778b-e6aa-4ddb-9877-3124648fb453","resource":{"type":"cloud_function","labels":{"project_id":"pg-gx-n-app-934447","region":"us-central1","function_name":"activities_list_to_json"}},"timestamp":"2019-08-23T13:50:20.535Z","severity":"ERROR","labels":{"execution_id":"71596292954… activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 During handling of the above exception, another exception occurred: activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 {"insertId":"000005-84c0778b-e6aa-4ddb-9877-3124648fb453","resource":{"type":"cloud_function","labels":{"project_id":"pg-gx-n-app-934447","region":"us-central1","function_name":"activities_list_to_json"}},"timestamp":"2019-08-23T13:50:20.535Z","severity":"ERROR","labels":{"execution_id":"71596292954… activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 ModuleNotFoundError: No module named 'google.appengine' activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 from google.appengine.api import memcache activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 File "/env/local/lib/python3.7/site-packages/googleapiclient/discovery_cache/__init__.py", line 36, in autodetect activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 Traceback (most recent call last): activities_list_to_json 715962929541044
E 2019-08-23T13:50:20.535Z activities_list_to_json 715962929541044 file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth activities_list_to_json 715962929541044
```
Thoughts?
Contributor guide
Research direction
Start at the gce-to-adminsdk entry point and reproduce the behavior in CloudFunctions while reviewing the Python dependency configuration. Trace the googleapiclient discovery_cache errors and verify that authenticated Admin SDK calls still work without emitting repeated Stackdriver errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- google-cloud, python
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100