-
Notifications
You must be signed in to change notification settings - Fork 492
GCLOUD: add retry support to additional API calls #2478
Description
Is your feature request related to a problem? Please describe.
GCLOUD provider currently only supports retries due to API rate limiting for corrections. When working with configs with thousands of domains, there are additional API calls that can encounter rate limits but are otherwise eligible for retry.
Describe the solution you'd like
The existing retry logic can be extended to support additional API calls
Describe alternatives you've considered
We've previously used a different retry logic in an internal fork of dnscontrol 2.10, but found that implementing retries is effective for a few other API calls
Additional context
I noticed that the existing retry function is looking for fields in *gdns.Change that should only be present in googleapi.ServerResponse and so I tried to update the function accordingly.
dnscontrol/providers/gcloud/gcloudProvider.go
Lines 424 to 428 in 31bf652
| if resp != nil { | |
| log.Printf("NOTE: If you see this message, please file a bug with the output below:\n") | |
| log.Printf("RUNCHANGE CODE = %+v\n", resp.HTTPStatusCode) | |
| log.Printf("RUNCHANGE HEAD = %+v\n", resp.Header) | |
| } |
will submit PR to address this issue with additional changes