-
Notifications
You must be signed in to change notification settings - Fork 28
Description
When using Goblet for handling high workload in a limited time slot, multiple alerts were raised reporting the Cloud Run Admin Read requests quota is exceeded, although we issue no requests to the Admin API.
The service uses cloud tasks for async execution of tasks. By analyzing Goblet code, we found that each time a cloud task body is being created, the http_endpoint -which is a backend property function- is called. The http_endpoint calls the Cloud Run Admin API for the url.
calling http_endpoint calls the Cloud Run Admin API for the url. the proposed solution includes maintaining the endpoint url as a static property in the backend class instead of executing a call each time the property is called.
Calling the http_endpoint property inside Cloud Tasks
https://github.com/goblet/goblet/blob/main/goblet/infrastructures/cloudtask.py#L30
the http_endpoint property in Cloud Run backend
https://github.com/goblet/goblet/blob/main/goblet/backends/cloudrun.py#L335