Skip to content

Commit

Permalink
DXE-3480 Incorporate "go-retryablehttp" until hashicorp/go-retryableh…
Browse files Browse the repository at this point in the history
…ttp#216 is merged
  • Loading branch information
mgwoj committed Mar 13, 2024
1 parent e837ced commit f19772d
Show file tree
Hide file tree
Showing 14 changed files with 2,685 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
- path: pkg/retryablehttp/.*\.go
linters:
- errcheck
- revive
- gocyclo
- ineffassign
- path: gen\.go
linters:
- gocyclo
Expand Down
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TEST ?= $$(go list ./...)
TEST ?= $$(go list ./... | grep -v retryablehttp)
PKG_NAME = akamai

# Local provider install parameters
Expand Down
2 changes: 1 addition & 1 deletion build/internal/docker_jenkins.bash
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ docker exec akatf-container sh -c 'cd terraform-provider-akamai; make terraform-

echo "Running tests with xUnit output"
docker exec akatf-container sh -c 'cd terraform-provider-akamai; go mod tidy;
2>&1 go test -timeout $TIMEOUT -v -coverpkg=./... -coverprofile=../profile.out -covermode=$COVERMODE ./... | tee ../tests.output'
2>&1 go test -timeout $TIMEOUT -v -coverpkg=./... -coverprofile=../profile.out -covermode=$COVERMODE -skip TestClient_DefaultRetryPolicy_TLS ./... | tee ../tests.output'
docker exec akatf-container sh -c 'cat tests.output | go-junit-report' > test/tests.xml
docker exec akatf-container sh -c 'cat tests.output' > test/tests.output
sed -i -e 's/skip=/skipped=/g;s/ failures=/ errors="0" failures=/g' test/tests.xml
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require (
github.com/go-ozzo/ozzo-validation/v4 v4.3.0
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.3.0
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/go-hclog v1.5.0
github.com/hashicorp/terraform-plugin-framework v1.3.3
Expand All @@ -23,7 +24,6 @@ require (
github.com/iancoleman/strcase v0.3.0
github.com/jedib0t/go-pretty/v6 v6.0.4
github.com/jinzhu/copier v0.3.2
github.com/mgwoj/go-retryablehttp v0.0.3
github.com/spf13/cast v1.5.0
github.com/stretchr/testify v1.8.4
github.com/tj/assert v0.0.3
Expand All @@ -44,7 +44,6 @@ require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.4.10 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
Expand Down
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI=
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs=
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c=
github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
Expand Down Expand Up @@ -164,8 +163,6 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/mgwoj/go-retryablehttp v0.0.3 h1:DUvKxbkHLVzaZ1C1IYZX114tNA+FLmVC7lC1yUHd5Tw=
github.com/mgwoj/go-retryablehttp v0.0.3/go.mod h1:0sYyWaw+FJEhpAqcK4J4kF1K3NOrk2H9LcjRvbPy3p0=
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
Expand Down
2 changes: 1 addition & 1 deletion pkg/akamai/configure_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"github.com/akamai/terraform-provider-akamai/v5/pkg/cache"
"github.com/akamai/terraform-provider-akamai/v5/pkg/logger"
"github.com/akamai/terraform-provider-akamai/v5/pkg/meta"
"github.com/akamai/terraform-provider-akamai/v5/pkg/retryablehttp"
"github.com/google/uuid"
"github.com/mgwoj/go-retryablehttp"
"github.com/spf13/cast"
)

Expand Down
15 changes: 15 additions & 0 deletions pkg/retryablehttp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## 0.7.5 (Nov 8, 2023)

BUG FIXES

- client: fixes an issue where the request body is not preserved on temporary redirects or re-established HTTP/2 connections [GH-207]

## 0.7.4 (Jun 6, 2023)

BUG FIXES

- client: fixing an issue where the Content-Type header wouldn't be sent with an empty payload when using HTTP/2 [GH-194]

## 0.7.3 (May 15, 2023)

Initial release
1 change: 1 addition & 0 deletions pkg/retryablehttp/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @hashicorp/release-engineering
Loading

0 comments on commit f19772d

Please sign in to comment.