Skip to content

Commit cc4e0be

Browse files
authored
[release-1.13] Updating RetryableHttp lib to latest (#8028)
Updating RetryableHttp lib to latest Signed-off-by: Matthias Wessendorf <[email protected]>
1 parent 1c51d9a commit cc4e0be

File tree

107 files changed

+10145
-4540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+10145
-4540
lines changed

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ require (
1616
github.com/google/mako v0.0.0-20190821191249-122f8dcef9e3
1717
github.com/google/uuid v1.5.0
1818
github.com/gorilla/websocket v1.5.1
19-
github.com/hashicorp/go-cleanhttp v0.5.1
20-
github.com/hashicorp/go-retryablehttp v0.6.7
19+
github.com/hashicorp/go-cleanhttp v0.5.2
20+
github.com/hashicorp/go-retryablehttp v0.7.7
2121
github.com/hashicorp/golang-lru v1.0.2
2222
github.com/kelseyhightower/envconfig v1.4.0
2323
github.com/mitchellh/go-homedir v1.1.0
@@ -119,7 +119,7 @@ require (
119119
golang.org/x/crypto v0.18.0 // indirect
120120
golang.org/x/mod v0.14.0 // indirect
121121
golang.org/x/oauth2 v0.16.0 // indirect
122-
golang.org/x/sys v0.16.0 // indirect
122+
golang.org/x/sys v0.20.0 // indirect
123123
golang.org/x/term v0.16.0 // indirect
124124
golang.org/x/text v0.14.0 // indirect
125125
golang.org/x/time v0.5.0 // indirect

go.sum

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH
124124
github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
125125
github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro=
126126
github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
127+
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
128+
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
127129
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
128130
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
129131
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
@@ -263,12 +265,12 @@ github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZH
263265
github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw=
264266
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk=
265267
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w=
266-
github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=
267-
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
268-
github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI=
269-
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
270-
github.com/hashicorp/go-retryablehttp v0.6.7 h1:8/CAEZt/+F7kR7GevNHulKkUjLht3CPmn7egmhieNKo=
271-
github.com/hashicorp/go-retryablehttp v0.6.7/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
268+
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
269+
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
270+
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
271+
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
272+
github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
273+
github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
272274
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
273275
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
274276
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
@@ -317,6 +319,10 @@ github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0Q
317319
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
318320
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
319321
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
322+
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
323+
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
324+
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
325+
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
320326
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
321327
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
322328
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
@@ -646,8 +652,8 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBc
646652
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
647653
golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
648654
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
649-
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
650-
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
655+
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
656+
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
651657
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
652658
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
653659
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=

third_party/VENDOR-LICENSE/github.com/hashicorp/go-cleanhttp/cleanhttp.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func DefaultPooledTransport() *http.Transport {
3232
IdleConnTimeout: 90 * time.Second,
3333
TLSHandshakeTimeout: 10 * time.Second,
3434
ExpectContinueTimeout: 1 * time.Second,
35+
ForceAttemptHTTP2: true,
3536
MaxIdleConnsPerHost: runtime.GOMAXPROCS(0) + 1,
3637
}
3738
return transport
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.22.2
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## 0.7.7 (May 30, 2024)
2+
3+
BUG FIXES:
4+
5+
- client: avoid potentially leaking URL-embedded basic authentication credentials in logs (#158)
6+
7+
## 0.7.6 (May 9, 2024)
8+
9+
ENHANCEMENTS:
10+
11+
- client: support a `RetryPrepare` function for modifying the request before retrying (#216)
12+
- client: support HTTP-date values for `Retry-After` header value (#138)
13+
- client: avoid reading entire body when the body is a `*bytes.Reader` (#197)
14+
15+
BUG FIXES:
16+
17+
- client: fix a broken check for invalid server certificate in go 1.20+ (#210)
18+
19+
## 0.7.5 (Nov 8, 2023)
20+
21+
BUG FIXES:
22+
23+
- client: fixes an issue where the request body is not preserved on temporary redirects or re-established HTTP/2 connections (#207)
24+
25+
## 0.7.4 (Jun 6, 2023)
26+
27+
BUG FIXES:
28+
29+
- client: fixing an issue where the Content-Type header wouldn't be sent with an empty payload when using HTTP/2 (#194)
30+
31+
## 0.7.3 (May 15, 2023)
32+
33+
Initial release
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @hashicorp/go-retryablehttp-maintainers

third_party/VENDOR-LICENSE/github.com/hashicorp/go-retryablehttp/LICENSE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Copyright (c) 2015 HashiCorp, Inc.
2+
13
Mozilla Public License, version 2.0
24

35
1. Definitions

third_party/VENDOR-LICENSE/github.com/hashicorp/go-retryablehttp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ default: test
22

33
test:
44
go vet ./...
5-
go test -race ./...
5+
go test -v -race ./...
66

77
updatedeps:
88
go get -f -t -u ./...

third_party/VENDOR-LICENSE/github.com/hashicorp/go-retryablehttp/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ fails so that the full request can be attempted again. See the
2626
details.
2727

2828
Version 0.6.0 and before are compatible with Go prior to 1.12. From 0.6.1 onward, Go 1.12+ is required.
29+
From 0.6.7 onward, Go 1.13+ is required.
2930

3031
Example Use
3132
===========
@@ -58,4 +59,4 @@ standardClient := retryClient.StandardClient() // *http.Client
5859
```
5960

6061
For more usage and examples see the
61-
[godoc](http://godoc.org/github.com/hashicorp/go-retryablehttp).
62+
[pkg.go.dev](https://pkg.go.dev/github.com/hashicorp/go-retryablehttp).
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright (c) HashiCorp, Inc.
2+
// SPDX-License-Identifier: MPL-2.0
3+
4+
//go:build !go1.20
5+
// +build !go1.20
6+
7+
package retryablehttp
8+
9+
import "crypto/x509"
10+
11+
func isCertError(err error) bool {
12+
_, ok := err.(x509.UnknownAuthorityError)
13+
return ok
14+
}

0 commit comments

Comments
 (0)