Commit Graph

14 Commits

Author SHA1 Message Date
Abu Kashem
d2388d199c client-go: add metric to count retries
Kubernetes-commit: b6c369f5c90bbef8058b3d44949f4e815dd6607f
2022-02-28 12:22:09 -05:00
Abu Kashem
79c4b4060a client-go: add test to document retry conditions
Kubernetes-commit: 68c542d52246b0b750e332616884350164018695
2022-05-27 09:13:30 -04:00
Jordan Liggitt
e2f402cda3 Limit request retrying to []byte request bodies
Kubernetes-commit: 69fad419a7666ac416307de4c3ee88c7e61b94db
2022-11-15 17:47:35 -05:00
inosato
27de641f75 Remove ioutil from client-go
Signed-off-by: inosato <si17_21@yahoo.co.jp>

Kubernetes-commit: 88dfa51b6003c90e8f0a0508939a1d79950a40df
2022-07-30 20:54:41 +09:00
ldsdsy
123d4e7e38 Fix a typo
Kubernetes-commit: bfe61fa574321474c4b278afb39af95464efad43
2022-06-20 21:52:50 +08:00
Abu Kashem
71b8c174e4 client-go: fix backoff delay
Kubernetes-commit: 60e74a9ff73b206e5dd439b5df51ac9826635579
2022-05-17 17:19:26 -04:00
Abu Kashem
d8531f5ff0 client-go: make retry in Request thread safe
Kubernetes-commit: 6618b8ef7c0b552839555d4578b64427d20524ef
2022-03-29 13:09:26 -04:00
Abu Kashem
01ab7fb211 client-go: reset request body after response is read and closed
This commit refactors the retry logic to include resetting the
request body. The reset logic will be called iff it is not the
first attempt. This refactor is nescessary mainly because now
as per the retry logic, we always ensure that the request body
is reset *after* the response body is *fully* read and closed
in order to reuse the same TCP connection.

Previously, the reset of the request body and the call to read
and close the response body were not in the right order, which
leads to race conditions.

This commit also adds a test that verifies the order in which
the function calls are made to ensure that we seek only after
the response body is closed.

Co-authored-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: 68c8c458ee8f6629eef806c48c1a776dedad3ec4
2022-03-28 20:40:49 -04:00
Abu Kashem
7c9347d386 client-go: wrap error from previous attempt to provide more context
Kubernetes-commit: 868b5a31d382b325f49e1b831e6b094282d50cc7
2022-03-14 18:57:56 -04:00
Abu Kashem
34f3aff43e client-go: refactor retry logic for backoff, rate limiter and metric
Kubernetes-commit: cecc563d3b9a9438cd3e6ae1576baa0a36f2d843
2022-02-17 16:57:45 -05:00
Abu Kashem
bbd71da939 Revert "Merge pull request #102581 from liggitt/revert-watch-retry"
This reverts commit 5a59a43957c6743995dac67fdda42bf8e0a9ca77, reversing
changes made to 81b9789eaa7bc067f417b5e74d5695dd6dd88a46.

Kubernetes-commit: 892d4fabb845e2461e3655aa414beb6ac322fc99
2021-06-04 13:45:26 -04:00
Jordan Liggitt
5ba99a7f80 Revert "client-go: add retry logic for Watch and Stream"
This reverts commit 607d3819498e64d969407c3d7cbbb8f53d98f0d4.

Kubernetes-commit: e35af41a1236943b6510a25cfb8cb47855aaa16e
2021-06-04 01:11:25 -04:00
Abu Kashem
55854fadb1 client-go: add retry logic for Watch and Stream
Kubernetes-commit: 607d3819498e64d969407c3d7cbbb8f53d98f0d4
2021-05-18 15:15:28 -04:00
Abu Kashem
239ec44d74 client-go: refactor retry logic so it can be reused
Kubernetes-commit: 5fdf196b4e9bbba036a43f4c3b5d9ed8af1672cc
2021-05-20 16:54:19 -04:00