Skip to content

Commit 8a28c57

Browse files
committed
Merge branch 'main' into danny/redacted-url-in-logs
2 parents b2aee50 + 86e852d commit 8a28c57

20 files changed

+785
-123
lines changed

.circleci/config.yml

-55
This file was deleted.

.github/dependabot.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
9+
- package-ecosystem: "gomod"
10+
directory: "/"
11+
schedule:
12+
interval: "weekly"

.github/workflows/actionlint.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: actionlint
2+
3+
on:
4+
push:
5+
paths:
6+
- .github/**
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
actionlint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
16+
- name: "Check GitHub workflow files"
17+
uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint:latest
18+
with:
19+
args: -color

.github/workflows/pr-gofmt.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Go format check
2+
on:
3+
pull_request:
4+
types: ['opened', 'synchronize']
5+
6+
jobs:
7+
run-tests:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
11+
12+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
13+
with:
14+
go-version-file: ./.go-version
15+
16+
- name: Run go format
17+
run: |-
18+
files=$(gofmt -s -l .)
19+
if [ -n "$files" ]; then
20+
echo >&2 "The following file(s) are not gofmt compliant:"
21+
echo >&2 "$files"
22+
exit 1
23+
fi
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Unit tests (Go 1.19)
2+
on:
3+
pull_request:
4+
types: ['opened', 'synchronize']
5+
6+
jobs:
7+
run-tests:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
11+
12+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
13+
with:
14+
go-version: 1.19
15+
16+
- name: Run unit tests
17+
run: make test
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Unit tests (Go 1.20+)
2+
on:
3+
pull_request:
4+
types: ['opened', 'synchronize']
5+
6+
jobs:
7+
run-tests:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
11+
12+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
13+
with:
14+
go-version: 1.22
15+
16+
- name: Run unit tests
17+
run: make test

.go-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.22.2

CHANGELOG.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## 0.7.6 (May 9, 2024)
2+
3+
ENHANCEMENTS:
4+
5+
- client: support a `RetryPrepare` function for modifying the request before retrying (#216)
6+
- client: support HTTP-date values for `Retry-After` header value (#138)
7+
- client: avoid reading entire body when the body is a `*bytes.Reader` (#197)
8+
9+
BUG FIXES:
10+
11+
- client: fix a broken check for invalid server certificate in go 1.20+ (#210)
12+
13+
## 0.7.5 (Nov 8, 2023)
14+
15+
BUG FIXES:
16+
17+
- client: fixes an issue where the request body is not preserved on temporary redirects or re-established HTTP/2 connections (#207)
18+
19+
## 0.7.4 (Jun 6, 2023)
20+
21+
BUG FIXES:
22+
23+
- client: fixing an issue where the Content-Type header wouldn't be sent with an empty payload when using HTTP/2 (#194)
24+
25+
## 0.7.3 (May 15, 2023)
26+
27+
Initial release

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @hashicorp/go-retryablehttp-maintainers

LICENSE

+2
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

Makefile

+1-1
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 ./...

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ standardClient := retryClient.StandardClient() // *http.Client
5959
```
6060

6161
For more usage and examples see the
62-
[godoc](http://godoc.org/github.com/hashicorp/go-retryablehttp).
62+
[pkg.go.dev](https://pkg.go.dev/github.com/hashicorp/go-retryablehttp).

cert_error_go119.go

+14
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+
}

cert_error_go120.go

+14
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/tls"
10+
11+
func isCertError(err error) bool {
12+
_, ok := err.(*tls.CertificateVerificationError)
13+
return ok
14+
}

0 commit comments

Comments
 (0)