Commit graph

6 commits

Author SHA1 Message Date
Pat Gavlin 78aaa29cee
Fix httputil.DoWithRetry. (#1555)
If we've hit the maximum number of retry attempts, return `true` for
`done`. As it stands, it is possible for us to return a `nil` error
(e.g. if the request sends successfully but returns a `50x` status) and
`false` for `done`, which `retry.Until` will interpret as "keep
retrying".
2018-06-21 11:06:54 -07:00
Matthew Riley e7498f9468 Send request body on retries
Not sending request body on retry is bad enough, but we keep the original
`Content-Length` and the server ends up expecting a body we never send.
This results in `400 Bad Request` errors from the ALB.
2018-06-03 01:33:50 -07:00
Matthew Riley 261fa86586
Merge pull request #1358 from pulumi/retry-bugs
Fix two bugs in retries
2018-06-01 17:11:23 -07:00
joeduffy 5967259795 Add license headers 2018-05-22 15:02:47 -07:00
Matthew Riley 77d9cd809a Avoid leaking connections when retry fails 2018-05-17 13:51:00 -07:00
Matt Ellis 50843a98c1 Retry some HTTP operations
We've seen failures in CI where DNS lookups fail which cause our
operations against the service to fail, as well as other sorts of
timeouts.

Add a set of helper methods in a new httputil package that helps us do
retries on these operations, and then update our client library to use
them when we are doing GET requests. We also provide a way for non GET
requests to be retried, and use this when updating a lease (since it
is safe to retry multiple requests in this case).
2018-04-11 14:58:25 -07:00