-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix AzDo Throttling Timeouts #1715
Fix AzDo Throttling Timeouts #1715
Conversation
…y-After header. Also added flag to increase timeouts for azdo client. Need both to deal with Azdo throttling
c218198
to
0f19899
Compare
bump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some docs on these flags would be great ! Thanks for contributing!
ADHonorRetryAfter = "azuredevops-honor-retry-after" | ||
ADTimeoutSeconds = "azuredevops-timeout-seconds" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to put the word "client" in here to be more specific.
retryAfterVal := resp.Header.Get("retry-after") | ||
if retryAfterVal != "" { | ||
retryAfterSec, err := strconv.Atoi(retryAfterVal) | ||
if err == nil { | ||
rt.RetryAfter = time.Duration(retryAfterSec) * time.Second | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add exponential backoff and jitter here? I know we do this in a lot of other spots but it's not great practice. Risk of thundering herd causing a chain reaction.
Also probably good to call out the risks of using this flag in the docs.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
bump, can we get this back open? @nishkrishnan |
@LanceSandino are you going to fix the conflicts? |
Ah... sorry after speaking to my colleague this is no longer needed. This can be closed again :) |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Getting errors like the one below due to AzureDevops throttling of api requests:
Took two strategies to help with this:
Both of the options I added default to the present state of things (10 seconds timeout, no retry-after honoring) and will only affect end-users if they explicitly enable those features.