Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

storage_api: Avoid OverQuotaError from get_service_account_name#53

Open
evanj wants to merge 2 commits into
GoogleCloudPlatform:masterfrom
evanj:master
Open

storage_api: Avoid OverQuotaError from get_service_account_name#53
evanj wants to merge 2 commits into
GoogleCloudPlatform:masterfrom
evanj:master

Conversation

@evanj

@evanj evanj commented Oct 26, 2016

Copy link
Copy Markdown
Contributor

Commit 10e7feb assigned app_identity.get_service_account_name to a local
variable, outside of the if statement. This means it gets called every time
this function is called, which makes an RPC on App Engine. During periods
of high activity, this can exceed the per-minute API quota and raise
OverQuotaError.

To fix this, only call this if local_run() is True, which should only
happen in development and never in App Engine production.

Commit 10e7feb assigned app_identity.get_service_account_name to a local
variable, outside of the if statement. This means it gets called every time
this function is called, which makes an RPC on App Engine. During periods
of high activity, this can exceed the per-minute API quota and raise
OverQuotaError.

To fix this, only call this if local_run() is True, which should only
happen in development and never in App Engine production.
@evanj

evanj commented Mar 20, 2018

Copy link
Copy Markdown
Contributor Author

I just found a bug in this change, a year and a half later! This tweak makes this work with both unit tests and dev_appserver.py

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant