-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Hi, I noticed a lot of 429 errors coming through without any retry attempts in the v2025.8.5 release. Dumping the client attributes showed that all retry options were unset:
maxRetries: 0,
retryBaseDelay: 0,
retryExponentialRate: 0.000000,
retryHttpStatus: []int(nil),
I traced it to an issue with the WithRequestModifier function in go-graphql-client that misses setting all retry fields in the returned client: hasura/go-graphql-client#186
I worked around it by adding go-retryablehttp as a custom Transport, but perhaps WithRequestModifier should be replaced with a custom RoundTripper in the mean time?
retryClient := retryablehttp.NewClient()
retryClient.RetryMax = 3
retryClient.RetryWaitMin = time.Second * 1
retryClient.RetryWaitMax = time.Second * 10
retryClient.Logger = nil // Disable retryable http client default logging
opslevelClient := opslevel.NewGQLClient(
opslevel.SetAPIToken(opsleveAPIToken),
opslevel.SetTransport(retryClient.StandardClient().Transport),
)
return opslevelClient Metadata
Metadata
Assignees
Labels
No labels