From 457994eefc16b0953c7e0510842ec3fe4cb5cb81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Nov 2026 00:32:57 +0000 Subject: [PATCH 1/9] chore(deps): Bump github/codeql-action from 4.39.1 to 4.39.4 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.39.1 to 4.39.4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v4.39.1...v4.39.4) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.39.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: Carlos Eduardo Arango Gutierrez --- .github/workflows/code_scanning.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code_scanning.yaml b/.github/workflows/code_scanning.yaml index d74bc680..92364761 100644 --- a/.github/workflows/code_scanning.yaml +++ b/.github/workflows/code_scanning.yaml @@ -39,7 +39,7 @@ jobs: uses: actions/checkout@v7 - name: Initialize CodeQL - uses: github/codeql-action/init@v4.39.1 + uses: github/codeql-action/init@v4.39.4 with: config-file: ./.github/codeql/codeql-config.yaml languages: go @@ -50,6 +50,6 @@ jobs: make build-cli - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v4.39.1 + uses: github/codeql-action/analyze@v4.39.4 with: category: "/language:go" From 55e0e284efc6a70995240d88b0f89bf7b091fd69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 00:33:52 +0000 Subject: [PATCH 2/9] chore(deps): Bump docker/login-action from 4.7.0 to 4.8.0 Bumps [docker/login-action](https://github.com/docker/login-action) from 4.7.0 to 4.8.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v4.7.0...v4.8.0) --- updated-dependencies: - dependency-name: docker/login-action dependency-version: 4.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: Carlos Eduardo Arango Gutierrez --- .github/workflows/image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml index 67b7efb6..bb916b5e 100644 --- a/.github/workflows/image.yaml +++ b/.github/workflows/image.yaml @@ -30,7 +30,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 - name: Login to GitHub Container Registry - uses: docker/login-action@v4.7.0 + uses: docker/login-action@v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} From da9170dede1e16975249dc79ef646e6aec2b7fb1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Nov 2026 00:32:54 +0000 Subject: [PATCH 3/9] chore(deps): Bump NVIDIA/holodeck from 0.5.1 to 0.6.0 Bumps [NVIDIA/holodeck](https://github.com/nvidia/holodeck) from 0.5.1 to 0.6.0. - [Release notes](https://github.com/nvidia/holodeck/releases) - [Changelog](https://github.com/NVIDIA/holodeck/blob/main/CHANGELOG.md) - [Commits](https://github.com/nvidia/holodeck/compare/v0.5.1...v0.6.0) --- updated-dependencies: - dependency-name: NVIDIA/holodeck dependency-version: 0.6.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: Carlos Eduardo Arango Gutierrez --- .github/workflows/periodic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/periodic.yaml b/.github/workflows/periodic.yaml index e309932d..49938cf9 100644 --- a/.github/workflows/periodic.yaml +++ b/.github/workflows/periodic.yaml @@ -39,7 +39,7 @@ jobs: - name: Clean up VPCs if: steps.identify-resources.outputs.AWS_VPC_IDS != '' - uses: NVIDIA/holodeck@v0.5.1 + uses: NVIDIA/holodeck@v0.6.0 with: action: cleanup vpc_ids: ${{ steps.identify-resources.outputs.AWS_VPC_IDS }} From 722f96550d483ab68d06b70cff808047753716ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 00:34:29 +0000 Subject: [PATCH 4/9] chore(deps): Bump golang from 1.27.3-bookworm to 1.27.4-bookworm Bumps golang from 1.27.3-bookworm to 1.27.4-bookworm. --- updated-dependencies: - dependency-name: golang dependency-version: 1.27.4-bookworm dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: Carlos Eduardo Arango Gutierrez --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 47f8e638..d58f5dde 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ ## limitations under the License. ## -FROM golang:1.27.3-bookworm AS builder +FROM golang:1.27.4-bookworm AS builder WORKDIR /src COPY . . From d14f6c43c1ffe254d53335b17ea8639b95f9d86f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 00:33:54 +0000 Subject: [PATCH 5/9] chore(deps): Bump github.com/aws/aws-sdk-go-v2 from 1.47.5 to 1.47.7 Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.47.5 to 1.47.7. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.47.5...v1.47.7) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-version: 1.47.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: Carlos Eduardo Arango Gutierrez --- go.mod | 4 +- go.sum | 8 +-- .../aws-sdk-go-v2/aws/go_module_metadata.go | 2 +- .../aws/middleware/middleware.go | 8 ++- .../aws/signer/internal/v4/util.go | 67 +++++++++++++++++++ .../aws/aws-sdk-go-v2/aws/signer/v4/v4.go | 7 +- vendor/github.com/aws/smithy-go/CHANGELOG.md | 9 +++ .../aws/smithy-go/go_module_metadata.go | 2 +- .../http/protocol/internal/json/parser.go | 4 +- vendor/modules.txt | 4 +- 10 files changed, 94 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index 51e9bbdb..3cfeef3c 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/NVIDIA/holodeck go 1.26.0 require ( - github.com/aws/aws-sdk-go-v2 v1.47.5 + github.com/aws/aws-sdk-go-v2 v1.47.7 github.com/aws/aws-sdk-go-v2/config v1.33.13 github.com/aws/aws-sdk-go-v2/service/ec2 v1.343.0 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.57.0 @@ -34,7 +34,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/sso v1.39.1 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.44.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.51.6 // indirect - github.com/aws/smithy-go v1.28.7 // indirect + github.com/aws/smithy-go v1.28.8 // indirect github.com/fxamacker/cbor/v2 v2.9.1 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect diff --git a/go.sum b/go.sum index 8609f9fc..97b3faf0 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= -github.com/aws/aws-sdk-go-v2 v1.47.5 h1:5yA+A+BiXbDq1ZLbYwPViwhEGDMdR0MEhL8Jh2LnLS4= -github.com/aws/aws-sdk-go-v2 v1.47.5/go.mod h1:iNIkogrRvFwm+1OQIUOP2lPBtlXZboOIUWiCa+pHEMw= +github.com/aws/aws-sdk-go-v2 v1.47.7 h1:jBmtzRtGWVAzbfc4RBWo1dTte0ZZH8p9U42YJIw2+Bw= +github.com/aws/aws-sdk-go-v2 v1.47.7/go.mod h1:I8lFSH4MGrZiw2m7miCrRYHsgpC1+HW8uiVGOiPYPcw= github.com/aws/aws-sdk-go-v2/config v1.33.13 h1:u52x6ISQOx172tpwM0VRxhJzEsTJYpMcEYUGM2A1wrw= github.com/aws/aws-sdk-go-v2/config v1.33.13/go.mod h1:/ixtz6XPHb42zekjQ0LqD9XjTpTysNWhIGwufY1OzI4= github.com/aws/aws-sdk-go-v2/credentials v1.20.13 h1:j4z41OtspmQ3ftQycaDunJ26b69a9SHfaSVUPqgRv8k= @@ -32,8 +32,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.44.1 h1:w8yui2ZqdHmGwVBDGvazoIvK github.com/aws/aws-sdk-go-v2/service/ssooidc v1.44.1/go.mod h1:gJSdIY6YUzDvqQLcMtPVZgBRHrFwzHryvpE8Igzbxps= github.com/aws/aws-sdk-go-v2/service/sts v1.51.6 h1:BVjKrtRUtSYKztBCCfE1oAB+d3ViKcW2cKZfserOqMQ= github.com/aws/aws-sdk-go-v2/service/sts v1.51.6/go.mod h1:eSukFLeLkPMm+1OxDR+F0joauZdyBkF47Ow7MqjZiJw= -github.com/aws/smithy-go v1.28.7 h1:h/n1SHrwVtaDYLz8mR1/Kq4Xh4RaFbFW7bOYckg9mfE= -github.com/aws/smithy-go v1.28.7/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= +github.com/aws/smithy-go v1.28.8 h1:aEmdAq7gVCoGCnvf1NnELlu3I6D/nhqrC321FyFiQkQ= +github.com/aws/smithy-go v1.28.8/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index 24c4f5c7..d55b099a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,4 +3,4 @@ package aws // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.47.5" +const goModuleVersion = "1.47.7" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go index 3c4f2cae..cbf96fc3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go @@ -61,6 +61,9 @@ func (a RecordResponseTiming) HandleDeserialize(ctx context.Context, in middlewa ) { requestAt := sdk.NowTime() out, metadata, err = next.HandleDeserialize(ctx, in) + // The response time is when next returned. In the generated stacks that + // is right after the HTTP client's Do returned with the headers, and the + // deserializer reads the body after this middleware returns. responseAt := sdk.NowTime() setResponseAt(&metadata, responseAt) @@ -105,7 +108,7 @@ const maxTrustedRequestDuration = 15 * time.Minute // was absent/unparseable (serverTime zero), the round trip exceeded the maximum // trusted request duration, or the response was served from a cache (Age // header present). Otherwise the skew is the difference between the server's -// Date and the midpoint of the request round trip. +// Date and the client time the response was received at. func computeClockSkew(serverTime, requestAt, responseAt time.Time, hasAgeHeader bool) (time.Duration, bool) { if serverTime.IsZero() { return 0, false @@ -120,8 +123,7 @@ func computeClockSkew(serverTime, requestAt, responseAt time.Time, hasAgeHeader return 0, false } - midpoint := requestAt.Add(elapsed / 2) - return serverTime.Sub(midpoint), true + return serverTime.Sub(responseAt), true } type responseAtKey struct{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go index d025dbaa..79af1dc8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go @@ -2,6 +2,7 @@ package v4 import ( "net/url" + "sort" "strings" ) @@ -78,3 +79,69 @@ func GetURIPath(u *url.URL) string { return uriPath } + +// EncodeQuery returns the canonical query string for the given parameters, as +// required by the SigV4 canonical request. +// +// Each parameter name and value is URI-encoded individually, and the encoded +// name/value pairs are then sorted. The SigV4 specification is explicit that +// "the sorting occurs after encoding": +// +// https://docs.aws.amazon.com/IAM/latest/UserGuide/create-signed-request.html +// +// The order of encoded and decoded forms can disagree, so the two are not +// interchangeable. The values "a/b" and "a-b" encode to "a%2Fb" and "a-b": +// '/' (0x2F) sorts after '-' (0x2D), but '%' (0x25) sorts before it, so the +// pair is ordered one way before encoding and the other way after. Sorting +// before encoding therefore produces a canonical request the service does not +// agree with, and the request is rejected as unauthorized. +// +// Unlike url.Values.Encode, a space is encoded as "%20" rather than "+", which +// is what SigV4 requires. +func EncodeQuery(query url.Values) string { + type queryParam struct { + key string + value string + } + + params := make([]queryParam, 0, len(query)) + for key, values := range query { + encodedKey := encodeQueryComponent(key) + for _, value := range values { + params = append(params, queryParam{ + key: encodedKey, + value: encodeQueryComponent(value), + }) + } + } + + sort.Slice(params, func(i, j int) bool { + if params[i].key != params[j].key { + return params[i].key < params[j].key + } + return params[i].value < params[j].value + }) + + var canonical strings.Builder + for i, param := range params { + if i > 0 { + canonical.WriteByte('&') + } + canonical.WriteString(param.key) + canonical.WriteByte('=') + canonical.WriteString(param.value) + } + + return canonical.String() +} + +// encodeQueryComponent URI-encodes a single query string name or value the way +// SigV4 requires: every character outside the RFC 3986 unreserved set +// (A-Z a-z 0-9 - _ . ~) is percent-encoded with uppercase hex, and a space +// becomes "%20". +// +// url.QueryEscape already matches this, except that it encodes a space as "+". +// A literal '+' is escaped to "%2B", so replacing '+' only rewrites spaces. +func encodeQueryComponent(s string) string { + return strings.Replace(url.QueryEscape(s), "+", "%20", -1) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go index 7ed91d5b..0629ab7f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go @@ -148,11 +148,6 @@ func (s *httpSigner) Build() (signedRequest, error) { s.setRequiredSigningFields(headers, query) - // Sort Each Query Key's Values - for key := range query { - sort.Strings(query[key]) - } - v4Internal.SanitizeHostForHeader(req) credentialScope := s.buildCredentialScope() @@ -182,7 +177,7 @@ func (s *httpSigner) Build() (signedRequest, error) { } var rawQuery strings.Builder - rawQuery.WriteString(strings.Replace(query.Encode(), "+", "%20", -1)) + rawQuery.WriteString(v4Internal.EncodeQuery(query)) canonicalURI := v4Internal.GetURIPath(req.URL) if !s.DisableURIPathEscaping { diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index 158e05a4..648e978e 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,12 @@ +# Release (2026-11-03) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.28.8 + * **Bug Fix**: Preserve the exact value of numbers in JSON codec instead of automatically parsing to float64. + # Release (2026-10-27) ## General Highlights diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go index 184e469e..f3cfc270 100644 --- a/vendor/github.com/aws/smithy-go/go_module_metadata.go +++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go @@ -3,4 +3,4 @@ package smithy // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.28.7" +const goModuleVersion = "1.28.8" diff --git a/vendor/github.com/aws/smithy-go/transport/http/protocol/internal/json/parser.go b/vendor/github.com/aws/smithy-go/transport/http/protocol/internal/json/parser.go index 2a4e9d17..796236d4 100644 --- a/vendor/github.com/aws/smithy-go/transport/http/protocol/internal/json/parser.go +++ b/vendor/github.com/aws/smithy-go/transport/http/protocol/internal/json/parser.go @@ -1,10 +1,10 @@ package json import ( + "encoding/json" "errors" "fmt" "io" - "strconv" "unsafe" "github.com/aws/smithy-go/internal/serde" @@ -275,7 +275,7 @@ func (p *parser) value(tok []byte) (any, error) { list = append(list, val) } default: - return strconv.ParseFloat(string(tok), 64) + return json.Number(tok), nil } } diff --git a/vendor/modules.txt b/vendor/modules.txt index c664aada..9a6bc044 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,7 +1,7 @@ # github.com/Masterminds/semver/v3 v3.4.0 ## explicit; go 1.21 github.com/Masterminds/semver/v3 -# github.com/aws/aws-sdk-go-v2 v1.47.5 +# github.com/aws/aws-sdk-go-v2 v1.47.7 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/aws github.com/aws/aws-sdk-go-v2/aws/defaults @@ -101,7 +101,7 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc/types github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sts/types -# github.com/aws/smithy-go v1.28.7 +# github.com/aws/smithy-go v1.28.8 ## explicit; go 1.24 github.com/aws/smithy-go github.com/aws/smithy-go/auth From 9ce3d3a3ba0cce4aba6d34136c431fc8164568d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 00:36:14 +0000 Subject: [PATCH 6/9] chore(deps): Bump github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 Bumps [github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2](https://github.com/aws/aws-sdk-go-v2) from 1.57.0 to 1.63.8. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.57.0...service/workspaces/v1.63.8) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 dependency-version: 1.63.8 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: Carlos Eduardo Arango Gutierrez --- go.mod | 6 +- go.sum | 12 +- .../internal/configsources/CHANGELOG.md | 9 + .../configsources/go_module_metadata.go | 2 +- .../internal/endpoints/v2/CHANGELOG.md | 9 + .../endpoints/v2/go_module_metadata.go | 2 +- .../elasticloadbalancingv2/CHANGELOG.md | 116 +++ .../elasticloadbalancingv2/api_client.go | 151 ++-- .../api_op_AddListenerCertificates.go | 18 +- .../elasticloadbalancingv2/api_op_AddTags.go | 18 +- .../api_op_AddTrustStoreRevocations.go | 18 +- .../api_op_CreateListener.go | 18 +- .../api_op_CreateLoadBalancer.go | 18 +- .../api_op_CreateRule.go | 34 +- .../api_op_CreateTargetGroup.go | 18 +- .../api_op_CreateTrustStore.go | 18 +- .../api_op_DeleteListener.go | 18 +- .../api_op_DeleteLoadBalancer.go | 18 +- .../api_op_DeleteRule.go | 18 +- ...pi_op_DeleteSharedTrustStoreAssociation.go | 18 +- .../api_op_DeleteTargetGroup.go | 18 +- .../api_op_DeleteTrustStore.go | 18 +- .../api_op_DeregisterTargets.go | 18 +- .../api_op_DescribeAccountLimits.go | 18 +- .../api_op_DescribeCapacityReservation.go | 18 +- .../api_op_DescribeListenerAttributes.go | 18 +- .../api_op_DescribeListenerCertificates.go | 18 +- .../api_op_DescribeListeners.go | 18 +- .../api_op_DescribeLoadBalancerAttributes.go | 18 +- .../api_op_DescribeLoadBalancers.go | 18 +- .../api_op_DescribeRules.go | 18 +- .../api_op_DescribeSSLPolicies.go | 18 +- .../api_op_DescribeTags.go | 18 +- .../api_op_DescribeTargetGroupAttributes.go | 18 +- .../api_op_DescribeTargetGroups.go | 18 +- .../api_op_DescribeTargetHealth.go | 18 +- .../api_op_DescribeTrustStoreAssociations.go | 18 +- .../api_op_DescribeTrustStoreRevocations.go | 18 +- .../api_op_DescribeTrustStores.go | 18 +- .../api_op_GetResourcePolicy.go | 18 +- ...pi_op_GetTrustStoreCaCertificatesBundle.go | 18 +- .../api_op_GetTrustStoreRevocationContent.go | 18 +- .../api_op_ModifyCapacityReservation.go | 18 +- .../api_op_ModifyIpPools.go | 18 +- .../api_op_ModifyListener.go | 18 +- .../api_op_ModifyListenerAttributes.go | 18 +- .../api_op_ModifyLoadBalancerAttributes.go | 18 +- .../api_op_ModifyRule.go | 18 +- .../api_op_ModifyTargetGroup.go | 18 +- .../api_op_ModifyTargetGroupAttributes.go | 18 +- .../api_op_ModifyTrustStore.go | 18 +- .../api_op_RegisterTargets.go | 18 +- .../api_op_RemoveListenerCertificates.go | 18 +- .../api_op_RemoveTags.go | 18 +- .../api_op_RemoveTrustStoreRevocations.go | 18 +- .../api_op_SetIpAddressType.go | 18 +- .../api_op_SetRulePriorities.go | 18 +- .../api_op_SetSecurityGroups.go | 18 +- .../api_op_SetSubnets.go | 18 +- .../elasticloadbalancingv2/deserializers.go | 816 +++++++++++++----- .../go_module_metadata.go | 2 +- .../service/elasticloadbalancingv2/options.go | 5 + .../elasticloadbalancingv2/types/types.go | 48 +- vendor/modules.txt | 6 +- 64 files changed, 914 insertions(+), 1204 deletions(-) diff --git a/go.mod b/go.mod index 3cfeef3c..a59724f9 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.47.7 github.com/aws/aws-sdk-go-v2/config v1.33.13 github.com/aws/aws-sdk-go-v2/service/ec2 v1.343.0 - github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.57.0 + github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.63.8 github.com/aws/aws-sdk-go-v2/service/ssm v1.81.2 github.com/mattn/go-isatty v0.0.24 github.com/onsi/ginkgo/v2 v2.33.1 @@ -25,8 +25,8 @@ require ( github.com/Masterminds/semver/v3 v3.4.0 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.20.13 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.20.5 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.8 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.8 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.10 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.10 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.8 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.23 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.8 // indirect diff --git a/go.sum b/go.sum index 97b3faf0..088fa983 100644 --- a/go.sum +++ b/go.sum @@ -8,16 +8,16 @@ github.com/aws/aws-sdk-go-v2/credentials v1.20.13 h1:j4z41OtspmQ3ftQycaDunJ26b69 github.com/aws/aws-sdk-go-v2/credentials v1.20.13/go.mod h1:SgPA1oS3b+dlMxZb618jDmGNscpXSCaxz15igS52OlE= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.20.5 h1:iXjy2SFhGYNB1jWZBhQqq8HbhsbPF23w+/zbMvPXsTg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.20.5/go.mod h1:k0RUiBnyXU0AXRJ9tJmY2jQke6XUIX2PNVnWtvgaPtc= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.8 h1:gzIWc3DTPfPbWKrQnmL6BV6WD7NPD1htxzgdk/bQ/Z4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.8/go.mod h1:vvUA5cDAZWGo4R14FZPZfXfJCmgsafOWEq78Kg0D+ug= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.8 h1:PWv+vG8aCLS8qd+HPdYhK7Vees90aKHWFFQ1AGYD/8E= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.8/go.mod h1:xxPZEpflYHJA12366ZGyq66z9dHPCoeCIu99Jck+MPw= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.10 h1:DKtPO+uoekvZX1tIFGVlWypYGSYkHPb7rliUI1wZtEw= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.10/go.mod h1:uAi0RDdZZz8IRpXERptWALeCgQG9Ye/HiMLxkxlt8IU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.10 h1:r8p95YELmfmuV9VvAaFcLesVBZduCCCccxpzQKkNThw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.10/go.mod h1:W3M52Mqai5TjgzyL/dEG+UwE+Xz9PykyjXelvbAzWIA= github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.8 h1:WOp5De9iWdEHDPh2Kb0tBP3vGBm/dVAuRGh4a4tqduo= github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.8/go.mod h1:z8W8YgfhbWl62XqcTtK+CxPrE+iHGRVUOtrrbIOp7ZY= github.com/aws/aws-sdk-go-v2/service/ec2 v1.343.0 h1:pOxNUJbUOy779gx205gEpySpT5fu3B0ifPD8jBxujZI= github.com/aws/aws-sdk-go-v2/service/ec2 v1.343.0/go.mod h1:khWfxrzSgMjGMAZIaYAHu3IobEo7KRRNwPYaHb1zpng= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.57.0 h1:Qq9WDWJ6jKchg3U1Uwy511vdmYldeo8RZrg0+nRHjfI= -github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.57.0/go.mod h1:qNnJkZTDHDL2sO8hyVH2yILcfSEkjP/pIns2JsF1g1o= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.63.8 h1:CR+/wTRSjBeTZrG5yWpqc+I268O1LmBCEqyVYqVYI7A= +github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.63.8/go.mod h1:yYRvAMIBbj76HY/9mjtLbHKHt1BVP7AgZaToacYDL+I= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.23 h1:MCIR6iZaCKO4UE0hUvoWWLI6JVjppopV64JfAJaMjng= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.23/go.mod h1:pphWFS+z0MmIPivj8c/6bATd1Z+Av7Ust75DPdEFsPA= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.8 h1:+PMpWlJYOn2tm7sm6OZ/ZLd4jStl17T7wjNapd1Rczs= diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md index 70a5be05..47a63aab 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.5.10 (2026-11-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.5.9 (2026-11-04) + +* **Dependency Update**: Update to smithy-go v1.28.8. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.5.8 (2026-10-27) * **Dependency Update**: Update to smithy-go v1.28.7. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index d01dbaf3..d6752c81 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.5.8" +const goModuleVersion = "1.5.10" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md index a1da2e63..52122a30 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md @@ -1,3 +1,12 @@ +# v2.8.10 (2026-11-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.8.9 (2026-11-04) + +* **Dependency Update**: Update to smithy-go v1.28.8. +* **Dependency Update**: Updated to the latest SDK module versions + # v2.8.8 (2026-10-27) * **Dependency Update**: Update to smithy-go v1.28.7. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index 901fee75..ac564b2d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -const goModuleVersion = "2.8.8" +const goModuleVersion = "2.8.10" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/CHANGELOG.md index eb3531fc..0341b76d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/CHANGELOG.md @@ -1,3 +1,119 @@ +# v1.63.8 (2026-11-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.63.7 (2026-11-04) + +* **Dependency Update**: Update to smithy-go v1.28.8. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.63.6 (2026-10-27) + +* **Dependency Update**: Update to smithy-go v1.28.7. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.63.5 (2026-10-22) + +* **Bug Fix**: Update smithy-go to v1.28.6 +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.63.4 (2026-10-09.2) + +* **Dependency Update**: Update to smithy-go v1.28.5. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.63.3 (2026-10-08) + +* **Dependency Update**: Update to smithy-go v1.28.4. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.63.2 (2026-10-06) + +* No change notes available for this release. + +# v1.63.1 (2026-09-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.63.0 (2026-09-09) + +* **Feature**: Stop registering the `retry.MetricsHeader` middleware in generated clients. The `Amz-Sdk-Request` header is now set by the retry middleware itself. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.62.0 (2026-09-04) + +* **Feature**: Stop registering the `spanRetryLoop` middleware in generated clients. The retry loop's tracing span is now opened by the retry middleware itself. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.61.1 (2026-09-03) + +* **Documentation**: This release adds support for sending TCP resets for Gateway Load Balancer when a flow's idle timeout expires, or when a target becomes unhealthy or is deregistered. This adds updates the CLI documentation. + +# v1.61.0 (2026-08-31.2) + +* **Feature**: Stop registering the `SetCredentialSourceMiddleware` middleware in generated clients. Credential source user agent features are now set when the client's middleware stack is constructed. + +# v1.60.1 (2026-08-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.60.0 (2026-08-27) + +* **Feature**: Support connection read timeouts in the SDK. This is currently available on an opt-in basis by setting env `AWS_ENABLE_DEFAULT_SOCKET_TIMEOUT_2026=true`. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.59.0 (2026-08-26) + +* **Feature**: Stop registering the `ComputeContentLength` middleware in generated clients. `Content-Length` is now set when the request body is set via `SetStream`. +* **Dependency Update**: Update to smithy-go v1.28.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.58.9 (2026-08-25) + +* **Dependency Update**: Update to smithy-go v1.27.10. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.58.8 (2026-08-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.58.7 (2026-08-14) + +* **Dependency Update**: Update to smithy-go v1.27.8. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.58.6 (2026-08-10) + +* **Dependency Update**: Update to smithy-go v1.27.7. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.58.5 (2026-08-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.58.4 (2026-07-31.2) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.27.6 to fix various serde issues in HTTP binding services. + +# v1.58.3 (2026-07-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.58.2 (2026-07-28) + +* **Dependency Update**: Update to smithy-go v1.27.5. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.58.1 (2026-07-22) + +* **Documentation**: This adds CLI examples for the IpAddressType field on SourceIpConfig, enabling Network Load Balancer listener rules to match traffic based on whether the source IP is IPv4 or IPv6. + +# v1.58.0 (2026-07-21) + +* **Feature**: Add an option to clients to disable clock skew +* **Dependency Update**: Updated to the latest SDK module versions + # v1.57.0 (2026-07-15) * **Feature**: This release adds support for the IpAddressType field on SourceIpConfig, enabling Network Load Balancer listener rules to match traffic based on whether the source IP is IPv4 or IPv6. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_client.go index 755ea267..9fb8f86d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_client.go @@ -15,6 +15,7 @@ import ( internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + "github.com/aws/aws-sdk-go-v2/internal/timeouts" smithy "github.com/aws/smithy-go" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" @@ -260,6 +261,10 @@ func (c *Client) invokeOperation( finalizeClientEndpointResolverOptions(&options) + ctx = setLoggerContext(ctx, options, opID) + + ctx = resolveServiceMetadata(ctx, options, opID) + if err := c.addCommonMiddlewares(stack, options, opID); err != nil { return nil, metadata, err } @@ -376,9 +381,6 @@ func (c *Client) addCommonMiddlewares(stack *middleware.Stack, options Options, if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil { return fmt.Errorf("add protocol finalizers: %v", err) } - if err := addSetLoggerMiddleware(stack, options); err != nil { - return err - } if err := addClientRequestID(stack); err != nil { return err } @@ -388,9 +390,6 @@ func (c *Client) addCommonMiddlewares(stack *middleware.Stack, options Options, if err := addRawResponseToMetadata(stack); err != nil { return err } - if err := addSpanRetryLoop(stack, options); err != nil { - return err - } if err := addClientUserAgent(stack, options); err != nil { return err } @@ -431,30 +430,6 @@ func resolveAuthSchemes(options *Options) { type noSmithyDocumentSerde = smithydocument.NoSerde -type legacyEndpointContextSetter struct { - LegacyResolver EndpointResolver -} - -func (*legacyEndpointContextSetter) ID() string { - return "legacyEndpointContextSetter" -} - -func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.LegacyResolver != nil { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) - } - - return next.HandleInitialize(ctx, in) - -} -func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { - return stack.Initialize.Add(&legacyEndpointContextSetter{ - LegacyResolver: o.EndpointResolver, - }, middleware.Before) -} - func resolveDefaultLogger(o *Options) { if o.Logger != nil { return @@ -462,8 +437,9 @@ func resolveDefaultLogger(o *Options) { o.Logger = logging.Nop{} } -func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { - return middleware.AddSetLoggerMiddleware(stack, o.Logger) +func setLoggerContext(ctx context.Context, options Options, operation string) context.Context { + _ = operation + return middleware.SetLogger(ctx, options.Logger) } func setResolvedDefaultsMode(o *Options) { @@ -484,16 +460,17 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AuthSchemePreference: cfg.AuthSchemePreference, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + DisableClockSkewCorrection: cfg.DisableClockSkewCorrection, + AuthSchemePreference: cfg.AuthSchemePreference, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -541,6 +518,12 @@ func resolveHTTPClient(o *Options) { }) } + if _, ok := buildable.GetReadTimeout(); !ok { + if timeout, ok := timeouts.GetServiceReadTimeout(ServiceID); ok { + buildable = buildable.WithReadTimeout(timeout) + } + } + o.HTTPClient = buildable } @@ -682,40 +665,14 @@ func addClientRequestID(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) } -func addComputeContentLength(stack *middleware.Stack) error { - return stack.Build.Insert(&smithyhttp.ComputeContentLength{}, "ClientRequestID", middleware.After) -} - func addRawResponseToMetadata(stack *middleware.Stack) error { return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) } -func addRecordResponseTiming(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) -} - -func addSpanRetryLoop(stack *middleware.Stack, options Options) error { - return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) -} - -type spanRetryLoop struct { - options Options -} - -func (*spanRetryLoop) ID() string { - return "spanRetryLoop" -} - -func (m *spanRetryLoop) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - middleware.FinalizeOutput, middleware.Metadata, error, -) { - tracer := operationTracer(m.options.TracerProvider) - ctx, span := tracer.StartSpan(ctx, "RetryLoop") - defer span.End() - - return next.HandleFinalize(ctx, in) +func addRecordResponseTiming(stack *middleware.Stack, options Options) error { + return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{ + DisableClockSkewCorrection: options.DisableClockSkewCorrection, + }, middleware.After) } func addStreamingEventsPayload(stack *middleware.Stack) error { return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) @@ -762,13 +719,11 @@ func addRetry(stack *middleware.Stack, o Options, c *Client) error { m.LogAttempts = o.ClientLogMode.IsRetries() m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2") m.ClientSkew = c.timeOffset + m.DisableClockSkewCorrection = o.DisableClockSkewCorrection }) if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil { return err } - if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { - return err - } return nil } @@ -821,35 +776,21 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } -type setCredentialSourceMiddleware struct { - ua *awsmiddleware.RequestUserAgent - options Options -} - -func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" } - -func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource) - if !ok { - return next.HandleBuild(ctx, in) - } - providerSources := asProviderSource.ProviderSources() - for _, source := range providerSources { - m.ua.AddCredentialsSource(source) - } - return next.HandleBuild(ctx, in) -} - func addCredentialSource(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { return err } - mw := setCredentialSourceMiddleware{ua: ua, options: options} - return stack.Build.Insert(&mw, "UserAgent", middleware.Before) + asProviderSource, ok := options.Credentials.(aws.CredentialProviderSource) + if !ok { + return nil + } + + for _, source := range asProviderSource.ProviderSources() { + ua.AddCredentialsSource(source) + } + return nil } func resolveTracerProvider(options *Options) { @@ -864,12 +805,16 @@ func resolveMeterProvider(options *Options) { } } -func newServiceMetadataMiddleware(region, operation string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: operation, +func resolveServiceMetadata(ctx context.Context, options Options, operation string) context.Context { + ctx = awsmiddleware.SetServiceID(ctx, ServiceID) + if options.Region != "" { + ctx = awsmiddleware.SetRegion(ctx, options.Region) + } + ctx = awsmiddleware.SetOperationName(ctx, operation) + if options.EndpointResolver != nil { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) } + return ctx } func addRecursionDetection(stack *middleware.Stack) error { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_AddListenerCertificates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_AddListenerCertificates.go index e864e5d1..6cc705dc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_AddListenerCertificates.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_AddListenerCertificates.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Adds the specified SSL server certificate to the certificate list for the @@ -72,25 +71,13 @@ func (c *Client) addOperationAddListenerCertificatesMiddlewares(stack *middlewar return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -99,9 +86,6 @@ func (c *Client) addOperationAddListenerCertificatesMiddlewares(stack *middlewar if err = addOpAddListenerCertificatesValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AddListenerCertificates"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_AddTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_AddTags.go index a0568305..87d4a2b8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_AddTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_AddTags.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Adds the specified tags to the specified Elastic Load Balancing resource. You @@ -62,25 +61,13 @@ func (c *Client) addOperationAddTagsMiddlewares(stack *middleware.Stack, options return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -89,9 +76,6 @@ func (c *Client) addOperationAddTagsMiddlewares(stack *middleware.Stack, options if err = addOpAddTagsValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AddTags"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_AddTrustStoreRevocations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_AddTrustStoreRevocations.go index 6d90e585..f34a33b2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_AddTrustStoreRevocations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_AddTrustStoreRevocations.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Adds the specified revocation file to the specified trust store. @@ -59,25 +58,13 @@ func (c *Client) addOperationAddTrustStoreRevocationsMiddlewares(stack *middlewa return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -86,9 +73,6 @@ func (c *Client) addOperationAddTrustStoreRevocationsMiddlewares(stack *middlewa if err = addOpAddTrustStoreRevocationsValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AddTrustStoreRevocations"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateListener.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateListener.go index 6da9ffe0..01ca2a4b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateListener.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateListener.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a listener for the specified Application Load Balancer, Network Load @@ -128,25 +127,13 @@ func (c *Client) addOperationCreateListenerMiddlewares(stack *middleware.Stack, return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -155,9 +142,6 @@ func (c *Client) addOperationCreateListenerMiddlewares(stack *middleware.Stack, if err = addOpCreateListenerValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateListener"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateLoadBalancer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateLoadBalancer.go index 2011c0be..92c6bebf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateLoadBalancer.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateLoadBalancer.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates an Application Load Balancer, Network Load Balancer, or Gateway Load @@ -162,25 +161,13 @@ func (c *Client) addOperationCreateLoadBalancerMiddlewares(stack *middleware.Sta return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -189,9 +176,6 @@ func (c *Client) addOperationCreateLoadBalancerMiddlewares(stack *middleware.Sta if err = addOpCreateLoadBalancerValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateLoadBalancer"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateRule.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateRule.go index 6248b6c3..2a20e237 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateRule.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateRule.go @@ -6,20 +6,19 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a rule for the specified listener. The listener must be associated with -// an Application Load Balancer. +// an Application Load Balancer or a dual-stack Network Load Balancer. // -// Each rule consists of a priority, one or more actions, one or more conditions, -// and up to two optional transforms. Rules are evaluated in priority order, from -// the lowest value to the highest value. When the conditions for a rule are met, -// its actions are performed. If the conditions for no rules are met, the actions -// for the default rule are performed. For more information, see [Listener rules]in the -// Application Load Balancers Guide. +// Each rule consists of a priority, one or more actions, and one or more +// conditions. Rules are evaluated in priority order, from the lowest value to the +// highest value. When the conditions for a rule are met, its actions are +// performed. If the conditions for no rules are met, the actions for the default +// rule are performed. For more information, see [Listener rules]in the Application Load Balancers +// Guide or [Listener rules]in the Network Load Balancers Guide. // -// [Listener rules]: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#listener-rules +// [Listener rules]: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-listeners.html#listener-rules func (c *Client) CreateRule(ctx context.Context, params *CreateRuleInput, optFns ...func(*Options)) (*CreateRuleOutput, error) { if params == nil { params = &CreateRuleInput{} @@ -88,25 +87,13 @@ func (c *Client) addOperationCreateRuleMiddlewares(stack *middleware.Stack, opti return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -115,9 +102,6 @@ func (c *Client) addOperationCreateRuleMiddlewares(stack *middleware.Stack, opti if err = addOpCreateRuleValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateRule"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateTargetGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateTargetGroup.go index 88998296..db55cc81 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateTargetGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateTargetGroup.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a target group. @@ -190,25 +189,13 @@ func (c *Client) addOperationCreateTargetGroupMiddlewares(stack *middleware.Stac return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -217,9 +204,6 @@ func (c *Client) addOperationCreateTargetGroupMiddlewares(stack *middleware.Stac if err = addOpCreateTargetGroupValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateTargetGroup"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateTrustStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateTrustStore.go index 274e77c9..4a3acd5a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateTrustStore.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_CreateTrustStore.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a trust store. @@ -79,25 +78,13 @@ func (c *Client) addOperationCreateTrustStoreMiddlewares(stack *middleware.Stack return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -106,9 +93,6 @@ func (c *Client) addOperationCreateTrustStoreMiddlewares(stack *middleware.Stack if err = addOpCreateTrustStoreValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateTrustStore"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteListener.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteListener.go index ef3d5639..849988c2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteListener.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteListener.go @@ -5,7 +5,6 @@ package elasticloadbalancingv2 import ( "context" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the specified listener. @@ -54,25 +53,13 @@ func (c *Client) addOperationDeleteListenerMiddlewares(stack *middleware.Stack, return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -81,9 +68,6 @@ func (c *Client) addOperationDeleteListenerMiddlewares(stack *middleware.Stack, if err = addOpDeleteListenerValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DeleteListener"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteLoadBalancer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteLoadBalancer.go index b3db6f1b..9e094ac0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteLoadBalancer.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteLoadBalancer.go @@ -5,7 +5,6 @@ package elasticloadbalancingv2 import ( "context" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the specified Application Load Balancer, Network Load Balancer, or @@ -60,25 +59,13 @@ func (c *Client) addOperationDeleteLoadBalancerMiddlewares(stack *middleware.Sta return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -87,9 +74,6 @@ func (c *Client) addOperationDeleteLoadBalancerMiddlewares(stack *middleware.Sta if err = addOpDeleteLoadBalancerValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DeleteLoadBalancer"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteRule.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteRule.go index 9dce6d1f..a0cf61aa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteRule.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteRule.go @@ -5,7 +5,6 @@ package elasticloadbalancingv2 import ( "context" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the specified rule. @@ -53,25 +52,13 @@ func (c *Client) addOperationDeleteRuleMiddlewares(stack *middleware.Stack, opti return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -80,9 +67,6 @@ func (c *Client) addOperationDeleteRuleMiddlewares(stack *middleware.Stack, opti if err = addOpDeleteRuleValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DeleteRule"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteSharedTrustStoreAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteSharedTrustStoreAssociation.go index 725b79c1..5bad30bd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteSharedTrustStoreAssociation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteSharedTrustStoreAssociation.go @@ -5,7 +5,6 @@ package elasticloadbalancingv2 import ( "context" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a shared trust store association. @@ -56,25 +55,13 @@ func (c *Client) addOperationDeleteSharedTrustStoreAssociationMiddlewares(stack return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -83,9 +70,6 @@ func (c *Client) addOperationDeleteSharedTrustStoreAssociationMiddlewares(stack if err = addOpDeleteSharedTrustStoreAssociationValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DeleteSharedTrustStoreAssociation"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteTargetGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteTargetGroup.go index 11dc0dd0..b3fd6474 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteTargetGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteTargetGroup.go @@ -5,7 +5,6 @@ package elasticloadbalancingv2 import ( "context" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the specified target group. @@ -56,25 +55,13 @@ func (c *Client) addOperationDeleteTargetGroupMiddlewares(stack *middleware.Stac return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -83,9 +70,6 @@ func (c *Client) addOperationDeleteTargetGroupMiddlewares(stack *middleware.Stac if err = addOpDeleteTargetGroupValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DeleteTargetGroup"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteTrustStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteTrustStore.go index c663764a..30335102 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteTrustStore.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeleteTrustStore.go @@ -5,7 +5,6 @@ package elasticloadbalancingv2 import ( "context" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a trust store. @@ -51,25 +50,13 @@ func (c *Client) addOperationDeleteTrustStoreMiddlewares(stack *middleware.Stack return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -78,9 +65,6 @@ func (c *Client) addOperationDeleteTrustStoreMiddlewares(stack *middleware.Stack if err = addOpDeleteTrustStoreValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DeleteTrustStore"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeregisterTargets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeregisterTargets.go index e2df3fd1..c9b72525 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeregisterTargets.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DeregisterTargets.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deregisters the specified targets from the specified target group. After the @@ -79,25 +78,13 @@ func (c *Client) addOperationDeregisterTargetsMiddlewares(stack *middleware.Stac return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -106,9 +93,6 @@ func (c *Client) addOperationDeregisterTargetsMiddlewares(stack *middleware.Stac if err = addOpDeregisterTargetsValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DeregisterTargets"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeAccountLimits.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeAccountLimits.go index 403c8221..92f3f66a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeAccountLimits.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeAccountLimits.go @@ -7,7 +7,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the current Elastic Load Balancing resource limits for your Amazon @@ -76,33 +75,18 @@ func (c *Client) addOperationDescribeAccountLimitsMiddlewares(stack *middleware. return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeAccountLimits"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeCapacityReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeCapacityReservation.go index 273d2f95..5e042966 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeCapacityReservation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeCapacityReservation.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) @@ -66,25 +65,13 @@ func (c *Client) addOperationDescribeCapacityReservationMiddlewares(stack *middl return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -93,9 +80,6 @@ func (c *Client) addOperationDescribeCapacityReservationMiddlewares(stack *middl if err = addOpDescribeCapacityReservationValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeCapacityReservation"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeListenerAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeListenerAttributes.go index f98eac37..73b65df1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeListenerAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeListenerAttributes.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the attributes for the specified listener. @@ -56,25 +55,13 @@ func (c *Client) addOperationDescribeListenerAttributesMiddlewares(stack *middle return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -83,9 +70,6 @@ func (c *Client) addOperationDescribeListenerAttributesMiddlewares(stack *middle if err = addOpDescribeListenerAttributesValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeListenerAttributes"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeListenerCertificates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeListenerCertificates.go index df81e489..d1e10246 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeListenerCertificates.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeListenerCertificates.go @@ -7,7 +7,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the default certificate and the certificate list for the specified @@ -79,25 +78,13 @@ func (c *Client) addOperationDescribeListenerCertificatesMiddlewares(stack *midd return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -106,9 +93,6 @@ func (c *Client) addOperationDescribeListenerCertificatesMiddlewares(stack *midd if err = addOpDescribeListenerCertificatesValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeListenerCertificates"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeListeners.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeListeners.go index 58ad4d71..109590e1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeListeners.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeListeners.go @@ -7,7 +7,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the specified listeners or the listeners for the specified @@ -71,33 +70,18 @@ func (c *Client) addOperationDescribeListenersMiddlewares(stack *middleware.Stac return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeListeners"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeLoadBalancerAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeLoadBalancerAttributes.go index c0da9cce..4dd8ba56 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeLoadBalancerAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeLoadBalancerAttributes.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the attributes for the specified Application Load Balancer, Network @@ -70,25 +69,13 @@ func (c *Client) addOperationDescribeLoadBalancerAttributesMiddlewares(stack *mi return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -97,9 +84,6 @@ func (c *Client) addOperationDescribeLoadBalancerAttributesMiddlewares(stack *mi if err = addOpDescribeLoadBalancerAttributesValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeLoadBalancerAttributes"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go index a935a310..955db63d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go @@ -10,7 +10,6 @@ import ( smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" "time" ) @@ -75,33 +74,18 @@ func (c *Client) addOperationDescribeLoadBalancersMiddlewares(stack *middleware. return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeLoadBalancers"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeRules.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeRules.go index 54cef076..70b4c000 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeRules.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeRules.go @@ -7,7 +7,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the specified rules or the rules for the specified listener. You must @@ -70,33 +69,18 @@ func (c *Client) addOperationDescribeRulesMiddlewares(stack *middleware.Stack, o return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeRules"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeSSLPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeSSLPolicies.go index b6c19d30..6f0c707a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeSSLPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeSSLPolicies.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the specified policies or all policies used for SSL negotiation. @@ -74,33 +73,18 @@ func (c *Client) addOperationDescribeSSLPoliciesMiddlewares(stack *middleware.St return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeSSLPolicies"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTags.go index 5a2bdcc8..77af5b2b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTags.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the tags for the specified Elastic Load Balancing resources. You can @@ -59,25 +58,13 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -86,9 +73,6 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op if err = addOpDescribeTagsValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeTags"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTargetGroupAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTargetGroupAttributes.go index a498b25a..48766030 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTargetGroupAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTargetGroupAttributes.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the attributes for the specified target group. @@ -69,25 +68,13 @@ func (c *Client) addOperationDescribeTargetGroupAttributesMiddlewares(stack *mid return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -96,9 +83,6 @@ func (c *Client) addOperationDescribeTargetGroupAttributesMiddlewares(stack *mid if err = addOpDescribeTargetGroupAttributesValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeTargetGroupAttributes"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTargetGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTargetGroups.go index f3e273e3..e16aba62 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTargetGroups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTargetGroups.go @@ -7,7 +7,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the specified target groups or all of your target groups. By default, @@ -75,33 +74,18 @@ func (c *Client) addOperationDescribeTargetGroupsMiddlewares(stack *middleware.S return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeTargetGroups"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTargetHealth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTargetHealth.go index f69d777f..aae36e47 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTargetHealth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTargetHealth.go @@ -10,7 +10,6 @@ import ( smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" smithywaiter "github.com/aws/smithy-go/waiter" "time" ) @@ -68,25 +67,13 @@ func (c *Client) addOperationDescribeTargetHealthMiddlewares(stack *middleware.S return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -95,9 +82,6 @@ func (c *Client) addOperationDescribeTargetHealthMiddlewares(stack *middleware.S if err = addOpDescribeTargetHealthValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeTargetHealth"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTrustStoreAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTrustStoreAssociations.go index 4e5343ff..76fb2433 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTrustStoreAssociations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTrustStoreAssociations.go @@ -7,7 +7,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes all resources associated with the specified trust store. @@ -68,25 +67,13 @@ func (c *Client) addOperationDescribeTrustStoreAssociationsMiddlewares(stack *mi return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -95,9 +82,6 @@ func (c *Client) addOperationDescribeTrustStoreAssociationsMiddlewares(stack *mi if err = addOpDescribeTrustStoreAssociationsValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeTrustStoreAssociations"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTrustStoreRevocations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTrustStoreRevocations.go index 9fad6446..2c8a4bcd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTrustStoreRevocations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTrustStoreRevocations.go @@ -7,7 +7,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes the revocation files in use by the specified trust store or @@ -72,25 +71,13 @@ func (c *Client) addOperationDescribeTrustStoreRevocationsMiddlewares(stack *mid return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -99,9 +86,6 @@ func (c *Client) addOperationDescribeTrustStoreRevocationsMiddlewares(stack *mid if err = addOpDescribeTrustStoreRevocationsValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeTrustStoreRevocations"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTrustStores.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTrustStores.go index 1a63a403..eb996a5f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTrustStores.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_DescribeTrustStores.go @@ -7,7 +7,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes all trust stores for the specified account. @@ -69,33 +68,18 @@ func (c *Client) addOperationDescribeTrustStoresMiddlewares(stack *middleware.St return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DescribeTrustStores"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_GetResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_GetResourcePolicy.go index a83d7662..87b01dde 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_GetResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_GetResourcePolicy.go @@ -5,7 +5,6 @@ package elasticloadbalancingv2 import ( "context" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the resource policy for a specified resource. @@ -55,25 +54,13 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -82,9 +69,6 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetResourcePolicy"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_GetTrustStoreCaCertificatesBundle.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_GetTrustStoreCaCertificatesBundle.go index 3223e487..aaa78323 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_GetTrustStoreCaCertificatesBundle.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_GetTrustStoreCaCertificatesBundle.go @@ -5,7 +5,6 @@ package elasticloadbalancingv2 import ( "context" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the ca certificate bundle. @@ -57,25 +56,13 @@ func (c *Client) addOperationGetTrustStoreCaCertificatesBundleMiddlewares(stack return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -84,9 +71,6 @@ func (c *Client) addOperationGetTrustStoreCaCertificatesBundleMiddlewares(stack if err = addOpGetTrustStoreCaCertificatesBundleValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetTrustStoreCaCertificatesBundle"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_GetTrustStoreRevocationContent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_GetTrustStoreRevocationContent.go index 03caa7d2..af2c5569 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_GetTrustStoreRevocationContent.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_GetTrustStoreRevocationContent.go @@ -5,7 +5,6 @@ package elasticloadbalancingv2 import ( "context" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the specified revocation file. @@ -62,25 +61,13 @@ func (c *Client) addOperationGetTrustStoreRevocationContentMiddlewares(stack *mi return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -89,9 +76,6 @@ func (c *Client) addOperationGetTrustStoreRevocationContentMiddlewares(stack *mi if err = addOpGetTrustStoreRevocationContentValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetTrustStoreRevocationContent"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyCapacityReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyCapacityReservation.go index fc8f14d1..a59c951a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyCapacityReservation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyCapacityReservation.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) @@ -75,25 +74,13 @@ func (c *Client) addOperationModifyCapacityReservationMiddlewares(stack *middlew return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -102,9 +89,6 @@ func (c *Client) addOperationModifyCapacityReservationMiddlewares(stack *middlew if err = addOpModifyCapacityReservationValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ModifyCapacityReservation"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyIpPools.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyIpPools.go index e7c11645..a7b70f3b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyIpPools.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyIpPools.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // [Application Load Balancers] Modify the IP pool associated to a load balancer. @@ -62,25 +61,13 @@ func (c *Client) addOperationModifyIpPoolsMiddlewares(stack *middleware.Stack, o return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -89,9 +76,6 @@ func (c *Client) addOperationModifyIpPoolsMiddlewares(stack *middleware.Stack, o if err = addOpModifyIpPoolsValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ModifyIpPools"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyListener.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyListener.go index 89628c69..f4f47110 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyListener.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyListener.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Replaces the specified properties of the specified listener. Any properties @@ -115,25 +114,13 @@ func (c *Client) addOperationModifyListenerMiddlewares(stack *middleware.Stack, return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -142,9 +129,6 @@ func (c *Client) addOperationModifyListenerMiddlewares(stack *middleware.Stack, if err = addOpModifyListenerValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ModifyListener"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyListenerAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyListenerAttributes.go index 57376366..5c0ba62e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyListenerAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyListenerAttributes.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies the specified attributes of the specified listener. @@ -61,25 +60,13 @@ func (c *Client) addOperationModifyListenerAttributesMiddlewares(stack *middlewa return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -88,9 +75,6 @@ func (c *Client) addOperationModifyListenerAttributesMiddlewares(stack *middlewa if err = addOpModifyListenerAttributesValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ModifyListenerAttributes"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyLoadBalancerAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyLoadBalancerAttributes.go index 1c928b7a..63601b99 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyLoadBalancerAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyLoadBalancerAttributes.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies the specified attributes of the specified Application Load Balancer, @@ -66,25 +65,13 @@ func (c *Client) addOperationModifyLoadBalancerAttributesMiddlewares(stack *midd return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -93,9 +80,6 @@ func (c *Client) addOperationModifyLoadBalancerAttributesMiddlewares(stack *midd if err = addOpModifyLoadBalancerAttributesValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ModifyLoadBalancerAttributes"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyRule.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyRule.go index 4035210b..e65b4c4f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyRule.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyRule.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Replaces the specified properties of the specified rule. Any properties that @@ -76,25 +75,13 @@ func (c *Client) addOperationModifyRuleMiddlewares(stack *middleware.Stack, opti return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -103,9 +90,6 @@ func (c *Client) addOperationModifyRuleMiddlewares(stack *middleware.Stack, opti if err = addOpModifyRuleValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ModifyRule"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyTargetGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyTargetGroup.go index 91d376ac..c5814914 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyTargetGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyTargetGroup.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies the health checks used when evaluating the health state of the targets @@ -106,25 +105,13 @@ func (c *Client) addOperationModifyTargetGroupMiddlewares(stack *middleware.Stac return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -133,9 +120,6 @@ func (c *Client) addOperationModifyTargetGroupMiddlewares(stack *middleware.Stac if err = addOpModifyTargetGroupValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ModifyTargetGroup"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyTargetGroupAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyTargetGroupAttributes.go index 12fc0455..0c456615 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyTargetGroupAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyTargetGroupAttributes.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies the specified attributes of the specified target group. @@ -61,25 +60,13 @@ func (c *Client) addOperationModifyTargetGroupAttributesMiddlewares(stack *middl return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -88,9 +75,6 @@ func (c *Client) addOperationModifyTargetGroupAttributesMiddlewares(stack *middl if err = addOpModifyTargetGroupAttributesValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ModifyTargetGroupAttributes"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyTrustStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyTrustStore.go index 474f9474..569bd27e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyTrustStore.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_ModifyTrustStore.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Update the ca certificate bundle for the specified trust store. @@ -70,25 +69,13 @@ func (c *Client) addOperationModifyTrustStoreMiddlewares(stack *middleware.Stack return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -97,9 +84,6 @@ func (c *Client) addOperationModifyTrustStoreMiddlewares(stack *middleware.Stack if err = addOpModifyTrustStoreValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ModifyTrustStore"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RegisterTargets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RegisterTargets.go index 5e359c86..714b6699 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RegisterTargets.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RegisterTargets.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Registers the specified targets with the specified target group. @@ -77,25 +76,13 @@ func (c *Client) addOperationRegisterTargetsMiddlewares(stack *middleware.Stack, return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -104,9 +91,6 @@ func (c *Client) addOperationRegisterTargetsMiddlewares(stack *middleware.Stack, if err = addOpRegisterTargetsValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "RegisterTargets"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RemoveListenerCertificates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RemoveListenerCertificates.go index bb33eeea..770f4331 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RemoveListenerCertificates.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RemoveListenerCertificates.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the specified certificate from the certificate list for the specified @@ -59,25 +58,13 @@ func (c *Client) addOperationRemoveListenerCertificatesMiddlewares(stack *middle return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -86,9 +73,6 @@ func (c *Client) addOperationRemoveListenerCertificatesMiddlewares(stack *middle if err = addOpRemoveListenerCertificatesValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "RemoveListenerCertificates"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RemoveTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RemoveTags.go index 84ec3874..db4e4c0c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RemoveTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RemoveTags.go @@ -5,7 +5,6 @@ package elasticloadbalancingv2 import ( "context" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the specified tags from the specified Elastic Load Balancing resources. @@ -58,25 +57,13 @@ func (c *Client) addOperationRemoveTagsMiddlewares(stack *middleware.Stack, opti return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -85,9 +72,6 @@ func (c *Client) addOperationRemoveTagsMiddlewares(stack *middleware.Stack, opti if err = addOpRemoveTagsValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "RemoveTags"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RemoveTrustStoreRevocations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RemoveTrustStoreRevocations.go index 3aa2f3e2..7825163c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RemoveTrustStoreRevocations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_RemoveTrustStoreRevocations.go @@ -5,7 +5,6 @@ package elasticloadbalancingv2 import ( "context" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the specified revocation file from the specified trust store. @@ -56,25 +55,13 @@ func (c *Client) addOperationRemoveTrustStoreRevocationsMiddlewares(stack *middl return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -83,9 +70,6 @@ func (c *Client) addOperationRemoveTrustStoreRevocationsMiddlewares(stack *middl if err = addOpRemoveTrustStoreRevocationsValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "RemoveTrustStoreRevocations"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetIpAddressType.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetIpAddressType.go index 8d5bea65..633ba707 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetIpAddressType.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetIpAddressType.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Sets the type of IP addresses used by the subnets of the specified load @@ -74,25 +73,13 @@ func (c *Client) addOperationSetIpAddressTypeMiddlewares(stack *middleware.Stack return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -101,9 +88,6 @@ func (c *Client) addOperationSetIpAddressTypeMiddlewares(stack *middleware.Stack if err = addOpSetIpAddressTypeValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "SetIpAddressType"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetRulePriorities.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetRulePriorities.go index a866af7a..cd08a67f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetRulePriorities.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetRulePriorities.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Sets the priorities of the specified rules. @@ -59,25 +58,13 @@ func (c *Client) addOperationSetRulePrioritiesMiddlewares(stack *middleware.Stac return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -86,9 +73,6 @@ func (c *Client) addOperationSetRulePrioritiesMiddlewares(stack *middleware.Stac if err = addOpSetRulePrioritiesValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "SetRulePriorities"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetSecurityGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetSecurityGroups.go index 4b35a1c3..3a6b6d14 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetSecurityGroups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetSecurityGroups.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Associates the specified security groups with the specified Application Load @@ -77,25 +76,13 @@ func (c *Client) addOperationSetSecurityGroupsMiddlewares(stack *middleware.Stac return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -104,9 +91,6 @@ func (c *Client) addOperationSetSecurityGroupsMiddlewares(stack *middleware.Stac if err = addOpSetSecurityGroupsValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "SetSecurityGroups"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetSubnets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetSubnets.go index 9357950e..406f7d0d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetSubnets.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/api_op_SetSubnets.go @@ -6,7 +6,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types" "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" ) // Enables the Availability Zones for the specified public subnets for the @@ -121,25 +120,13 @@ func (c *Client) addOperationSetSubnetsMiddlewares(stack *middleware.Stack, opti return err } - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + if err = addRecordResponseTiming(stack, options); err != nil { return err } if err = addCredentialSource(stack, options); err != nil { @@ -148,9 +135,6 @@ func (c *Client) addOperationSetSubnetsMiddlewares(stack *middleware.Stack, opti if err = addOpSetSubnetsValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "SetSubnets"), middleware.Before); err != nil { - return err - } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/deserializers.go index 90b6eb52..1acc123c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/deserializers.go @@ -34,6 +34,18 @@ func (m *awsAwsquery_deserializeOpAddListenerCertificates) HandleDeserialize(ctx out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -42,10 +54,6 @@ func (m *awsAwsquery_deserializeOpAddListenerCertificates) HandleDeserialize(ctx endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorAddListenerCertificates(response, &metadata) @@ -152,6 +160,18 @@ func (m *awsAwsquery_deserializeOpAddTags) HandleDeserialize(ctx context.Context out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -160,10 +180,6 @@ func (m *awsAwsquery_deserializeOpAddTags) HandleDeserialize(ctx context.Context endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorAddTags(response, &metadata) @@ -282,6 +298,18 @@ func (m *awsAwsquery_deserializeOpAddTrustStoreRevocations) HandleDeserialize(ct out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -290,10 +318,6 @@ func (m *awsAwsquery_deserializeOpAddTrustStoreRevocations) HandleDeserialize(ct endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorAddTrustStoreRevocations(response, &metadata) @@ -403,6 +427,18 @@ func (m *awsAwsquery_deserializeOpCreateListener) HandleDeserialize(ctx context. out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -411,10 +447,6 @@ func (m *awsAwsquery_deserializeOpCreateListener) HandleDeserialize(ctx context. endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorCreateListener(response, &metadata) @@ -572,6 +604,18 @@ func (m *awsAwsquery_deserializeOpCreateLoadBalancer) HandleDeserialize(ctx cont out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -580,10 +624,6 @@ func (m *awsAwsquery_deserializeOpCreateLoadBalancer) HandleDeserialize(ctx cont endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorCreateLoadBalancer(response, &metadata) @@ -720,6 +760,18 @@ func (m *awsAwsquery_deserializeOpCreateRule) HandleDeserialize(ctx context.Cont out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -728,10 +780,6 @@ func (m *awsAwsquery_deserializeOpCreateRule) HandleDeserialize(ctx context.Cont endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorCreateRule(response, &metadata) @@ -874,6 +922,18 @@ func (m *awsAwsquery_deserializeOpCreateTargetGroup) HandleDeserialize(ctx conte out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -882,10 +942,6 @@ func (m *awsAwsquery_deserializeOpCreateTargetGroup) HandleDeserialize(ctx conte endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorCreateTargetGroup(response, &metadata) @@ -995,6 +1051,18 @@ func (m *awsAwsquery_deserializeOpCreateTrustStore) HandleDeserialize(ctx contex out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -1003,10 +1071,6 @@ func (m *awsAwsquery_deserializeOpCreateTrustStore) HandleDeserialize(ctx contex endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorCreateTrustStore(response, &metadata) @@ -1122,6 +1186,18 @@ func (m *awsAwsquery_deserializeOpDeleteListener) HandleDeserialize(ctx context. out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -1130,10 +1206,6 @@ func (m *awsAwsquery_deserializeOpDeleteListener) HandleDeserialize(ctx context. endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDeleteListener(response, &metadata) @@ -1237,6 +1309,18 @@ func (m *awsAwsquery_deserializeOpDeleteLoadBalancer) HandleDeserialize(ctx cont out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -1245,10 +1329,6 @@ func (m *awsAwsquery_deserializeOpDeleteLoadBalancer) HandleDeserialize(ctx cont endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDeleteLoadBalancer(response, &metadata) @@ -1355,6 +1435,18 @@ func (m *awsAwsquery_deserializeOpDeleteRule) HandleDeserialize(ctx context.Cont out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -1363,10 +1455,6 @@ func (m *awsAwsquery_deserializeOpDeleteRule) HandleDeserialize(ctx context.Cont endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDeleteRule(response, &metadata) @@ -1470,6 +1558,18 @@ func (m *awsAwsquery_deserializeOpDeleteSharedTrustStoreAssociation) HandleDeser out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -1478,10 +1578,6 @@ func (m *awsAwsquery_deserializeOpDeleteSharedTrustStoreAssociation) HandleDeser endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDeleteSharedTrustStoreAssociation(response, &metadata) @@ -1588,6 +1684,18 @@ func (m *awsAwsquery_deserializeOpDeleteTargetGroup) HandleDeserialize(ctx conte out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -1596,10 +1704,6 @@ func (m *awsAwsquery_deserializeOpDeleteTargetGroup) HandleDeserialize(ctx conte endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDeleteTargetGroup(response, &metadata) @@ -1700,6 +1804,18 @@ func (m *awsAwsquery_deserializeOpDeleteTrustStore) HandleDeserialize(ctx contex out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -1708,10 +1824,6 @@ func (m *awsAwsquery_deserializeOpDeleteTrustStore) HandleDeserialize(ctx contex endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDeleteTrustStore(response, &metadata) @@ -1815,6 +1927,18 @@ func (m *awsAwsquery_deserializeOpDeregisterTargets) HandleDeserialize(ctx conte out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -1823,10 +1947,6 @@ func (m *awsAwsquery_deserializeOpDeregisterTargets) HandleDeserialize(ctx conte endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDeregisterTargets(response, &metadata) @@ -1930,6 +2050,18 @@ func (m *awsAwsquery_deserializeOpDescribeAccountLimits) HandleDeserialize(ctx c out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -1938,10 +2070,6 @@ func (m *awsAwsquery_deserializeOpDescribeAccountLimits) HandleDeserialize(ctx c endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeAccountLimits(response, &metadata) @@ -2039,6 +2167,18 @@ func (m *awsAwsquery_deserializeOpDescribeCapacityReservation) HandleDeserialize out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -2047,10 +2187,6 @@ func (m *awsAwsquery_deserializeOpDescribeCapacityReservation) HandleDeserialize endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeCapacityReservation(response, &metadata) @@ -2151,6 +2287,18 @@ func (m *awsAwsquery_deserializeOpDescribeListenerAttributes) HandleDeserialize( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -2159,10 +2307,6 @@ func (m *awsAwsquery_deserializeOpDescribeListenerAttributes) HandleDeserialize( endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeListenerAttributes(response, &metadata) @@ -2263,6 +2407,18 @@ func (m *awsAwsquery_deserializeOpDescribeListenerCertificates) HandleDeserializ out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -2271,10 +2427,6 @@ func (m *awsAwsquery_deserializeOpDescribeListenerCertificates) HandleDeserializ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeListenerCertificates(response, &metadata) @@ -2375,6 +2527,18 @@ func (m *awsAwsquery_deserializeOpDescribeListeners) HandleDeserialize(ctx conte out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -2383,10 +2547,6 @@ func (m *awsAwsquery_deserializeOpDescribeListeners) HandleDeserialize(ctx conte endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeListeners(response, &metadata) @@ -2493,6 +2653,18 @@ func (m *awsAwsquery_deserializeOpDescribeLoadBalancerAttributes) HandleDeserial out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -2501,10 +2673,6 @@ func (m *awsAwsquery_deserializeOpDescribeLoadBalancerAttributes) HandleDeserial endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeLoadBalancerAttributes(response, &metadata) @@ -2605,6 +2773,18 @@ func (m *awsAwsquery_deserializeOpDescribeLoadBalancers) HandleDeserialize(ctx c out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -2613,10 +2793,6 @@ func (m *awsAwsquery_deserializeOpDescribeLoadBalancers) HandleDeserialize(ctx c endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeLoadBalancers(response, &metadata) @@ -2717,6 +2893,18 @@ func (m *awsAwsquery_deserializeOpDescribeRules) HandleDeserialize(ctx context.C out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -2725,10 +2913,6 @@ func (m *awsAwsquery_deserializeOpDescribeRules) HandleDeserialize(ctx context.C endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeRules(response, &metadata) @@ -2835,6 +3019,18 @@ func (m *awsAwsquery_deserializeOpDescribeSSLPolicies) HandleDeserialize(ctx con out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -2843,10 +3039,6 @@ func (m *awsAwsquery_deserializeOpDescribeSSLPolicies) HandleDeserialize(ctx con endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeSSLPolicies(response, &metadata) @@ -2947,6 +3139,18 @@ func (m *awsAwsquery_deserializeOpDescribeTags) HandleDeserialize(ctx context.Co out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -2955,10 +3159,6 @@ func (m *awsAwsquery_deserializeOpDescribeTags) HandleDeserialize(ctx context.Co endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeTags(response, &metadata) @@ -3071,6 +3271,18 @@ func (m *awsAwsquery_deserializeOpDescribeTargetGroupAttributes) HandleDeseriali out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -3079,10 +3291,6 @@ func (m *awsAwsquery_deserializeOpDescribeTargetGroupAttributes) HandleDeseriali endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeTargetGroupAttributes(response, &metadata) @@ -3183,6 +3391,18 @@ func (m *awsAwsquery_deserializeOpDescribeTargetGroups) HandleDeserialize(ctx co out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -3191,10 +3411,6 @@ func (m *awsAwsquery_deserializeOpDescribeTargetGroups) HandleDeserialize(ctx co endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeTargetGroups(response, &metadata) @@ -3298,6 +3514,18 @@ func (m *awsAwsquery_deserializeOpDescribeTargetHealth) HandleDeserialize(ctx co out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -3306,10 +3534,6 @@ func (m *awsAwsquery_deserializeOpDescribeTargetHealth) HandleDeserialize(ctx co endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeTargetHealth(response, &metadata) @@ -3416,6 +3640,18 @@ func (m *awsAwsquery_deserializeOpDescribeTrustStoreAssociations) HandleDeserial out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -3424,10 +3660,6 @@ func (m *awsAwsquery_deserializeOpDescribeTrustStoreAssociations) HandleDeserial endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeTrustStoreAssociations(response, &metadata) @@ -3528,6 +3760,18 @@ func (m *awsAwsquery_deserializeOpDescribeTrustStoreRevocations) HandleDeseriali out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -3536,10 +3780,6 @@ func (m *awsAwsquery_deserializeOpDescribeTrustStoreRevocations) HandleDeseriali endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeTrustStoreRevocations(response, &metadata) @@ -3643,6 +3883,18 @@ func (m *awsAwsquery_deserializeOpDescribeTrustStores) HandleDeserialize(ctx con out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -3651,10 +3903,6 @@ func (m *awsAwsquery_deserializeOpDescribeTrustStores) HandleDeserialize(ctx con endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorDescribeTrustStores(response, &metadata) @@ -3755,6 +4003,18 @@ func (m *awsAwsquery_deserializeOpGetResourcePolicy) HandleDeserialize(ctx conte out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -3763,10 +4023,6 @@ func (m *awsAwsquery_deserializeOpGetResourcePolicy) HandleDeserialize(ctx conte endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorGetResourcePolicy(response, &metadata) @@ -3867,6 +4123,18 @@ func (m *awsAwsquery_deserializeOpGetTrustStoreCaCertificatesBundle) HandleDeser out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -3875,10 +4143,6 @@ func (m *awsAwsquery_deserializeOpGetTrustStoreCaCertificatesBundle) HandleDeser endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorGetTrustStoreCaCertificatesBundle(response, &metadata) @@ -3979,6 +4243,18 @@ func (m *awsAwsquery_deserializeOpGetTrustStoreRevocationContent) HandleDeserial out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -3987,10 +4263,6 @@ func (m *awsAwsquery_deserializeOpGetTrustStoreRevocationContent) HandleDeserial endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorGetTrustStoreRevocationContent(response, &metadata) @@ -4094,6 +4366,18 @@ func (m *awsAwsquery_deserializeOpModifyCapacityReservation) HandleDeserialize(c out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -4102,10 +4386,6 @@ func (m *awsAwsquery_deserializeOpModifyCapacityReservation) HandleDeserialize(c endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorModifyCapacityReservation(response, &metadata) @@ -4227,6 +4507,18 @@ func (m *awsAwsquery_deserializeOpModifyIpPools) HandleDeserialize(ctx context.C out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -4235,10 +4527,6 @@ func (m *awsAwsquery_deserializeOpModifyIpPools) HandleDeserialize(ctx context.C endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorModifyIpPools(response, &metadata) @@ -4339,6 +4627,18 @@ func (m *awsAwsquery_deserializeOpModifyListener) HandleDeserialize(ctx context. out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -4347,10 +4647,6 @@ func (m *awsAwsquery_deserializeOpModifyListener) HandleDeserialize(ctx context. endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorModifyListener(response, &metadata) @@ -4505,6 +4801,18 @@ func (m *awsAwsquery_deserializeOpModifyListenerAttributes) HandleDeserialize(ct out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -4513,10 +4821,6 @@ func (m *awsAwsquery_deserializeOpModifyListenerAttributes) HandleDeserialize(ct endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorModifyListenerAttributes(response, &metadata) @@ -4620,6 +4924,18 @@ func (m *awsAwsquery_deserializeOpModifyLoadBalancerAttributes) HandleDeserializ out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -4628,10 +4944,6 @@ func (m *awsAwsquery_deserializeOpModifyLoadBalancerAttributes) HandleDeserializ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorModifyLoadBalancerAttributes(response, &metadata) @@ -4735,6 +5047,18 @@ func (m *awsAwsquery_deserializeOpModifyRule) HandleDeserialize(ctx context.Cont out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -4743,10 +5067,6 @@ func (m *awsAwsquery_deserializeOpModifyRule) HandleDeserialize(ctx context.Cont endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorModifyRule(response, &metadata) @@ -4877,6 +5197,18 @@ func (m *awsAwsquery_deserializeOpModifyTargetGroup) HandleDeserialize(ctx conte out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -4885,10 +5217,6 @@ func (m *awsAwsquery_deserializeOpModifyTargetGroup) HandleDeserialize(ctx conte endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorModifyTargetGroup(response, &metadata) @@ -4992,6 +5320,18 @@ func (m *awsAwsquery_deserializeOpModifyTargetGroupAttributes) HandleDeserialize out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -5000,10 +5340,6 @@ func (m *awsAwsquery_deserializeOpModifyTargetGroupAttributes) HandleDeserialize endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorModifyTargetGroupAttributes(response, &metadata) @@ -5107,6 +5443,18 @@ func (m *awsAwsquery_deserializeOpModifyTrustStore) HandleDeserialize(ctx contex out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -5115,10 +5463,6 @@ func (m *awsAwsquery_deserializeOpModifyTrustStore) HandleDeserialize(ctx contex endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorModifyTrustStore(response, &metadata) @@ -5225,6 +5569,18 @@ func (m *awsAwsquery_deserializeOpRegisterTargets) HandleDeserialize(ctx context out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -5233,10 +5589,6 @@ func (m *awsAwsquery_deserializeOpRegisterTargets) HandleDeserialize(ctx context endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorRegisterTargets(response, &metadata) @@ -5346,6 +5698,18 @@ func (m *awsAwsquery_deserializeOpRemoveListenerCertificates) HandleDeserialize( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -5354,10 +5718,6 @@ func (m *awsAwsquery_deserializeOpRemoveListenerCertificates) HandleDeserialize( endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorRemoveListenerCertificates(response, &metadata) @@ -5461,6 +5821,18 @@ func (m *awsAwsquery_deserializeOpRemoveTags) HandleDeserialize(ctx context.Cont out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -5469,10 +5841,6 @@ func (m *awsAwsquery_deserializeOpRemoveTags) HandleDeserialize(ctx context.Cont endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorRemoveTags(response, &metadata) @@ -5588,6 +5956,18 @@ func (m *awsAwsquery_deserializeOpRemoveTrustStoreRevocations) HandleDeserialize out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -5596,10 +5976,6 @@ func (m *awsAwsquery_deserializeOpRemoveTrustStoreRevocations) HandleDeserialize endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorRemoveTrustStoreRevocations(response, &metadata) @@ -5703,6 +6079,18 @@ func (m *awsAwsquery_deserializeOpSetIpAddressType) HandleDeserialize(ctx contex out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -5711,10 +6099,6 @@ func (m *awsAwsquery_deserializeOpSetIpAddressType) HandleDeserialize(ctx contex endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorSetIpAddressType(response, &metadata) @@ -5821,6 +6205,18 @@ func (m *awsAwsquery_deserializeOpSetRulePriorities) HandleDeserialize(ctx conte out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -5829,10 +6225,6 @@ func (m *awsAwsquery_deserializeOpSetRulePriorities) HandleDeserialize(ctx conte endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorSetRulePriorities(response, &metadata) @@ -5939,6 +6331,18 @@ func (m *awsAwsquery_deserializeOpSetSecurityGroups) HandleDeserialize(ctx conte out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -5947,10 +6351,6 @@ func (m *awsAwsquery_deserializeOpSetSecurityGroups) HandleDeserialize(ctx conte endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorSetSecurityGroups(response, &metadata) @@ -6057,6 +6457,18 @@ func (m *awsAwsquery_deserializeOpSetSubnets) HandleDeserialize(ctx context.Cont out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + if err != nil { + // Transport-level failure with no HTTP response to close. + return out, metadata, err + } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }() + if err != nil { return out, metadata, err } @@ -6065,10 +6477,6 @@ func (m *awsAwsquery_deserializeOpSetSubnets) HandleDeserialize(ctx context.Cont endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") defer endTimer() defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsquery_deserializeOpErrorSetSubnets(response, &metadata) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/go_module_metadata.go index ed005c24..e86ca342 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/go_module_metadata.go @@ -3,4 +3,4 @@ package elasticloadbalancingv2 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.57.0" +const goModuleVersion = "1.63.8" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/options.go index d2bdb99f..c9b63b66 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/options.go @@ -44,6 +44,11 @@ type Options struct { // clients initial default settings. DefaultsMode aws.DefaultsMode + // Disables SDK clock skew correction. When set, the SDK will not adjust request + // signing timestamps to compensate for clock drift between the client and the + // service. + DisableClockSkewCorrection bool + // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types/types.go index 80b10b51..7ef75de9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types/types.go @@ -550,6 +550,14 @@ type ListenerAttribute struct { // - tcp.idle_timeout.seconds - The tcp idle timeout value, in seconds. The valid // range is 60-6000 seconds. The default is 350 seconds. // + // The following attribute is only supported by Gateway Load Balancers: + // + // - send_tcp_reset.on_idle_timeout.enabled – Specifies whether the Gateway Load + // Balancer sends a TCP Reset to the sender of traffic when a TCP flow's idle + // timeout expires. This attribute also applies to non-SYN TCP packets received for + // flows that are not in the flow table. The value is true or false . The default + // is false . + // // The following attributes are only supported by Application Load Balancers. // // - routing.http.request.x_amzn_mtls_clientcert_serial_number.header_name - @@ -1118,24 +1126,30 @@ type Rule struct { // http-header and query-string . Note that the value for a condition can't be // empty. // +// For Network Load Balancer listener rules, the only supported condition is +// source-ip . Use SourceIpConfig with IpAddressType to match on the IP address +// type of the source traffic ( ipv4 or ipv6 ). +// // For more information, see [Quotas for your Application Load Balancers]. // // [Quotas for your Application Load Balancers]: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html type RuleCondition struct { - // The field in the HTTP request. The following are the possible values: + // The name of the field. The possible values are: // - // - http-header + // - http-header – [ALB] Matches on an HTTP header field. // - // - http-request-method + // - http-request-method – [ALB] Matches on the HTTP request method. // - // - host-header + // - host-header – [ALB] Matches on the host header. // - // - path-pattern + // - path-pattern – [ALB] Matches on the URL path of the request. // - // - query-string + // - query-string – [ALB] Matches on a query string parameter. // - // - source-ip + // - source-ip – [ALB, NLB] Matches on the source IP address. For ALB, use + // SourceIpConfig with Values to specify CIDR ranges. For NLB, use SourceIpConfig + // with IpAddressType to match the IP address type ( ipv4 or ipv6 ). Field *string // Information for a host header condition. Specify only when Field is host-header . @@ -1242,6 +1256,10 @@ type RuleTransform struct { // You can use this condition to route based on the IP address of the source that // connects to the load balancer. If a client is behind a proxy, this is the IP // address of the proxy not the IP address of the client. +// +// For Application Load Balancers, use Values to specify CIDR ranges. For Network +// Load Balancers, use IpAddressType to match on the IP address type of the source +// traffic. type SourceIpConditionConfig struct { // The IP address type for Network Load Balancers. @@ -1613,6 +1631,22 @@ type TargetGroupAttribute struct { // rebalance and no_rebalance . The default is no_rebalance . The two attributes ( // target_failover.on_deregistration and target_failover.on_unhealthy ) can't be // set independently. The value you set for both attributes must be the same. + // + // - send_tcp_reset.on_unhealthy.enabled – Specifies whether the Gateway Load + // Balancer sends a TCP Reset to the sender of traffic when a target becomes + // unhealthy. After sending the reset, the Gateway Load Balancer removes the flow + // entry from its flow table. The value is true or false . The default is false . + // This attribute does not apply when target_failover.on_unhealthy is set to + // rebalance . This feature requires 5-tuple flow stickiness, which the target + // group uses by default when stickiness.enabled is set to false . + // + // - send_tcp_reset.on_deregistration.enabled – Specifies whether the Gateway + // Load Balancer sends a TCP Reset to the sender of traffic when a target is + // deregistered. The reset occurs after the connection drain time has elapsed. The + // value is true or false . The default is false . This attribute does not apply + // when target_failover.on_deregistration is set to rebalance . This feature + // requires 5-tuple flow stickiness, which the target group uses by default when + // stickiness.enabled is set to false . Key *string // The value of the attribute. diff --git a/vendor/modules.txt b/vendor/modules.txt index 9a6bc044..a18adefb 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -45,10 +45,10 @@ github.com/aws/aws-sdk-go-v2/credentials/stscreds ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config -# github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.8 +# github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.10 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.8 +# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.10 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 # github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.8 @@ -61,7 +61,7 @@ github.com/aws/aws-sdk-go-v2/internal/v4a/internal/v4 github.com/aws/aws-sdk-go-v2/service/ec2 github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ec2/types -# github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.57.0 +# github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.63.8 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/internal/endpoints From c54fecbe8de075bace6f582d680a367cef0d8874 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Nov 2026 00:33:08 +0000 Subject: [PATCH 7/9] chore(deps): Bump github.com/onsi/ginkgo/v2 from 2.33.1 to 2.34.0 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.33.1 to 2.34.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.33.1...v2.34.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-version: 2.34.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: Carlos Eduardo Arango Gutierrez --- go.mod | 2 +- go.sum | 4 +- vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md | 9 + vendor/github.com/onsi/ginkgo/v2/core_dsl.go | 44 ++++ .../github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go | 2 + .../onsi/ginkgo/v2/internal/group.go | 150 +++++++---- .../onsi/ginkgo/v2/internal/node.go | 24 +- .../onsi/ginkgo/v2/internal/suite.go | 248 +++++++++++++++--- .../internal/testingtproxy/testing_t_proxy.go | 9 +- .../github.com/onsi/ginkgo/v2/types/errors.go | 46 ++++ .../github.com/onsi/ginkgo/v2/types/types.go | 12 +- .../onsi/ginkgo/v2/types/version.go | 2 +- vendor/modules.txt | 2 +- 13 files changed, 451 insertions(+), 103 deletions(-) diff --git a/go.mod b/go.mod index a59724f9..5013f2e7 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.63.8 github.com/aws/aws-sdk-go-v2/service/ssm v1.81.2 github.com/mattn/go-isatty v0.0.24 - github.com/onsi/ginkgo/v2 v2.33.1 + github.com/onsi/ginkgo/v2 v2.34.0 github.com/onsi/gomega v1.44.0 github.com/pkg/sftp v1.13.11 github.com/stretchr/testify v1.12.1 diff --git a/go.sum b/go.sum index 088fa983..22ba5f46 100644 --- a/go.sum +++ b/go.sum @@ -79,8 +79,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/onsi/ginkgo/v2 v2.33.1 h1:62XfWJbEIjPSCSDYrsCPP/SHcmH7O0M8ne8zfqQ2iz4= -github.com/onsi/ginkgo/v2 v2.33.1/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44= +github.com/onsi/ginkgo/v2 v2.34.0 h1:aN3Us823mHHTSWMIi8WIQTdYuSPhl2lWY46E/w3SiAk= +github.com/onsi/ginkgo/v2 v2.34.0/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44= github.com/onsi/gomega v1.44.0 h1:eAiGl3Pw5jz5GQdDff0BcxYpAX1JxW8xD7mFUuwNfZQ= github.com/onsi/gomega v1.44.0/go.mod h1:e/C2HwaZ1DhvjzXXuFhcR7hY7Sh9pl7MmoWKEjzwcdA= github.com/pkg/sftp v1.13.11 h1:0N92SLTB8JqASJB14ZLHHzFnBV8mG9zw4K7jghEFWuE= diff --git a/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md b/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md index a5c6fb86..0679ee9b 100644 --- a/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md +++ b/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md @@ -6,6 +6,15 @@ ### Maintenance +## 2.34.0 + +### Features +- `DeferOnFailure` registers a callback that runs only when a spec fails - as soon as the failing node returns and before any teardown (`JustAfterEach`, `AfterEach`, `AfterAll`, `DeferCleanup`) - so it can capture the state teardown is about to destroy. It takes exactly what `DeferCleanup` takes and shares its scoping: called in `BeforeEach`/`JustBeforeEach`/`It` it covers the spec, in `BeforeAll` the ordered container, and in `BeforeSuite` the whole suite. It is also available on `GinkgoT()`; note that this adds a method to `FullGinkgoTInterface`, so hand-written implementations of that interface need to add it. See https://onsi.github.io/ginkgo/#capturing-failure-state-deferonfailure + +### Fixes +- Progress reporters (`AttachProgressReporter`) are no longer called while Ginkgo holds an internal lock, so a reporter that calls `CurrentSpecReport()` or `AddReportEntry()` no longer stalls for 5 seconds and has its output dropped. +- `--sleep-on-failure` now runs after any `DeferOnFailure` callbacks, also pauses when a spec times out, and no longer pauses if the suite has already been interrupted. + ## 2.33.1 ### Fixes diff --git a/vendor/github.com/onsi/ginkgo/v2/core_dsl.go b/vendor/github.com/onsi/ginkgo/v2/core_dsl.go index fb5761c1..dc16a23c 100644 --- a/vendor/github.com/onsi/ginkgo/v2/core_dsl.go +++ b/vendor/github.com/onsi/ginkgo/v2/core_dsl.go @@ -883,6 +883,50 @@ func DeferCleanup(args ...any) { pushNode(internal.NewCleanupNode(deprecationTracker, fail, args...)) } +/* +DeferOnFailure registers a callback that Ginkgo runs if - and only if - the spec fails. The callback runs as soon as the +failure is recorded and before any of the spec's teardown (JustAfterEach, AfterEach, AfterAll, DeferCleanup) runs, so it +sees the system in the state it was in when the spec failed. This makes it the right place to capture failure artifacts: +screenshots, logs, dumps of cluster state, etc. + + BeforeEach(func(ctx SpecContext) { + browser := StartBrowser(ctx) + DeferOnFailure(func(ctx SpecContext) { + AddReportEntry("screenshot", browser.Screenshot(ctx), ReportEntryVisibilityFailureOrVerbose) + }, NodeTimeout(10*time.Second)) + DeferCleanup(browser.Close) + }) + +DeferOnFailure accepts exactly what DeferCleanup accepts: any function, along with arguments to pass to it. If the function's +last return value is a non-nil error the callback fails. If the function's first parameter is a SpecContext (or a +context.Context that you don't provide yourself) the callback is interruptible: Ginkgo cancels its context when the callback's +NodeTimeout elapses or when the suite is interrupted. By default a callback gets one GracePeriod to run - pass NodeTimeout to +change that. The spec's own SpecTimeout does not apply to the callback. DeferOnFailure also accepts the GracePeriod, +PollProgressAfter, PollProgressInterval, and Offset decorators. + +DeferOnFailure callbacks share the lifetime of DeferCleanup: + +When DeferOnFailure is called in BeforeEach, JustBeforeEach, or It the callback covers the current spec. +When DeferOnFailure is called in BeforeAll (or in a BeforeEach marked OncePerOrdered) the callback covers every spec in the ordered container. +When DeferOnFailure is called in BeforeSuite or in the all-processes function of SynchronizedBeforeSuite the callback covers every spec in the suite, as well as the suite-level setup and teardown nodes. + +The callbacks run at most once per spec attempt, on the first failure: a failed assertion, a panic, a timeout, an AbortSuite, +or the first interrupt. If the first failure occurs during teardown the callbacks run right after the failing node and +before the rest of the teardown. When several callbacks are registered they run in reverse order of registration, just +like DeferCleanup. A callback that fails is recorded as an additional failure on the spec, and the remaining callbacks +and teardown still run. + +When --sleep-on-failure is set, Ginkgo pauses after all DeferOnFailure callbacks have run. + +You can learn more about DeferOnFailure here: https://onsi.github.io/ginkgo/#capturing-failure-state-deferonfailure +*/ +func DeferOnFailure(args ...any) { + fail := func(message string, cl types.CodeLocation) { + global.Failer.Fail(message, cl) + } + pushNode(internal.NewOnFailureNode(deprecationTracker, fail, args...)) +} + /* AttachProgressReporter allows you to register a function that will be called whenever Ginkgo generates a Progress Report. The contents returned by the function will be included in the report. diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go index db3e2484..0134f25b 100644 --- a/vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go @@ -34,6 +34,7 @@ func GinkgoT(optionalOffset ...int) FullGinkgoTInterface { Fail, Skip, DeferCleanup, + DeferOnFailure, CurrentSpecReport, AddReportEntry, GinkgoRecover, @@ -100,6 +101,7 @@ type FullGinkgoTInterface interface { GinkgoRecover() DeferCleanup(args ...any) + DeferOnFailure(args ...any) RandomSeed() int64 ParallelProcess() int diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/group.go b/vendor/github.com/onsi/ginkgo/v2/internal/group.go index 781adf6f..eb48b644 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/group.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/group.go @@ -241,6 +241,17 @@ func (g *group) attemptSpec(isFinalAttempt bool, spec Spec) bool { deadline = time.Now().Add(spec.SpecTimeout()) } + // DeferOnFailure callbacks run at most once per attempt, as soon as the first failure is recorded - + // before any (remaining) teardown runs + firedOnFailure := false + fireOnFailureIfNeeded := func() { + if firedOnFailure || !g.suite.shouldFireOnFailure(g.suite.currentSpecReport.State) { + return + } + firedOnFailure = true + g.suite.runOnFailureNodes(spec.Nodes.BestTextFor) + } + for _, node := range nodes { oncePair := pairs.runOncePairFor(node.ID) if !oncePair.isZero() && g.runOnceTracker[oncePair].Is(types.SpecStatePassed) { @@ -254,11 +265,70 @@ func (g *group) attemptSpec(isFinalAttempt bool, spec Spec) bool { if g.suite.currentSpecReport.State != types.SpecStatePassed { terminatingNode, terminatingPair = node, oncePair failedInARunOnceBefore = !terminatingPair.isZero() + fireOnFailureIfNeeded() break } } afterNodeWasRun := map[uint]bool{} + onFailureScopeEnded := map[uint]bool{} + + // scopeEndsNow decides whether an after node (AfterEach, AfterAll, JustAfterEach), a DeferCleanup node, or + // a DeferOnFailure registration has reached the end of its scope on this attempt. After and cleanup nodes + // run when it does; DeferOnFailure registrations are dropped. + scopeEndsNow := func(node Node) bool { + var pair runOncePair + switch node.NodeType { + case types.NodeTypeCleanupAfterEach, types.NodeTypeCleanupAfterAll, types.NodeTypeOnFailureEach, types.NodeTypeOnFailureAll: + // check if we were generated in an AfterNode that has already run + if afterNodeWasRun[node.NodeIDWhereCleanupWasGenerated] { + return true // we were, so we should definitely run this cleanup now + } + // looks like this cleanup nodes was generated by a before node or it. + // the run-once status of a cleanup node is governed by the run-once status of its generator + pair = pairs.runOncePairFor(node.NodeIDWhereCleanupWasGenerated) + default: + pair = pairs.runOncePairFor(node.ID) + } + if pair.isZero() { + // this node is not governed by any run-once policy, we should run it + return true + } + // it's our last chance to run if we're the last spec for our oncePair + isLastSpecWithPair := g.isLastSpecWithPair(spec.SubjectID(), pair) + willRunAnotherAttempt := g.willRunAnotherAttempt(isFinalAttempt) + + switch g.suite.currentSpecReport.State { + case types.SpecStatePassed: //this attempt is passing... + return isLastSpecWithPair && !willRunAnotherAttempt //...we should run-once if this is our last chance + case types.SpecStateSkipped: //the spec was skipped by the user... + if isLastSpecWithPair { + return true //...we're the last spec, so we should run the AfterNode + } + if !terminatingPair.isZero() && terminatingNode.NestingLevel == node.NestingLevel { + return true //...or, a run-once node at our nesting level was skipped which means this is our last chance to run + } + case types.SpecStateFailed, types.SpecStatePanicked, types.SpecStateTimedout: // the spec has failed... + if !willRunAnotherAttempt { + if g.continueOnFailure { + return isLastSpecWithPair || failedInARunOnceBefore //...we're configured to continue on failures - so we should only run if we're the last spec for this pair or if we failed in a runOnceBefore (which means we _are_ the last spec to run) + } else { + return true //...this was the last attempt and continueOnFailure is false therefore we are the last spec to run and so the AfterNode should run + } + } + if !terminatingPair.isZero() { // ...and it failed in a run-once. which will be running again + if node.NodeType.Is(types.NodeTypeCleanupAfterEach | types.NodeTypeCleanupAfterAll | types.NodeTypeOnFailureEach | types.NodeTypeOnFailureAll) { + return terminatingNode.ID == node.NodeIDWhereCleanupWasGenerated // we should run this node if we're a clean-up generated by it + } else { + return terminatingNode.NestingLevel == node.NestingLevel // ...or if we're at the same nesting level + } + } + case types.SpecStateInterrupted, types.SpecStateAborted: // ...we've been interrupted and/or aborted + return true //...that means the test run is over and we should clean up the stack. Run the AfterNode + } + return false + } + includeDeferCleanups := false for { nodes := spec.Nodes.WithType(types.NodeTypeAfterEach) @@ -276,57 +346,19 @@ func (g *group) attemptSpec(isFinalAttempt bool, spec Spec) bool { //this node has already been run on this attempt, don't rerun it return false } - var pair runOncePair - switch node.NodeType { - case types.NodeTypeCleanupAfterEach, types.NodeTypeCleanupAfterAll: - // check if we were generated in an AfterNode that has already run - if afterNodeWasRun[node.NodeIDWhereCleanupWasGenerated] { - return true // we were, so we should definitely run this cleanup now - } - // looks like this cleanup nodes was generated by a before node or it. - // the run-once status of a cleanup node is governed by the run-once status of its generator - pair = pairs.runOncePairFor(node.NodeIDWhereCleanupWasGenerated) - default: - pair = pairs.runOncePairFor(node.ID) - } - if pair.isZero() { - // this node is not governed by any run-once policy, we should run it - return true - } - // it's our last chance to run if we're the last spec for our oncePair - isLastSpecWithPair := g.isLastSpecWithPair(spec.SubjectID(), pair) - willRunAnotherAttempt := g.willRunAnotherAttempt(isFinalAttempt) - - switch g.suite.currentSpecReport.State { - case types.SpecStatePassed: //this attempt is passing... - return isLastSpecWithPair && !willRunAnotherAttempt //...we should run-once if this is our last chance - case types.SpecStateSkipped: //the spec was skipped by the user... - if isLastSpecWithPair { - return true //...we're the last spec, so we should run the AfterNode - } - if !terminatingPair.isZero() && terminatingNode.NestingLevel == node.NestingLevel { - return true //...or, a run-once node at our nesting level was skipped which means this is our last chance to run - } - case types.SpecStateFailed, types.SpecStatePanicked, types.SpecStateTimedout: // the spec has failed... - if !willRunAnotherAttempt { - if g.continueOnFailure { - return isLastSpecWithPair || failedInARunOnceBefore //...we're configured to continue on failures - so we should only run if we're the last spec for this pair or if we failed in a runOnceBefore (which means we _are_ the last spec to run) - } else { - return true //...this was the last attempt and continueOnFailure is false therefore we are the last spec to run and so the AfterNode should run - } - } - if !terminatingPair.isZero() { // ...and it failed in a run-once. which will be running again - if node.NodeType.Is(types.NodeTypeCleanupAfterEach | types.NodeTypeCleanupAfterAll) { - return terminatingNode.ID == node.NodeIDWhereCleanupWasGenerated // we should run this node if we're a clean-up generated by it - } else { - return terminatingNode.NestingLevel == node.NestingLevel // ...or if we're at the same nesting level - } + return scopeEndsNow(node) + }) + if includeDeferCleanups { + // note the DeferOnFailure registrations whose scope ends now - the moment the matching cleanups are selected. + // a scope that ends during this attempt stays ended, even if a failing cleanup later changes the spec's state + g.suite.selectiveLock.Lock() + for _, node := range g.suite.onFailureNodes { + if node.NodeType.Is(types.NodeTypeOnFailureEach|types.NodeTypeOnFailureAll) && scopeEndsNow(node) { + onFailureScopeEnded[node.ID] = true } - case types.SpecStateInterrupted, types.SpecStateAborted: // ...we've been interrupted and/or aborted - return true //...that means the test run is over and we should clean up the stack. Run the AfterNode } - return false - }) + g.suite.selectiveLock.Unlock() + } if len(nodes) == 0 && includeDeferCleanups { break @@ -342,10 +374,23 @@ func (g *group) attemptSpec(isFinalAttempt bool, spec Spec) bool { } else if state.Is(types.SpecStateFailureStates) { g.suite.currentSpecReport.AdditionalFailures = append(g.suite.currentSpecReport.AdditionalFailures, types.AdditionalFailure{State: state, Failure: failure}) } + // if this teardown node recorded the attempt's first failure, run the DeferOnFailure callbacks before the rest of teardown + fireOnFailureIfNeeded() } includeDeferCleanups = true } + // drop the DeferOnFailure registrations whose scope ended with this attempt. A registration shares the lifetime + // of a DeferCleanup registered by the same node: if such a cleanup would have run on this attempt, the registration is done. + g.suite.selectiveLock.Lock() + g.suite.onFailureNodes = g.suite.onFailureNodes.Filter(func(node Node) bool { + if !node.NodeType.Is(types.NodeTypeOnFailureEach | types.NodeTypeOnFailureAll) { + return true // suite-scoped registrations live for the whole suite + } + return !(onFailureScopeEnded[node.ID] || scopeEndsNow(node)) + }) + g.suite.selectiveLock.Unlock() + return failedInARunOnceBefore } @@ -431,4 +476,11 @@ func (g *group) run(specs Specs) { g.suite.currentSpecReport = types.SpecReport{} g.suite.selectiveLock.Unlock() } + + // no Each- or All-scoped DeferOnFailure registration outlives its group + g.suite.selectiveLock.Lock() + g.suite.onFailureNodes = g.suite.onFailureNodes.Filter(func(node Node) bool { + return !node.NodeType.Is(types.NodeTypeOnFailureEach | types.NodeTypeOnFailureAll) + }) + g.suite.selectiveLock.Unlock() } diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/node.go b/vendor/github.com/onsi/ginkgo/v2/internal/node.go index b0c8de8d..26a40da9 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/node.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/node.go @@ -647,8 +647,22 @@ func extractSynchronizedBeforeSuiteAllProcsBody(arg any) (func(SpecContext, []by var errInterface = reflect.TypeOf((*error)(nil)).Elem() func NewCleanupNode(deprecationTracker *types.DeprecationTracker, fail func(string, types.CodeLocation), args ...any) (Node, []error) { + return newDeferredNode(deprecationTracker, fail, types.NodeTypeCleanupInvalid, "DeferCleanup", types.GinkgoErrors.DeferCleanupInvalidFunction, args...) +} + +/* +NewOnFailureNode constructs the node registered by DeferOnFailure. DeferOnFailure accepts exactly what DeferCleanup accepts. +Like a cleanup node it is generated dynamically during the run phase - the suite assigns its final node type (and therefore +its scope) when it is pushed, based on the node that registered it. +*/ +func NewOnFailureNode(deprecationTracker *types.DeprecationTracker, fail func(string, types.CodeLocation), args ...any) (Node, []error) { + return newDeferredNode(deprecationTracker, fail, types.NodeTypeOnFailureInvalid, "DeferOnFailure", types.GinkgoErrors.DeferOnFailureInvalidFunction, args...) +} + +// newDeferredNode implements the shared argument handling of DeferCleanup and DeferOnFailure +func newDeferredNode(deprecationTracker *types.DeprecationTracker, fail func(string, types.CodeLocation), nodeType types.NodeType, name string, invalidFunctionError func(types.CodeLocation) error, args ...any) (Node, []error) { decorations, remainingArgs := PartitionDecorations(args...) - baseOffset := 2 + baseOffset := 3 // newDeferredNode -> NewCleanupNode/NewOnFailureNode -> DeferCleanup/DeferOnFailure -> user code cl := types.NewCodeLocation(baseOffset) finalArgs := []any{} for _, arg := range decorations { @@ -664,12 +678,12 @@ func NewCleanupNode(deprecationTracker *types.DeprecationTracker, fail func(stri finalArgs = append(finalArgs, cl) if len(remainingArgs) == 0 { - return Node{}, []error{types.GinkgoErrors.DeferCleanupInvalidFunction(cl)} + return Node{}, []error{invalidFunctionError(cl)} } callback := reflect.ValueOf(remainingArgs[0]) if !(callback.Kind() == reflect.Func) { - return Node{}, []error{types.GinkgoErrors.DeferCleanupInvalidFunction(cl)} + return Node{}, []error{invalidFunctionError(cl)} } callArgs := []reflect.Value{} @@ -693,7 +707,7 @@ func NewCleanupNode(deprecationTracker *types.DeprecationTracker, fail func(stri } last := out[len(out)-1] if last.Type().Implements(errInterface) && !last.IsNil() { - fail(fmt.Sprintf("DeferCleanup callback returned error: %v", last), cl) + fail(fmt.Sprintf("%s callback returned error: %v", name, last), cl) } } @@ -709,7 +723,7 @@ func NewCleanupNode(deprecationTracker *types.DeprecationTracker, fail func(stri }) } - return NewNode(deprecationTracker, types.NodeTypeCleanupInvalid, "", finalArgs) + return NewNode(deprecationTracker, nodeType, "", finalArgs) } func (n Node) IsZero() bool { diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/suite.go b/vendor/github.com/onsi/ginkgo/v2/internal/suite.go index 6c879855..02a58e55 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/suite.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/suite.go @@ -34,6 +34,17 @@ type Suite struct { cleanupNodes Nodes aroundNodes types.AroundNodes + // onFailureNodes holds the callbacks registered with DeferOnFailure, in registration order. + // Suite-scoped nodes live for the whole suite; Each- and All-scoped nodes are dropped by the group + // when the scope of the node that registered them ends (see group.attemptSpec). + onFailureNodes Nodes + // sleepOnFailureNodeID identifies the internal DeferOnFailure node that implements --sleep-on-failure + sleepOnFailureNodeID uint + // onFailureTriggerNodeType is the type of the node whose failure triggered the DeferOnFailure callbacks that are running + onFailureTriggerNodeType types.NodeType + // runningSynchronizedBeforeSuiteProc1Body is true while the proc-1-only function of SynchronizedBeforeSuite runs + runningSynchronizedBeforeSuiteProc1Body bool + failer *Failer reporter reporters.Reporter writer WriterInterface @@ -131,6 +142,10 @@ func (suite *Suite) Run(description string, suiteLabels Labels, suiteSemVerConst suite.deadline = time.Now().Add(suite.config.Timeout) } + if suite.config.SleepOnFailure > 0 { + suite.registerSleepOnFailureNode() + } + cancelProgressHandler := progressSignalRegistrar(suite.handleProgressSignal) success := suite.runSpecs(description, suiteLabels, suiteSemVerConstraints, suiteComponentSemVerConstraints, suitePath, hasProgrammaticFocus, specs) @@ -155,6 +170,10 @@ func (suite *Suite) PushNode(node Node) error { return suite.pushCleanupNode(node) } + if node.NodeType.Is(types.NodeTypesForOnFailure) { + return suite.pushOnFailureNode(node) + } + if node.NodeType.Is(types.NodeTypeBeforeSuite | types.NodeTypeAfterSuite | types.NodeTypeSynchronizedBeforeSuite | types.NodeTypeSynchronizedAfterSuite | types.NodeTypeBeforeSuite | types.NodeTypeReportBeforeSuite | types.NodeTypeReportAfterSuite) { return suite.pushSuiteNode(node) } @@ -270,6 +289,8 @@ func (suite *Suite) pushCleanupNode(node Node) error { return types.GinkgoErrors.PushingCleanupInReportingNode(node.CodeLocation, suite.currentNode.NodeType) case types.NodeTypeCleanupInvalid, types.NodeTypeCleanupAfterEach, types.NodeTypeCleanupAfterAll, types.NodeTypeCleanupAfterSuite: return types.GinkgoErrors.PushingCleanupInCleanupNode(node.CodeLocation) + case types.NodeTypeOnFailureInvalid, types.NodeTypeOnFailureEach, types.NodeTypeOnFailureAll, types.NodeTypeOnFailureSuite: + return types.GinkgoErrors.PushingCleanupInOnFailureNode(node.CodeLocation) default: node.NodeType = types.NodeTypeCleanupAfterEach } @@ -284,6 +305,151 @@ func (suite *Suite) pushCleanupNode(node Node) error { return nil } +func (suite *Suite) pushOnFailureNode(node Node) error { + // hold the lock for the whole registration: DeferOnFailure may be called from a goroutine spawned by the + // current node, and runNode updates currentNode under this lock + suite.selectiveLock.Lock() + defer suite.selectiveLock.Unlock() + + currentNode := suite.currentNode + if suite.phase != PhaseRun || currentNode.IsZero() { + return types.GinkgoErrors.PushingOnFailureNodeDuringTreeConstruction(node.CodeLocation) + } + + switch currentNode.NodeType { + case types.NodeTypeBeforeSuite: + node.NodeType = types.NodeTypeOnFailureSuite + case types.NodeTypeSynchronizedBeforeSuite: + if suite.runningSynchronizedBeforeSuiteProc1Body { + return types.GinkgoErrors.PushingOnFailureNodeInSynchronizedBeforeSuiteProc1(node.CodeLocation) + } + node.NodeType = types.NodeTypeOnFailureSuite + case types.NodeTypeBeforeAll: + node.NodeType = types.NodeTypeOnFailureAll + case types.NodeTypeBeforeEach, types.NodeTypeJustBeforeEach, types.NodeTypeIt: + // BeforeEach/JustBeforeEach nodes marked OncePerOrdered are governed by their run-once pair, just like DeferCleanup + node.NodeType = types.NodeTypeOnFailureEach + default: + return types.GinkgoErrors.PushingOnFailureNodeInInvalidNode(node.CodeLocation, currentNode.NodeType) + } + + node.NodeIDWhereCleanupWasGenerated = currentNode.ID + node.NestingLevel = currentNode.NestingLevel + node.AroundNodes = types.AroundNodes{}.Append(currentNode.AroundNodes...).Append(node.AroundNodes...) + if node.NodeTimeout == 0 { + // on-failure callbacks are diagnostic and must not hang the suite: bound them by one GracePeriod unless told otherwise + node.NodeTimeout = suite.config.GracePeriod + } + suite.onFailureNodes = append(suite.onFailureNodes, node) + + return nil +} + +/* +registerSleepOnFailureNode implements --sleep-on-failure as an internal, suite-scoped DeferOnFailure callback. + +It is registered before anything else, so it is the oldest registration and - because on-failure callbacks run +newest-first - it always runs last: every user and library callback captures the failed state first, and +then Ginkgo pauses with the system still live for inspection. +*/ +func (suite *Suite) registerSleepOnFailureNode() { + node := Node{ + ID: UniqueNodeID(), + NodeType: types.NodeTypeOnFailureSuite, + Text: "--sleep-on-failure", + CodeLocation: types.NewCustomCodeLocation("--sleep-on-failure"), + NestingLevel: -1, + HasContext: true, + PollProgressAfter: 0, // don't poll for progress while paused + PollProgressInterval: -1, + GracePeriod: -1, + Body: suite.sleepOnFailure, + } + suite.sleepOnFailureNodeID = node.ID + suite.onFailureNodes = append(Nodes{node}, suite.onFailureNodes...) +} + +func (suite *Suite) sleepOnFailure(ctx SpecContext) { + // only pause for failures in setup and subject nodes (It, Before*, BeforeSuite...). Pausing on a failure + // in a teardown, cleanup, or reporting node would be pointless: the system is already being torn down. + // (we look at the failure that triggered the callbacks: an earlier callback may since have replaced it, e.g. by calling AbortSuite) + suite.selectiveLock.Lock() + failureNodeType := suite.onFailureTriggerNodeType + suite.selectiveLock.Unlock() + if failureNodeType.Is(types.NodeTypesAllowedDuringCleanupInterrupt | types.NodeTypesAllowedDuringReportInterrupt) { + return + } + // once the user has interrupted the suite (whether to trigger these callbacks or while they ran) they want Ginkgo to + // move on: pausing now would ask them to interrupt again, and a second interrupt skips cleanup + if suite.interruptHandler.Status().Interrupted() { + return + } + + duration := suite.config.SleepOnFailure + report := suite.generateProgressReport(false) + report.Message = fmt.Sprintf("{{bold}}{{orange}}Paused on failure for up to %s.{{/}}\nThe spec failed and Ginkgo has paused before running any teardown so you can inspect the live system.\nPress {{bold}}^C{{/}} to end the pause and proceed to cleanup.", duration) + suite.emitProgressReport(report) + + timer := time.NewTimer(duration) + defer timer.Stop() + // wait for the pause to elapse, or for the context to be cancelled (e.g. by the user interrupting + // the suite) - in which case we end the pause early so cleanup can proceed + select { + case <-timer.C: + case <-ctx.Done(): + } +} + +/* +shouldFireOnFailure decides whether the outcome of a node should trigger the DeferOnFailure callbacks. + +Failures, panics, timeouts (spec, node, and suite) and aborts all fire. Interrupts only fire when they come from the +user's first signal: that is the level at which Ginkgo still runs cleanup. Subsequent signals (which skip cleanup) and +interrupts caused by another process aborting (this spec did not fail - it's collateral) do not fire. +*/ +func (suite *Suite) shouldFireOnFailure(state types.SpecState) bool { + if state.Is(types.SpecStateFailed | types.SpecStatePanicked | types.SpecStateTimedout | types.SpecStateAborted) { + return true + } + if state.Is(types.SpecStateInterrupted) { + status := suite.interruptHandler.Status() + return status.Cause == interrupt_handler.InterruptCauseSignal && status.Level == interrupt_handler.InterruptLevelCleanupAndReport + } + return false +} + +/* +runOnFailureNodes runs every registered DeferOnFailure callback, newest first, and folds their outcomes into the +current spec report. A failing callback is recorded as an additional failure - it never replaces the failure that +triggered it - though an AbortSuite in a callback is honored. + +This is called by the group (and by runSuiteNode) between nodes, so no Ginkgo lock is held while the callbacks run. +*/ +func (suite *Suite) runOnFailureNodes(textFor func(Node) string) { + suite.selectiveLock.Lock() + nodes := suite.onFailureNodes.Reverse() + suite.onFailureTriggerNodeType = suite.currentSpecReport.Failure.FailureNodeType + suite.selectiveLock.Unlock() + + for _, node := range nodes { + state, failure := suite.runNode(node, time.Time{}, textFor(node)) + if node.ID == suite.sleepOnFailureNodeID { + // the pause's own outcome (e.g. the user interrupting it) never affects the spec + continue + } + // a callback can call AbortSuite directly, or after it has timed out (in which case the abort is recorded as the timeout's additional failure) + aborted := state == types.SpecStateAborted || (failure.AdditionalFailure != nil && failure.AdditionalFailure.State == types.SpecStateAborted) + if aborted && suite.currentSpecReport.State != types.SpecStateAborted { + // honor the abort, but keep the failure that triggered the callbacks rather than replacing it + suite.currentSpecReport.AdditionalFailures = append(suite.currentSpecReport.AdditionalFailures, types.AdditionalFailure{State: suite.currentSpecReport.State, Failure: suite.currentSpecReport.Failure}) + suite.currentSpecReport.State = types.SpecStateAborted + suite.currentSpecReport.Failure = failure + } else if state.Is(types.SpecStateFailureStates) { + suite.currentSpecReport.AdditionalFailures = append(suite.currentSpecReport.AdditionalFailures, types.AdditionalFailure{State: state, Failure: failure}) + } + } +} + func (suite *Suite) generateTimelineLocation() types.TimelineLocation { suite.selectiveLock.Lock() defer suite.selectiveLock.Unlock() @@ -395,18 +561,28 @@ func (suite *Suite) AddReportEntry(entry ReportEntry) error { func (suite *Suite) generateProgressReport(fullReport bool) types.ProgressReport { timelineLocation := suite.generateTimelineLocation() + + // snapshot the state we need under the lock... suite.selectiveLock.Lock() - defer suite.selectiveLock.Unlock() + currentSpecContext := suite.currentSpecContext + currentSpecReport := suite.currentSpecReport + currentNode := suite.currentNode + currentNodeStartTime := suite.currentNodeStartTime + currentByStep := suite.currentByStep + gwOutput := suite.currentSpecReport.CapturedGinkgoWriterOutput + string(suite.writer.Bytes()) + suite.selectiveLock.Unlock() + // ...and query the progress reporters *without* holding it. Reporters are user code and + // are free to call back into Ginkgo (e.g. CurrentSpecReport() or AddReportEntry()), both of + // which take selectiveLock. Holding the lock here would deadlock them until the deadline. deadline, cancel := context.WithTimeout(context.Background(), ProgressReporterDeadline) defer cancel() var additionalReports []string - if suite.currentSpecContext != nil { - additionalReports = append(additionalReports, suite.currentSpecContext.QueryProgressReporters(deadline, suite.failer)...) + if currentSpecContext != nil { + additionalReports = append(additionalReports, currentSpecContext.QueryProgressReporters(deadline, suite.failer)...) } additionalReports = append(additionalReports, suite.QueryProgressReporters(deadline, suite.failer)...) - gwOutput := suite.currentSpecReport.CapturedGinkgoWriterOutput + string(suite.writer.Bytes()) - pr, err := NewProgressReport(suite.isRunningInParallel(), suite.currentSpecReport, suite.currentNode, suite.currentNodeStartTime, suite.currentByStep, gwOutput, timelineLocation, additionalReports, suite.config.SourceRoots, fullReport) + pr, err := NewProgressReport(suite.isRunningInParallel(), currentSpecReport, currentNode, currentNodeStartTime, currentByStep, gwOutput, timelineLocation, additionalReports, suite.config.SourceRoots, fullReport) if err != nil { fmt.Printf("{{red}}Failed to generate progress report:{{/}}\n%s\n", err.Error()) @@ -655,6 +831,16 @@ func (suite *Suite) runSuiteNode(node Node) { suite.outputInterceptor.StartInterceptingOutput() suite.currentSpecReport.StartTime = time.Now() + // if this suite-level node fails, run any (suite-scoped) DeferOnFailure callbacks - once, and before any further teardown + firedOnFailure := false + fireOnFailureIfNeeded := func() { + if firedOnFailure || !suite.shouldFireOnFailure(suite.currentSpecReport.State) { + return + } + firedOnFailure = true + suite.runOnFailureNodes(func(Node) string { return "" }) + } + var err error switch node.NodeType { case types.NodeTypeBeforeSuite, types.NodeTypeAfterSuite: @@ -676,7 +862,13 @@ func (suite *Suite) runSuiteNode(node Node) { } node.Body = func(c SpecContext) { data = node.SynchronizedBeforeSuiteProc1Body(c) } node.HasContext = node.SynchronizedBeforeSuiteProc1BodyHasContext + suite.selectiveLock.Lock() + suite.runningSynchronizedBeforeSuiteProc1Body = true + suite.selectiveLock.Unlock() suite.currentSpecReport.State, suite.currentSpecReport.Failure = suite.runNode(node, time.Time{}, "") + suite.selectiveLock.Lock() + suite.runningSynchronizedBeforeSuiteProc1Body = false + suite.selectiveLock.Unlock() if suite.config.ParallelTotal > 1 { suite.currentSpecReport.CapturedStdOutErr += suite.outputInterceptor.StopInterceptingAndReturnOutput() suite.outputInterceptor.StartInterceptingOutput() @@ -708,6 +900,8 @@ func (suite *Suite) runSuiteNode(node Node) { node.Body = node.SynchronizedAfterSuiteAllProcsBody node.HasContext = node.SynchronizedAfterSuiteAllProcsBodyHasContext suite.currentSpecReport.State, suite.currentSpecReport.Failure = suite.runNode(node, time.Time{}, "") + // run the callbacks before process #1 waits for the other processes and runs its own teardown + fireOnFailureIfNeeded() if suite.config.ParallelProcess == 1 { if suite.config.ParallelTotal > 1 { err = suite.client.BlockUntilNonprimaryProcsHaveFinished() @@ -733,6 +927,8 @@ func (suite *Suite) runSuiteNode(node Node) { suite.reporter.EmitFailure(suite.currentSpecReport.State, suite.currentSpecReport.Failure) } + fireOnFailureIfNeeded() + suite.currentSpecReport.EndTime = time.Now() suite.currentSpecReport.RunTime = suite.currentSpecReport.EndTime.Sub(suite.currentSpecReport.StartTime) suite.currentSpecReport.CapturedGinkgoWriterOutput = string(suite.writer.Bytes()) @@ -885,6 +1081,11 @@ func (suite *Suite) runNode(node Node, specDeadline time.Time, text string) (typ } } + if suite.sleepOnFailureNodeID != 0 && node.ID == suite.sleepOnFailureNodeID { + // --sleep-on-failure pauses for the requested duration (or until the user interrupts) regardless of any suite deadline + deadline = time.Time{} + } + if !node.HasContext { // this maps onto the pre-context behavior: // - an interrupted node exits immediately. with this, context-less nodes that are in a spec with a SpecTimeout and/or are interrupted by other means will simply exit immediately after the timeout/interrupt @@ -996,7 +1197,6 @@ func (suite *Suite) runNode(node Node, specDeadline time.Time, text string) (typ } else { failure.Message, failure.Location, failure.ForwardedPanic, failure.TimelineLocation = failureFromRun.Message, failureFromRun.Location, failureFromRun.ForwardedPanic, failureFromRun.TimelineLocation suite.reporter.EmitFailure(outcomeFromRun, failure) - suite.pauseOnFailureIfRequested(node) return outcomeFromRun, failure } case <-gracePeriodChannel: @@ -1080,42 +1280,6 @@ func (suite *Suite) runNode(node Node, specDeadline time.Time, text string) (typ } } -// pauseOnFailureIfRequested pauses the suite at the moment a failure is identified, -// when the user has set --sleep-on-failure. This hooks directly into runNode's failure -// path so the pause happens immediately at the point of failure - before any teardown -// or cleanup runs - leaving the system live for inspection. -// -// We only pause for failures in setup and subject nodes (It, Before*, BeforeSuite...), -// i.e. nodes that run before teardown. Pausing on a failure in a teardown/cleanup or -// reporting node would be pointless (the system is already being torn down) and could -// interfere with interrupt handling, so those are skipped. -// -// The pause is interruptible: pressing ^C (or any interrupt) ends the pause early and -// the suite proceeds to run cleanup as usual. It is a no-op if the feature is disabled. -func (suite *Suite) pauseOnFailureIfRequested(node Node) { - if suite.config.SleepOnFailure <= 0 { - return - } - // only pause before teardown - skip teardown/cleanup/reporting nodes - if node.NodeType.Is(types.NodeTypesAllowedDuringCleanupInterrupt | types.NodeTypesAllowedDuringReportInterrupt) { - return - } - - duration := suite.config.SleepOnFailure - report := suite.generateProgressReport(false) - report.Message = fmt.Sprintf("{{bold}}{{orange}}Paused on failure for up to %s.{{/}}\nThe spec failed and Ginkgo has paused before running any teardown so you can inspect the live system.\nPress {{bold}}^C{{/}} to end the pause and proceed to cleanup.", duration) - suite.emitProgressReport(report) - - timer := time.NewTimer(duration) - defer timer.Stop() - // wait for the pause to elapse, or for the user to interrupt - in which case we end - // the pause early and let runNode return so cleanup can proceed - select { - case <-timer.C: - case <-suite.interruptHandler.Status().Channel: - } -} - // TODO: search for usages and consider if reporter.EmitFailure() is necessary func (suite *Suite) failureForLeafNodeWithMessage(node Node, message string) types.Failure { return types.Failure{ diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go b/vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go index e6fbaee4..e7a4d971 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go @@ -15,6 +15,7 @@ import ( type failFunc func(message string, callerSkip ...int) type skipFunc func(message string, callerSkip ...int) type cleanupFunc func(args ...any) +type onFailureFunc func(args ...any) type reportFunc func() types.SpecReport type addReportEntryFunc func(names string, args ...any) type ginkgoWriterInterface interface { @@ -32,13 +33,14 @@ var formatters = map[bool]formatter.Formatter{ false: formatter.NewWithNoColorBool(false), } -func New(writer ginkgoWriterInterface, fail failFunc, skip skipFunc, cleanup cleanupFunc, report reportFunc, addReportEntry addReportEntryFunc, ginkgoRecover ginkgoRecoverFunc, attachProgressReporter attachProgressReporterFunc, randomSeed int64, parallelProcess int, parallelTotal int, noColor bool, offset int) *ginkgoTestingTProxy { +func New(writer ginkgoWriterInterface, fail failFunc, skip skipFunc, cleanup cleanupFunc, onFailure onFailureFunc, report reportFunc, addReportEntry addReportEntryFunc, ginkgoRecover ginkgoRecoverFunc, attachProgressReporter attachProgressReporterFunc, randomSeed int64, parallelProcess int, parallelTotal int, noColor bool, offset int) *ginkgoTestingTProxy { return &ginkgoTestingTProxy{ fail: fail, offset: offset, writer: writer, skip: skip, cleanup: cleanup, + onFailure: onFailure, report: report, addReportEntry: addReportEntry, ginkgoRecover: ginkgoRecover, @@ -54,6 +56,7 @@ type ginkgoTestingTProxy struct { fail failFunc skip skipFunc cleanup cleanupFunc + onFailure onFailureFunc report reportFunc offset int writer ginkgoWriterInterface @@ -231,6 +234,10 @@ func (t *ginkgoTestingTProxy) DeferCleanup(args ...any) { finalArgs := []any{internal.Offset(1)} t.cleanup(append(finalArgs, args...)...) } +func (t *ginkgoTestingTProxy) DeferOnFailure(args ...any) { + finalArgs := []any{internal.Offset(1)} + t.onFailure(append(finalArgs, args...)...) +} func (t *ginkgoTestingTProxy) RandomSeed() int64 { return t.randomSeed } diff --git a/vendor/github.com/onsi/ginkgo/v2/types/errors.go b/vendor/github.com/onsi/ginkgo/v2/types/errors.go index 636070c1..54652792 100644 --- a/vendor/github.com/onsi/ginkgo/v2/types/errors.go +++ b/vendor/github.com/onsi/ginkgo/v2/types/errors.go @@ -344,6 +344,52 @@ func (g ginkgoErrors) PushingCleanupInCleanupNode(cl CodeLocation) error { } } +func (g ginkgoErrors) PushingCleanupInOnFailureNode(cl CodeLocation) error { + return GinkgoError{ + Heading: "DeferCleanup cannot be called in a DeferOnFailure callback", + Message: "DeferOnFailure callbacks run while the spec is failing, just before its teardown. Register cleanup in the setup or subject node that created the resource instead.", + CodeLocation: cl, + DocLink: "capturing-failure-state-deferonfailure", + } +} + +/* DeferOnFailure errors */ +func (g ginkgoErrors) DeferOnFailureInvalidFunction(cl CodeLocation) error { + return GinkgoError{ + Heading: "DeferOnFailure requires a valid function", + Message: "You must pass DeferOnFailure a function to invoke. If the function's last return value is a non-nil error, the callback fails; any other return values are ignored. The function can take arbitrarily many arguments and you should provide these to DeferOnFailure to pass along to the function.", + CodeLocation: cl, + DocLink: "capturing-failure-state-deferonfailure", + } +} + +func (g ginkgoErrors) PushingOnFailureNodeDuringTreeConstruction(cl CodeLocation) error { + return GinkgoError{ + Heading: "DeferOnFailure must be called inside a setup or subject node", + Message: "You must call DeferOnFailure inside BeforeSuite, SynchronizedBeforeSuite (in the function that runs on all processes), BeforeAll, BeforeEach, JustBeforeEach, or It. You can't call DeferOnFailure at the top-level or in a container node.", + CodeLocation: cl, + DocLink: "capturing-failure-state-deferonfailure", + } +} + +func (g ginkgoErrors) PushingOnFailureNodeInInvalidNode(cl CodeLocation, nodeType NodeType) error { + return GinkgoError{ + Heading: fmt.Sprintf("DeferOnFailure cannot be called in %s", nodeType), + Message: "DeferOnFailure registers a callback that runs before teardown when a failure occurs. It can only be called from BeforeSuite, SynchronizedBeforeSuite (in the function that runs on all processes), BeforeAll, BeforeEach, JustBeforeEach, or It - not from teardown, reporting, cleanup, or other DeferOnFailure callbacks.", + CodeLocation: cl, + DocLink: "capturing-failure-state-deferonfailure", + } +} + +func (g ginkgoErrors) PushingOnFailureNodeInSynchronizedBeforeSuiteProc1(cl CodeLocation) error { + return GinkgoError{ + Heading: "DeferOnFailure cannot be called in the first function passed to SynchronizedBeforeSuite", + Message: "That function only runs on process #1, so a DeferOnFailure registered there would only cover the specs that run on process #1. Call DeferOnFailure in the second function passed to SynchronizedBeforeSuite (which runs on all processes) instead.", + CodeLocation: cl, + DocLink: "capturing-failure-state-deferonfailure", + } +} + /* ReportEntry errors */ func (g ginkgoErrors) TooManyReportEntryValues(cl CodeLocation, arg any) error { return GinkgoError{ diff --git a/vendor/github.com/onsi/ginkgo/v2/types/types.go b/vendor/github.com/onsi/ginkgo/v2/types/types.go index 16277443..a448fbbc 100644 --- a/vendor/github.com/onsi/ginkgo/v2/types/types.go +++ b/vendor/github.com/onsi/ginkgo/v2/types/types.go @@ -946,11 +946,17 @@ const ( NodeTypeCleanupAfterEach NodeTypeCleanupAfterAll NodeTypeCleanupAfterSuite + + NodeTypeOnFailureInvalid + NodeTypeOnFailureEach + NodeTypeOnFailureAll + NodeTypeOnFailureSuite ) var NodeTypesForContainerAndIt = NodeTypeContainer | NodeTypeIt var NodeTypesForSuiteLevelNodes = NodeTypeBeforeSuite | NodeTypeSynchronizedBeforeSuite | NodeTypeAfterSuite | NodeTypeSynchronizedAfterSuite | NodeTypeReportBeforeSuite | NodeTypeReportAfterSuite | NodeTypeCleanupAfterSuite -var NodeTypesAllowedDuringCleanupInterrupt = NodeTypeAfterEach | NodeTypeJustAfterEach | NodeTypeAfterAll | NodeTypeAfterSuite | NodeTypeSynchronizedAfterSuite | NodeTypeCleanupAfterEach | NodeTypeCleanupAfterAll | NodeTypeCleanupAfterSuite +var NodeTypesForOnFailure = NodeTypeOnFailureInvalid | NodeTypeOnFailureEach | NodeTypeOnFailureAll | NodeTypeOnFailureSuite +var NodeTypesAllowedDuringCleanupInterrupt = NodeTypeAfterEach | NodeTypeJustAfterEach | NodeTypeAfterAll | NodeTypeAfterSuite | NodeTypeSynchronizedAfterSuite | NodeTypeCleanupAfterEach | NodeTypeCleanupAfterAll | NodeTypeCleanupAfterSuite | NodeTypeOnFailureEach | NodeTypeOnFailureAll | NodeTypeOnFailureSuite var NodeTypesAllowedDuringReportInterrupt = NodeTypeReportBeforeEach | NodeTypeReportAfterEach | NodeTypeReportBeforeSuite | NodeTypeReportAfterSuite var ntEnumSupport = NewEnumSupport(map[uint]string{ @@ -975,6 +981,10 @@ var ntEnumSupport = NewEnumSupport(map[uint]string{ uint(NodeTypeCleanupAfterEach): "DeferCleanup (Each)", uint(NodeTypeCleanupAfterAll): "DeferCleanup (All)", uint(NodeTypeCleanupAfterSuite): "DeferCleanup (Suite)", + uint(NodeTypeOnFailureInvalid): "DeferOnFailure", + uint(NodeTypeOnFailureEach): "DeferOnFailure (Each)", + uint(NodeTypeOnFailureAll): "DeferOnFailure (All)", + uint(NodeTypeOnFailureSuite): "DeferOnFailure (Suite)", }) func (nt NodeType) String() string { diff --git a/vendor/github.com/onsi/ginkgo/v2/types/version.go b/vendor/github.com/onsi/ginkgo/v2/types/version.go index 7d8aa801..c4815ceb 100644 --- a/vendor/github.com/onsi/ginkgo/v2/types/version.go +++ b/vendor/github.com/onsi/ginkgo/v2/types/version.go @@ -1,3 +1,3 @@ package types -const VERSION = "2.33.1" +const VERSION = "2.34.0" diff --git a/vendor/modules.txt b/vendor/modules.txt index a18adefb..b84a7f6e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -178,7 +178,7 @@ github.com/modern-go/concurrent # github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee ## explicit; go 1.12 github.com/modern-go/reflect2 -# github.com/onsi/ginkgo/v2 v2.33.1 +# github.com/onsi/ginkgo/v2 v2.34.0 ## explicit; go 1.25.0 github.com/onsi/ginkgo/v2 github.com/onsi/ginkgo/v2/config From cdffa58469e7b5bf7953c18071cd74bfc6e16e2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 00:33:24 +0000 Subject: [PATCH 8/9] chore(deps): Bump github.com/pkg/sftp from 1.13.11 to 1.13.12 Bumps [github.com/pkg/sftp](https://github.com/pkg/sftp) from 1.13.11 to 1.13.12. - [Release notes](https://github.com/pkg/sftp/releases) - [Commits](https://github.com/pkg/sftp/compare/v1.13.11...v1.13.12) --- updated-dependencies: - dependency-name: github.com/pkg/sftp dependency-version: 1.13.12 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: Carlos Eduardo Arango Gutierrez --- go.mod | 2 +- go.sum | 4 +- vendor/github.com/pkg/sftp/client.go | 172 +++++++++++++++++---------- vendor/github.com/pkg/sftp/packet.go | 64 ++++++++-- vendor/github.com/pkg/sftp/server.go | 6 +- vendor/modules.txt | 2 +- 6 files changed, 171 insertions(+), 79 deletions(-) diff --git a/go.mod b/go.mod index 5013f2e7..b817a15b 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/mattn/go-isatty v0.0.24 github.com/onsi/ginkgo/v2 v2.34.0 github.com/onsi/gomega v1.44.0 - github.com/pkg/sftp v1.13.11 + github.com/pkg/sftp v1.13.12 github.com/stretchr/testify v1.12.1 github.com/urfave/cli/v3 v3.14.0 golang.org/x/crypto v0.58.0 diff --git a/go.sum b/go.sum index 22ba5f46..357f9143 100644 --- a/go.sum +++ b/go.sum @@ -83,8 +83,8 @@ github.com/onsi/ginkgo/v2 v2.34.0 h1:aN3Us823mHHTSWMIi8WIQTdYuSPhl2lWY46E/w3SiAk github.com/onsi/ginkgo/v2 v2.34.0/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44= github.com/onsi/gomega v1.44.0 h1:eAiGl3Pw5jz5GQdDff0BcxYpAX1JxW8xD7mFUuwNfZQ= github.com/onsi/gomega v1.44.0/go.mod h1:e/C2HwaZ1DhvjzXXuFhcR7hY7Sh9pl7MmoWKEjzwcdA= -github.com/pkg/sftp v1.13.11 h1:0N92SLTB8JqASJB14ZLHHzFnBV8mG9zw4K7jghEFWuE= -github.com/pkg/sftp v1.13.11/go.mod h1:uNkH9roSXglNJqM+glJJi+TQXQUm0fXFWqCFmT8hsN0= +github.com/pkg/sftp v1.13.12 h1:Myhzy/ZzLPnCtE2F2WtDHsgs8RfgMnH2gfbHuCJhkMU= +github.com/pkg/sftp v1.13.12/go.mod h1:uNkH9roSXglNJqM+glJJi+TQXQUm0fXFWqCFmT8hsN0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= diff --git a/vendor/github.com/pkg/sftp/client.go b/vendor/github.com/pkg/sftp/client.go index c04f1afd..8e027d20 100644 --- a/vendor/github.com/pkg/sftp/client.go +++ b/vendor/github.com/pkg/sftp/client.go @@ -397,15 +397,25 @@ func (c *Client) ReadDirContext(ctx context.Context, p string) ([]os.FileInfo, e } switch typ { case sshFxpName: - sid, data := unmarshalUint32(data) - if sid != id { - return nil, &unexpectedIDErr{id, sid} + data, err = unmarshalSID(id, data) + if err != nil { + return nil, err + } + var count int + count, data, err = unmarshalCount(data) + if err != nil { + return nil, err } - count, data := unmarshalUint32(data) - for i := uint32(0); i < count; i++ { + for range count { var filename string - filename, data = unmarshalString(data) - _, data = unmarshalString(data) // discard longname + filename, data, err = unmarshalStringSafe(data) + if err != nil { + return nil, err + } + _, data, err = unmarshalStringSafe(data) // discard longname + if err != nil { + return nil, err + } var attr *FileStat attr, data, err = unmarshalAttrs(data) if err != nil { @@ -441,11 +451,14 @@ func (c *Client) opendir(ctx context.Context, path string) (string, error) { } switch typ { case sshFxpHandle: - sid, data := unmarshalUint32(data) - if sid != id { - return "", &unexpectedIDErr{id, sid} + data, err := unmarshalSID(id, data) + if err != nil { + return "", err + } + handle, _, err := unmarshalStringSafe(data) + if err != nil { + return "", err } - handle, _ := unmarshalString(data) return handle, nil case sshFxpStatus: return "", normaliseError(unmarshalStatus(id, data)) @@ -477,9 +490,9 @@ func (c *Client) Lstat(p string) (os.FileInfo, error) { } switch typ { case sshFxpAttrs: - sid, data := unmarshalUint32(data) - if sid != id { - return nil, &unexpectedIDErr{id, sid} + data, err := unmarshalSID(id, data) + if err != nil { + return nil, err } attr, _, err := unmarshalAttrs(data) if err != nil { @@ -506,15 +519,21 @@ func (c *Client) ReadLink(p string) (string, error) { } switch typ { case sshFxpName: - sid, data := unmarshalUint32(data) - if sid != id { - return "", &unexpectedIDErr{id, sid} + data, err := unmarshalSID(id, data) + if err != nil { + return "", err + } + count, data, err := unmarshalCount(data) + if err != nil { + return "", err } - count, data := unmarshalUint32(data) if count != 1 { - return "", unexpectedCount(1, count) + return "", unexpectedCount(1, uint32(count)) + } + filename, _, err := unmarshalStringSafe(data) // ignore dummy attributes + if err != nil { + return "", err } - filename, _ := unmarshalString(data) // ignore dummy attributes return filename, nil case sshFxpStatus: return "", normaliseError(unmarshalStatus(id, data)) @@ -677,11 +696,14 @@ func (c *Client) open(path string, pflags uint32) (*File, error) { } switch typ { case sshFxpHandle: - sid, data := unmarshalUint32(data) - if sid != id { - return nil, &unexpectedIDErr{id, sid} + data, err := unmarshalSID(id, data) + if err != nil { + return nil, err + } + handle, _, err := unmarshalStringSafe(data) + if err != nil { + return nil, err } - handle, _ := unmarshalString(data) return &File{c: c, path: path, handle: handle}, nil case sshFxpStatus: return nil, normaliseError(unmarshalStatus(id, data)) @@ -721,9 +743,9 @@ func (c *Client) stat(path string) (*FileStat, error) { } switch typ { case sshFxpAttrs: - sid, data := unmarshalUint32(data) - if sid != id { - return nil, &unexpectedIDErr{id, sid} + data, err := unmarshalSID(id, data) + if err != nil { + return nil, err } attr, _, err := unmarshalAttrs(data) return attr, err @@ -745,9 +767,9 @@ func (c *Client) fstat(handle string) (*FileStat, error) { } switch typ { case sshFxpAttrs: - sid, data := unmarshalUint32(data) - if sid != id { - return nil, &unexpectedIDErr{id, sid} + data, err := unmarshalSID(id, data) + if err != nil { + return nil, err } attr, _, err := unmarshalAttrs(data) return attr, err @@ -942,15 +964,21 @@ func (c *Client) RealPath(path string) (string, error) { } switch typ { case sshFxpName: - sid, data := unmarshalUint32(data) - if sid != id { - return "", &unexpectedIDErr{id, sid} + data, err := unmarshalSID(id, data) + if err != nil { + return "", err + } + count, data, err := unmarshalCount(data) + if err != nil { + return "", err } - count, data := unmarshalUint32(data) if count != 1 { - return "", unexpectedCount(1, count) + return "", unexpectedCount(1, uint32(count)) + } + filename, _, err := unmarshalStringSafe(data) // ignore attributes + if err != nil { + return "", err } - filename, _ := unmarshalString(data) // ignore attributes return filename, nil case sshFxpStatus: return "", normaliseError(unmarshalStatus(id, data)) @@ -1037,8 +1065,8 @@ func (c *Client) MkdirAll(path string) error { // An error will be returned if no file or directory with the specified path exists func (c *Client) RemoveAll(path string) error { - // Get the file/directory information - fi, err := c.Stat(path) + // Get the file/directory information, without following symlinks + fi, err := c.Lstat(path) if err != nil { return err } @@ -1147,13 +1175,11 @@ func (f *File) readChunkAt(ch chan result, b []byte, off int64) (n int, err erro return n, normaliseError(unmarshalStatus(id, data)) case sshFxpData: - sid, data := unmarshalUint32(data) - if id != sid { - return n, &unexpectedIDErr{id, sid} + data, err = unmarshalDataReply(id, data) + if err != nil { + return n, err } - - l, data := unmarshalUint32(data) - n += copy(b[n:], data[:l]) + n += copy(b[n:], data) default: return n, unimplementedPacketErr(typ) @@ -1293,13 +1319,10 @@ func (f *File) readAt(b []byte, off int64) (int, error) { err = normaliseError(unmarshalStatus(packet.id, s.data)) case sshFxpData: - sid, data := unmarshalUint32(s.data) - if packet.id != sid { - err = &unexpectedIDErr{packet.id, sid} - - } else { - l, data := unmarshalUint32(data) - n = copy(packet.b, data[:l]) + var data []byte + data, err = unmarshalDataReply(packet.id, s.data) + if err == nil { + n = copy(packet.b, data) // For normal disk files, it is guaranteed that this will read // the specified number of bytes, or up to end of file. @@ -1522,14 +1545,15 @@ func (f *File) WriteTo(w io.Writer) (written int64, err error) { err = normaliseError(unmarshalStatus(readWork.id, s.data)) case sshFxpData: - sid, data := unmarshalUint32(s.data) - if readWork.id != sid { - err = &unexpectedIDErr{readWork.id, sid} - - } else { - l, data := unmarshalUint32(data) - b = pool.Get()[:l] - n = copy(b, data[:l]) + var data []byte + data, err = unmarshalDataReply(readWork.id, s.data) + if err == nil { + // A malicious server may return more data than we + // requested (up to the packet limit, larger than the + // pool buffer); copy bounds it to the buffer size + // rather than slicing past the page and panicking. + b = pool.Get() + n = copy(b, data) b = b[:n] } @@ -1645,8 +1669,11 @@ func (f *File) writeChunkAt(ch chan result, b []byte, off int64) (int, error) { switch typ { case sshFxpStatus: - id, _ := unmarshalUint32(data) - err := normaliseError(unmarshalStatus(id, data)) + id, _, err := unmarshalUint32Safe(data) + if err != nil { + return 0, err + } + err = normaliseError(unmarshalStatus(id, data)) if err != nil { return 0, err } @@ -1885,7 +1912,7 @@ func (f *File) readFromWithConcurrency(r io.Reader, concurrency int) (read int64 for { // Fill the entire buffer. - n, err := io.ReadFull(r, b) + n, err := readFull(r, b) if n > 0 { read += int64(n) @@ -1911,7 +1938,7 @@ func (f *File) readFromWithConcurrency(r io.Reader, concurrency int) (read int64 } if err != nil { - if !errors.Is(err, io.EOF) && !errors.Is(err, io.ErrUnexpectedEOF) { + if !errors.Is(err, io.EOF) { errCh <- rwErr{off, err} } return @@ -2066,7 +2093,7 @@ func (f *File) ReadFrom(r io.Reader) (int64, error) { var read int64 for { // Fill the entire buffer. - n, err := io.ReadFull(r, b) + n, err := readFull(r, b) if n < 0 { panic("sftp.File: reader returned negative count from Read") } @@ -2077,13 +2104,13 @@ func (f *File) ReadFrom(r io.Reader) (int64, error) { m, err2 := f.writeChunkAt(ch, b[:n], f.offset) f.offset += int64(m) - if err == nil { + if err == nil || (err2 != nil && errors.Is(err, io.EOF)) { err = err2 } } if err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { + if errors.Is(err, io.EOF) { return read, nil // return nil explicitly. } @@ -2092,6 +2119,19 @@ func (f *File) ReadFrom(r io.Reader) (int64, error) { } } +// readFull reads from r into b until b is full or r returns an error. +// Unlike io.ReadFull, it returns the error from r unchanged. +// io.ReadFull turns an io.EOF after a partial read into io.ErrUnexpectedEOF, +// which can't be told apart from an io.ErrUnexpectedEOF returned by r itself. +func readFull(r io.Reader, b []byte) (n int, err error) { + for n < len(b) && err == nil { + var nn int + nn, err = r.Read(b[n:]) + n += nn + } + return n, err +} + // Seek implements io.Seeker by setting the client offset for the next Read or // Write. It returns the next offset read. Seeking before or after the end of // the file is undefined. Seeking relative to the end calls Stat. diff --git a/vendor/github.com/pkg/sftp/packet.go b/vendor/github.com/pkg/sftp/packet.go index 74712825..1cb0f16a 100644 --- a/vendor/github.com/pkg/sftp/packet.go +++ b/vendor/github.com/pkg/sftp/packet.go @@ -164,11 +164,11 @@ func unmarshalString(b []byte) (string, []byte) { } func unmarshalStringSafe(b []byte) (string, []byte, error) { - n, b, err := unmarshalUint32Safe(b) + n, b, err := unmarshalCount(b) if err != nil { return "", nil, err } - if int64(n) > int64(len(b)) { + if n > len(b) { return "", nil, errShortPacket } return string(b[:n]), b[n:], nil @@ -253,12 +253,44 @@ func unmarshalFileStat(flags uint32, b []byte) (*FileStat, []byte, error) { return &fs, b, nil } -func unmarshalStatus(id uint32, data []byte) error { - sid, data := unmarshalUint32(data) +// unmarshalSID consumes the request-id echoed back in a reply and verifies it +// matches the id we sent, returning the remaining bytes for further decoding. +func unmarshalSID(id uint32, b []byte) ([]byte, error) { + sid, b, err := unmarshalUint32Safe(b) + if err != nil { + return nil, err + } if sid != id { - return &unexpectedIDErr{id, sid} + return nil, &unexpectedIDErr{id, sid} + } + return b, nil +} + +// unmarshalCount consumes a uint32 count and returns it as an int. A value that +// does not fit in a non-negative int is rejected with errLongPacket: this is +// only possible when strconv.IntSize == 32 and the count exceeds math.MaxInt32, +// in which case it is longer than any possible slice and would otherwise drive a +// negative length into make/slice and panic. +func unmarshalCount(b []byte) (int, []byte, error) { + v, b, err := unmarshalUint32Safe(b) + if err != nil { + return 0, nil, err + } + if int(v) < 0 { + return 0, nil, errLongPacket + } + return int(v), b, nil +} + +func unmarshalStatus(id uint32, data []byte) error { + data, err := unmarshalSID(id, data) + if err != nil { + return err + } + code, data, err := unmarshalUint32Safe(data) + if err != nil { + return err } - code, data := unmarshalUint32(data) msg, data, _ := unmarshalStringSafe(data) lang, _, _ := unmarshalStringSafe(data) return &StatusError{ @@ -268,6 +300,24 @@ func unmarshalStatus(id uint32, data []byte) error { } } +// unmarshalDataReply parses an SSH_FXP_DATA reply, validating the id and the +// declared data length against the bytes actually present. It returns the data +// payload as a sub-slice of data. +func unmarshalDataReply(id uint32, data []byte) ([]byte, error) { + data, err := unmarshalSID(id, data) + if err != nil { + return nil, err + } + l, data, err := unmarshalCount(data) + if err != nil { + return nil, err + } + if l > len(data) { + return nil, errShortPacket + } + return data[:l], nil +} + type packetMarshaler interface { marshalPacket() (header, payload []byte, err error) } @@ -1407,7 +1457,7 @@ type sshFxpExtendedPacketHardlink struct { // https://github.com/openssh/openssh-portable/blob/master/PROTOCOL func (p *sshFxpExtendedPacketHardlink) id() uint32 { return p.ID } -func (p *sshFxpExtendedPacketHardlink) readonly() bool { return true } +func (p *sshFxpExtendedPacketHardlink) readonly() bool { return false } func (p *sshFxpExtendedPacketHardlink) UnmarshalBinary(b []byte) error { var err error if p.ID, b, err = unmarshalUint32Safe(b); err != nil { diff --git a/vendor/github.com/pkg/sftp/server.go b/vendor/github.com/pkg/sftp/server.go index c50bc414..c3d3364b 100644 --- a/vendor/github.com/pkg/sftp/server.go +++ b/vendor/github.com/pkg/sftp/server.go @@ -392,6 +392,7 @@ func (svr *Server) Serve() error { var pkt requestPacket var pktType fxp var pktBytes []byte +recvLoop: for { pktType, pktBytes, err = svr.serverConn.recvPacket(svr.pktMgr.getNextOrderID()) if err != nil { @@ -415,7 +416,7 @@ func (svr *Server) Serve() error { default: debug("makePacket err: %v", err) svr.conn.Close() // shuts down recvPacket - break + break recvLoop } } @@ -466,7 +467,8 @@ func (p *sshFxpStatResponse) MarshalBinary() ([]byte, error) { var emptyFileStat = []any{uint32(0)} func (p *sshFxpOpenPacket) readonly() bool { - return !p.hasPflags(sshFxfWrite) + // SSH_FXF_CREAT and SSH_FXF_TRUNC modify the filesystem even without SSH_FXF_WRITE. + return p.Pflags&(sshFxfWrite|sshFxfCreat|sshFxfTrunc) == 0 } func (p *sshFxpOpenPacket) hasPflags(flags ...uint32) bool { diff --git a/vendor/modules.txt b/vendor/modules.txt index b84a7f6e..29b81432 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -215,7 +215,7 @@ github.com/onsi/gomega/matchers/support/goraph/edge github.com/onsi/gomega/matchers/support/goraph/node github.com/onsi/gomega/matchers/support/goraph/util github.com/onsi/gomega/types -# github.com/pkg/sftp v1.13.11 +# github.com/pkg/sftp v1.13.12 ## explicit; go 1.25.0 github.com/pkg/sftp github.com/pkg/sftp/internal/encoding/ssh/filexfer From d652eca97cba8f6f728a3cdafd0fbf6b2d5c7352 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 00:33:18 +0000 Subject: [PATCH 9/9] chore(deps): Bump k8s.io/apimachinery Bumps the k8sio group with 1 update in the / directory: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery). Updates `k8s.io/apimachinery` from 0.37.1 to 0.37.2 - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.37.1...v0.37.2) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-version: 0.37.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8sio ... Signed-off-by: dependabot[bot] Signed-off-by: Carlos Eduardo Arango Gutierrez --- go.mod | 2 +- go.sum | 4 ++-- vendor/modules.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index b817a15b..ee4004f8 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( golang.org/x/crypto v0.58.0 golang.org/x/sync v0.24.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/apimachinery v0.37.1 + k8s.io/apimachinery v0.37.2 sigs.k8s.io/yaml v1.6.0 ) diff --git a/go.sum b/go.sum index 357f9143..524e5c5d 100644 --- a/go.sum +++ b/go.sum @@ -137,8 +137,8 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/apimachinery v0.37.1 h1:hGCYyvKHCwtwMitj2vU4vYx0Z16N9GyZk9BBnz0wDAE= -k8s.io/apimachinery v0.37.1/go.mod h1:jF84AyUi/IRIXRot5f+lm6MpxoWI+F1XgjaMmwCdTFw= +k8s.io/apimachinery v0.37.2 h1:G4t9RGoPDbQML38hz/kQQiltttgd3egg2ODCR8aIc2o= +k8s.io/apimachinery v0.37.2/go.mod h1:qaAvSNvgU2x07wRM95MSHSJTPQ/ob/LeNAGbeDgqQJg= k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc= k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0= k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad h1:oXImqH8mQNk7PmvzKhmN3ddJoY6OnyM225MXwGHPm0A= diff --git a/vendor/modules.txt b/vendor/modules.txt index 29b81432..21008deb 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -322,7 +322,7 @@ gopkg.in/inf.v0 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 -# k8s.io/apimachinery v0.37.1 +# k8s.io/apimachinery v0.37.2 ## explicit; go 1.26.0 k8s.io/apimachinery/pkg/api/meta k8s.io/apimachinery/pkg/api/operation