I am confused about the num_retries differences between the old googleapiclient and the new google-cloud-python.
I am able to specify num_retries for all API requests with the old googleapiclient by either
- specifying
num_retries for all requests
- or supplying own
requestBuilder for the googleapiclient.discovery.build which subclasses the original googleapiclient.http.HttpRequest and sets num_retries for all API requests.
The new google-cloud-python allows num_retries just for the storage blob upload. Is there other way to specify num_retries for other API calls? I think that all API calls (including Datastore, etc.) may fail by HTTP 500 or 429 and then they need to retry the requests, e.g. see https://cloud.google.com/storage/docs/exponential-backoff
Also, the googleapiclient.http._should_retry_response() seems different than google.cloud.streaming.http_wrapper.make_api_request(). E.g. the old one examines the response JSON payload, too.
I am confused about the
num_retriesdifferences between the oldgoogleapiclientand the newgoogle-cloud-python.I am able to specify
num_retriesfor all API requests with the oldgoogleapiclientby eithernum_retriesfor all requestsrequestBuilderfor thegoogleapiclient.discovery.buildwhich subclasses the originalgoogleapiclient.http.HttpRequestand setsnum_retriesfor all API requests.The new
google-cloud-pythonallowsnum_retriesjust for the storage blob upload. Is there other way to specifynum_retriesfor other API calls? I think that all API calls (including Datastore, etc.) may fail by HTTP 500 or 429 and then they need to retry the requests, e.g. see https://cloud.google.com/storage/docs/exponential-backoffAlso, the
googleapiclient.http._should_retry_response()seems different thangoogle.cloud.streaming.http_wrapper.make_api_request(). E.g. the old one examines the response JSON payload, too.