From 344a22e4821602dc2dca56f4caf1de397f0c8248 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Nov 2026 00:37:28 +0000 Subject: [PATCH] chore(deps): Bump github.com/aws/aws-sdk-go-v2 from 1.47.7 to 1.48.1 Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.47.7 to 1.48.1. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.47.7...v1.48.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2 dependency-version: 1.48.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 +- go.sum | 8 +- .../aws-sdk-go-v2/aws/go_module_metadata.go | 2 +- .../aws/aws-sdk-go-v2/aws/retry/adaptive.go | 11 +- .../aws/aws-sdk-go-v2/aws/retry/doc.go | 2 +- .../aws-sdk-go-v2/aws/retry/jitter_backoff.go | 15 ++- .../aws/aws-sdk-go-v2/aws/retry/middleware.go | 22 +--- .../aws/retry/retryable_error.go | 36 ++++++ .../aws/aws-sdk-go-v2/aws/retry/standard.go | 120 ++++++++---------- .../aws-sdk-go-v2/aws/retry/throttle_error.go | 12 ++ .../endpoints/awsrulesfn/partitions.go | 14 ++ .../endpoints/awsrulesfn/partitions.json | 6 + vendor/github.com/aws/smithy-go/CHANGELOG.md | 23 ++++ .../aws/smithy-go/eventstream/encode.go | 21 +++ .../aws/smithy-go/eventstream/message.go | 19 ++- .../aws/smithy-go/go_module_metadata.go | 2 +- .../internal/json/shape_deserializer.go | 14 +- vendor/modules.txt | 4 +- 18 files changed, 232 insertions(+), 103 deletions(-) diff --git a/go.mod b/go.mod index ee4004f80..fc5bda6a2 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.7 + github.com/aws/aws-sdk-go-v2 v1.48.1 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.63.8 @@ -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.8 // indirect + github.com/aws/smithy-go v1.28.10 // 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 524e5c5d5..fe49343e2 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.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 v1.48.1 h1:j6ro6IvbxUe8BCulc/6uWMrhmx6+i5HNIc1GZEJRT9k= +github.com/aws/aws-sdk-go-v2 v1.48.1/go.mod h1:HP8Jzg1FDurJomtx40YM0eiLoJrwjjZ9X+4BNpy4OXc= 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.8 h1:aEmdAq7gVCoGCnvf1NnELlu3I6D/nhqrC321FyFiQkQ= -github.com/aws/smithy-go v1.28.8/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= +github.com/aws/smithy-go v1.28.10 h1:SfPnj8fGCVAI/P5YC4/1JjuMsucbPp2dROnSTYNo2PE= +github.com/aws/smithy-go v1.28.10/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 d55b099a7..890a31a7c 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.7" +const goModuleVersion = "1.48.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go index 4dfde8573..006501bfb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go @@ -21,6 +21,7 @@ var DefaultThrottles = []IsErrorThrottle{ ThrottleErrorCode{ Codes: DefaultThrottleErrorCodes, }, + throttleUnmodeledTooManyRequests{}, } // AdaptiveModeOptions provides the functional options for configuring the @@ -145,7 +146,15 @@ func (a *AdaptiveMode) GetAttemptToken(ctx context.Context) (func(error) error, } } - return a.handleResponse, nil + stdRelease, err := a.retryer.GetAttemptToken(ctx) + if err != nil { + return nil, err + } + + return func(opErr error) error { + a.handleResponse(opErr) + return stdRelease(opErr) + }, nil } func (a *AdaptiveMode) handleResponse(opErr error) error { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go index 3a08ebe0a..e0089c895 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go @@ -20,7 +20,7 @@ // - Errors that implement a ConnectionError, Temporary, or Timeout method that return true. // - Connection Reset Errors. // - net.OpErr types that are dialing errors or are temporary. -// - HTTP Status Codes: 500, 502, 503, and 504. +// - HTTP Status Codes: 429 (unless the error is a modeled error type), 500, 502, 503, and 504. // - API Error Codes // - RequestTimeout, RequestTimeoutException // - Throttling, ThrottlingException, ThrottledException, RequestThrottledException, TooManyRequestsException, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go index 14225a53a..40b83911a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go @@ -23,8 +23,8 @@ type ExponentialJitterBackoff struct { // delay is 1s regardless of the configured baseDelay. throttle IsErrorThrottle - // When true, applies MAX_BACKOFF before jitter and uses throttle-aware - // base delay. + // When true, uses the Retry Behavior 2.1 formula: applies MAX_BACKOFF + // before jitter and uses throttle-aware base delay. retries2026 bool randFloat64 func() (float64, error) @@ -101,8 +101,15 @@ func (j *ExponentialJitterBackoff) backoffDelayLegacy(attempt int, err error) (t } // backoffDelay2026 uses throttle-aware base delay and applies MAX_BACKOFF -// before jitter: t_i = b * min(x * 2^i, MAX_BACKOFF). +// before jitter: t_i = b * min(x * 2^i, MAX_BACKOFF), where i is the 0-based +// retry index. The attempt passed in is the 1-based number of the attempt that +// failed, so the first retry uses i = 0. func (j *ExponentialJitterBackoff) backoffDelay2026(attempt int, err error) (time.Duration, error) { + i := attempt - 1 + if i < 0 { + i = 0 + } + x := j.baseDelay if j.throttle != nil && j.throttle.IsErrorThrottle(err) == aws.TrueTernary { x = time.Second @@ -113,7 +120,7 @@ func (j *ExponentialJitterBackoff) backoffDelay2026(attempt int, err error) (tim return 0, randErr } - ri := math.Pow(2, float64(attempt)) + ri := math.Pow(2, float64(i)) delaySeconds := float64(x) / float64(time.Second) * ri maxBackoffSeconds := float64(j.maxBackoff) / float64(time.Second) if delaySeconds > maxBackoffSeconds { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go index 3b7e08b91..8a2f38a82 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go @@ -247,11 +247,9 @@ func (r *Attempt) handleAttempt( "failed to release retry token after request error, %w", err) } // Release the attempt token based on the state of the attempt's error (if any). - if !newRetries2026() || attemptNum == 1 { - if releaseError := releaseAttemptToken(err); releaseError != nil && err != nil { - return out, attemptResult, nopRelease, fmt.Errorf( - "failed to release initial token after request error, %w", err) - } + if releaseError := releaseAttemptToken(err); releaseError != nil && err != nil { + return out, attemptResult, nopRelease, fmt.Errorf( + "failed to release initial token after request error, %w", err) } // If there was no error making the attempt, nothing further to do. There // will be nothing to retry. @@ -296,8 +294,8 @@ func (r *Attempt) handleAttempt( releaseRetryToken, retryTokenErr := r.retryer.GetRetryToken(ctx, err) if retryTokenErr != nil { // Long-polling operations must still back off when quota is exceeded. - if newRetries2026() && internalcontext.GetIsLongPolling(ctx) { - if retryDelay, delayErr := r.retryer.RetryDelay(attemptNum-1, err); delayErr == nil { + if internalcontext.GetIsLongPolling(ctx) { + if retryDelay, delayErr := r.retryer.RetryDelay(attemptNum, err); delayErr == nil { retryDelay = adjustForRetryAfterHeader(retryDelay, err, logger, r.LogAttempts) _ = sdk.SleepWithContext(ctx, retryDelay) } @@ -311,17 +309,11 @@ func (r *Attempt) handleAttempt( // Get the retry delay before another attempt can be made, and sleep for // that time. Potentially early exist if the sleep is canceled via the // context. - attempt := attemptNum - if newRetries2026() { - attempt = attemptNum - 1 - } - retryDelay, reqErr := r.retryer.RetryDelay(attempt, err) + retryDelay, reqErr := r.retryer.RetryDelay(attemptNum, err) if reqErr != nil { return out, attemptResult, releaseRetryToken, reqErr } - if newRetries2026() { - retryDelay = adjustForRetryAfterHeader(retryDelay, err, logger, r.LogAttempts) - } + retryDelay = adjustForRetryAfterHeader(retryDelay, err, logger, r.LogAttempts) if reqErr = sdk.SleepWithContext(ctx, retryDelay); reqErr != nil { err = &aws.RequestCanceledError{Err: reqErr} return out, attemptResult, releaseRetryToken, err diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go index 1b485f998..f9ec49d60 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go @@ -4,10 +4,12 @@ import ( "errors" "fmt" "net" + "net/http" "net/url" "strings" "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/smithy-go" ) // IsErrorRetryable provides the interface of an implementation to determine if @@ -184,6 +186,28 @@ func (r RetryableHTTPStatusCode) IsErrorRetryable(err error) aws.Ternary { return aws.TrueTernary } +// retryableUnmodeledTooManyRequests retries an HTTP 429 response whose error +// did not deserialize to a modeled error type. A modeled error's own retry +// rules decide whether it is retried. +type retryableUnmodeledTooManyRequests struct{} + +func (retryableUnmodeledTooManyRequests) IsErrorRetryable(err error) aws.Ternary { + if isUnmodeledTooManyRequests(err) { + return aws.TrueTernary + } + return aws.UnknownTernary +} + +// isUnmodeledTooManyRequests returns true if the error is for an HTTP 429 +// response and did not deserialize to a modeled error type. +func isUnmodeledTooManyRequests(err error) bool { + var v interface{ HTTPStatusCode() int } + if !errors.As(err, &v) || v.HTTPStatusCode() != http.StatusTooManyRequests { + return false + } + return !isModeledAPIError(err) +} + // RetryableErrorCode determines if an attempt should be retried based on the // API error code. type RetryableErrorCode struct { @@ -226,3 +250,15 @@ func (e *retryableClockSkewError) Unwrap() error { func (e *retryableClockSkewError) RetryableError() bool { return true } + +// isModeledAPIError returns true if the error wraps an API error that was +// deserialized to a modeled error type. An error that deserialized to +// *smithy.GenericAPIError, or that has no API error, is not modeled. +func isModeledAPIError(err error) bool { + var apiErr smithy.APIError + if !errors.As(err, &apiErr) { + return false + } + _, generic := apiErr.(*smithy.GenericAPIError) + return !generic +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go index f2f9660da..12c00b2b0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go @@ -3,7 +3,6 @@ package retry import ( "context" "fmt" - "os" "time" "github.com/aws/aws-sdk-go-v2/aws/ratelimit" @@ -34,20 +33,32 @@ const ( // Default retry token quota values. const ( - DefaultRetryRateTokens uint = 500 + DefaultRetryRateTokens uint = 500 + + // DefaultRetryCost is the legacy cost to deduct from the RateLimiter's + // token bucket per retry. + // + // Deprecated: The SDK no longer uses this value by default. A retry now + // costs 14 tokens, and a retry caused by a throttling error costs + // DefaultThrottlingRetryCost. DefaultRetryCost uint = 5 DefaultNoRetryIncrement uint = 1 - // DefaultRetryTimeoutCost is the cost to deduct from the RateLimiter's - // token bucket per retry caused by timeout error. + // DefaultRetryTimeoutCost is the legacy cost to deduct from the + // RateLimiter's token bucket per retry caused by timeout error. // - // When AWS_NEW_RETRIES_2026 is set to "true", timeouts are no longer - // treated differently than other transient errors. The discounted cost - // is instead applied to throttling errors via DefaultThrottlingRetryCost. + // Deprecated: The SDK no longer uses this value by default. Timeouts are + // no longer treated differently than other transient errors. The + // discounted cost is instead applied to throttling errors via + // DefaultThrottlingRetryCost. DefaultRetryTimeoutCost uint = 10 DefaultThrottlingRetryCost uint = 5 ) +// defaultRetryCost is the cost to deduct from the RateLimiter's token bucket +// per retry not caused by a throttling error. +const defaultRetryCost uint = 14 + // DefaultRetryableHTTPStatusCodes is the default set of HTTP status codes the SDK // should consider as retryable errors. var DefaultRetryableHTTPStatusCodes = map[int]struct{}{ @@ -92,6 +103,7 @@ var DefaultRetryables = []IsErrorRetryable{ RetryableHTTPStatusCode{ Codes: DefaultRetryableHTTPStatusCodes, }, + retryableUnmodeledTooManyRequests{}, RetryableErrorCode{ Codes: DefaultRetryableErrorCodes, }, @@ -127,7 +139,8 @@ type StandardOptions struct { // Set of strategies to determine if the attempt failed due to a timeout // error. // - // It is safe to append to this list in NewStandard's functional options. + // Deprecated: The standard retryer no longer uses this field. A retry + // caused by a timeout costs RetryCost, the same as other transient errors. Timeouts []IsErrorTimeout // Set of strategies to determine if the attempt failed due to a throttle @@ -144,13 +157,10 @@ type StandardOptions struct { // consume more tokens than what's available results in operation failure. // The default implementation is parameterized as follows: // - a capacity of 500 (DefaultRetryRateTokens) - // - a retry caused by a timeout costs 10 tokens (DefaultRetryTimeoutCost) - // - a retry caused by other errors costs 5 tokens (DefaultRetryCost) - // - an operation that succeeds on the 1st attempt adds 1 token (DefaultNoRetryIncrement) - // - // When AWS_NEW_RETRIES_2026 is set to "true", the costs change: - // - a retry costs 14 tokens + // - a retry costs 14 tokens, timeouts included // - a retry caused by a throttling error costs 5 tokens (DefaultThrottlingRetryCost) + // - a successful retry refunds the tokens its retry cost + // - an operation that succeeds on the 1st attempt adds 1 token (DefaultNoRetryIncrement) // // You can disable rate limiting by setting this field to ratelimit.None. RateLimiter RateLimiter @@ -161,12 +171,13 @@ type StandardOptions struct { // The cost to deduct from the RateLimiter's token bucket per retry caused // by timeout error. // - // When AWS_NEW_RETRIES_2026 is set to "true", this field is unused. - // Throttling errors use ThrottlingRetryCost instead. + // Deprecated: The standard retryer no longer uses this field. A retry + // caused by a timeout costs RetryCost, and a retry caused by a throttling + // error costs ThrottlingRetryCost. RetryTimeoutCost uint // The cost to deduct from the RateLimiter's token bucket per retry caused - // by a throttling error. Only used when AWS_NEW_RETRIES_2026 is "true". + // by a throttling error. ThrottlingRetryCost uint // The cost to payback to the RateLimiter's token bucket for successful @@ -174,8 +185,8 @@ type StandardOptions struct { NoRetryIncrement uint // BaseDelay is the base backoff delay for non-throttle retryable errors. - // Throttling errors always use 1s. Defaults to 50ms if zero. - // Only used when AWS_NEW_RETRIES_2026 is "true"; ignored in legacy mode. + // Throttling errors always use 1s. Defaults to 50ms if zero. Ignored when + // Backoff is set. BaseDelay time.Duration } @@ -193,7 +204,6 @@ type Standard struct { options StandardOptions throttle IsErrorThrottle - timeout IsErrorTimeout retryable IsErrorRetryable backoff BackoffDelayer } @@ -211,18 +221,14 @@ func NewStandard(fnOpts ...func(*StandardOptions)) *Standard { backoff := o.Backoff if backoff == nil { - if newRetries2026() { - baseDelay := o.BaseDelay - if baseDelay == 0 { - baseDelay = 50 * time.Millisecond - } - backoff = newExponentialJitterBackoffWithOptions(o.MaxBackoff, - withBaseDelay(baseDelay), - withThrottleCheck(IsErrorThrottles(o.Throttles)), - ) - } else { - backoff = NewExponentialJitterBackoff(o.MaxBackoff) + baseDelay := o.BaseDelay + if baseDelay == 0 { + baseDelay = 50 * time.Millisecond } + backoff = newExponentialJitterBackoffWithOptions(o.MaxBackoff, + withBaseDelay(baseDelay), + withThrottleCheck(IsErrorThrottles(o.Throttles)), + ) } return &Standard{ @@ -230,7 +236,6 @@ func NewStandard(fnOpts ...func(*StandardOptions)) *Standard { backoff: backoff, retryable: IsErrorRetryables(o.Retryables), throttle: IsErrorThrottles(o.Throttles), - timeout: IsErrorTimeouts(o.Timeouts), } } @@ -252,9 +257,15 @@ func (s *Standard) RetryDelay(attempt int, err error) (time.Duration, error) { } // GetAttemptToken returns the token to be released after then attempt completes. -// The release token will add NoRetryIncrement to the RateLimiter token pool if -// the attempt was successful. If the attempt failed, nothing will be done. -func (s *Standard) GetAttemptToken(context.Context) (func(error) error, error) { +// For the first attempt of an operation, the release token will add +// NoRetryIncrement to the RateLimiter token pool if the attempt was +// successful. A successful retry refunds the cost of its retry token instead, +// so the release token of later attempts does nothing. If the attempt failed, +// nothing will be done. +func (s *Standard) GetAttemptToken(ctx context.Context) (func(error) error, error) { + if md, ok := getRetryMetadata(ctx); ok && md.AttemptNum > 1 { + return nopRelease, nil + } return s.GetInitialToken(), nil } @@ -277,15 +288,8 @@ func (s *Standard) noRetryIncrement() error { // Returning the token release function, or error. func (s *Standard) GetRetryToken(ctx context.Context, opErr error) (func(error) error, error) { cost := s.options.RetryCost - - if newRetries2026() { - if s.throttle.IsErrorThrottle(opErr).Bool() { - cost = s.options.ThrottlingRetryCost - } - } else { - if s.timeout.IsErrorTimeout(opErr).Bool() { - cost = s.options.RetryTimeoutCost - } + if s.throttle.IsErrorThrottle(opErr).Bool() { + cost = s.options.ThrottlingRetryCost } fn, err := s.options.RateLimiter.GetToken(ctx, cost) @@ -308,26 +312,7 @@ func (f releaseToken) release(err error) error { return f() } -func newRetries2026() bool { - return os.Getenv("AWS_NEW_RETRIES_2026") == "true" -} - func standardDefaults() StandardOptions { - if newRetries2026() { - return StandardOptions{ - MaxAttempts: DefaultMaxAttempts, - MaxBackoff: DefaultMaxBackoff, - Retryables: append([]IsErrorRetryable{}, DefaultRetryables...), - Timeouts: append([]IsErrorTimeout{}, DefaultTimeouts...), - Throttles: append([]IsErrorThrottle{}, DefaultThrottles...), - - RateLimiter: ratelimit.NewTokenRateLimit(DefaultRetryRateTokens), - RetryCost: 14, - RetryTimeoutCost: DefaultRetryTimeoutCost, - ThrottlingRetryCost: DefaultThrottlingRetryCost, - NoRetryIncrement: DefaultNoRetryIncrement, - } - } return StandardOptions{ MaxAttempts: DefaultMaxAttempts, MaxBackoff: DefaultMaxBackoff, @@ -335,9 +320,10 @@ func standardDefaults() StandardOptions { Timeouts: append([]IsErrorTimeout{}, DefaultTimeouts...), Throttles: append([]IsErrorThrottle{}, DefaultThrottles...), - RateLimiter: ratelimit.NewTokenRateLimit(DefaultRetryRateTokens), - RetryCost: DefaultRetryCost, - RetryTimeoutCost: DefaultRetryTimeoutCost, - NoRetryIncrement: DefaultNoRetryIncrement, + RateLimiter: ratelimit.NewTokenRateLimit(DefaultRetryRateTokens), + RetryCost: defaultRetryCost, + RetryTimeoutCost: DefaultRetryTimeoutCost, + ThrottlingRetryCost: DefaultThrottlingRetryCost, + NoRetryIncrement: DefaultNoRetryIncrement, } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/throttle_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/throttle_error.go index c4b844d15..717387c93 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/throttle_error.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/throttle_error.go @@ -58,3 +58,15 @@ func (r ThrottleErrorCode) IsErrorThrottle(err error) aws.Ternary { return aws.TrueTernary } + +// throttleUnmodeledTooManyRequests treats an HTTP 429 response whose error did +// not deserialize to a modeled error type as a throttle error. A modeled error +// is a throttle error only if its error code is a throttle error code. +type throttleUnmodeledTooManyRequests struct{} + +func (throttleUnmodeledTooManyRequests) IsErrorThrottle(err error) aws.Ternary { + if isUnmodeledTooManyRequests(err) { + return aws.TrueTernary + } + return aws.UnknownTernary +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go index 6ab4d9669..dec36421d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go @@ -225,6 +225,13 @@ var partitions = []Partition{ SupportsFIPS: nil, SupportsDualStack: nil, }, + "me-west-1": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, "mx-central-1": { Name: nil, DnsSuffix: nil, @@ -239,6 +246,13 @@ var partitions = []Partition{ SupportsFIPS: nil, SupportsDualStack: nil, }, + "sa-west-1": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, "us-east-1": { Name: nil, DnsSuffix: nil, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json index fb9ebb1fa..6f8a91ad6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json @@ -98,12 +98,18 @@ "me-south-1" : { "description" : "Middle East (Bahrain)" }, + "me-west-1" : { + "description" : "Middle East (Saudi Arabia)" + }, "mx-central-1" : { "description" : "Mexico (Central)" }, "sa-east-1" : { "description" : "South America (Sao Paulo)" }, + "sa-west-1" : { + "description" : "South America (Chile)" + }, "us-east-1" : { "description" : "US East (N. Virginia)" }, diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index 648e978e9..eb2c66315 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,26 @@ +# Release (2026-11-24) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.28.10 + * **Bug Fix**: Reduce JSON blob deserialization CPU time and allocations by decoding unescaped base64 directly from the input. + * **Bug Fix**: Return an error when encoding an event stream message too long for its 32-bit length field instead of writing a truncated length. + * **Bug Fix**: Validate event stream message prelude lengths when decoding. + +# Release (2026-11-09) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.28.9 + * **Bug Fix**: Fix schema serde serializing struct members marked with the SDK-internal NoSerialize trait. + * **Bug Fix**: Fix unions inside lists and maps being serialized with the wrong element names or keys under schema serde for awsQuery and XML protocols. +* `github.com/aws/smithy-go/aws-http-auth`: [v1.2.2](aws-http-auth/CHANGELOG.md#v122-2026-11-09) + * **Bug Fix**: Sort canonical query parameters after URI-encoding them, as required by SigV4. + # Release (2026-11-03) ## General Highlights diff --git a/vendor/github.com/aws/smithy-go/eventstream/encode.go b/vendor/github.com/aws/smithy-go/eventstream/encode.go index f2e37c8b3..269464257 100644 --- a/vendor/github.com/aws/smithy-go/eventstream/encode.go +++ b/vendor/github.com/aws/smithy-go/eventstream/encode.go @@ -61,6 +61,10 @@ func (e *Encoder) Encode(w io.Writer, msg Message) (err error) { return err } + if err = validateMessageLen(uint64(e.headersBuf.Len()), uint64(len(msg.Payload))); err != nil { + return err + } + crc := crc32.New(crc32IEEETable) hashWriter := io.MultiWriter(writer, crc) @@ -111,6 +115,23 @@ func logMessageEncode(logger logging.Logger, msgBuf *bytes.Buffer, msg Message, fmt.Fprintf(w, "Raw message:\n%s\n", hex.Dump(msgBuf.Bytes())) } +// validateMessageLen returns an error if a message with the given headers and +// payload lengths would be longer than maxMsgLen. The sum is computed in 64 +// bits so it cannot wrap the way the prelude's 32-bit length field would. +func validateMessageLen(headersLen, payloadLen uint64) error { + if total := minMsgLen + headersLen + payloadLen; total > maxMsgLen { + // Convert through a variable: int(maxMsgLen) would fail to compile on + // 32-bit systems, where the constant overflows int. + maxLen := uint64(maxMsgLen) + return LengthError{ + Part: "message", + Want: int(maxLen), + Have: int(total), + } + } + return nil +} + func encodePrelude(w io.Writer, crc hash.Hash32, headersLen, payloadLen uint32) error { p := messagePrelude{ Length: minMsgLen + headersLen + payloadLen, diff --git a/vendor/github.com/aws/smithy-go/eventstream/message.go b/vendor/github.com/aws/smithy-go/eventstream/message.go index 1a77654f7..e381d9166 100644 --- a/vendor/github.com/aws/smithy-go/eventstream/message.go +++ b/vendor/github.com/aws/smithy-go/eventstream/message.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/binary" "hash/crc32" + "math" ) const preludeLen = 8 @@ -11,6 +12,11 @@ const preludeCRCLen = 4 const msgCRCLen = 4 const minMsgLen = preludeLen + preludeCRCLen + msgCRCLen +// maxMsgLen is the largest total message length that the prelude's 32-bit +// length field can hold. It is a limit of the wire format, not a size policy; +// headers and payload together can be at most maxMsgLen-minMsgLen bytes. +const maxMsgLen = math.MaxUint32 + var crc32IEEETable = crc32.MakeTable(crc32.IEEE) // A Message provides the eventstream message representation. @@ -78,14 +84,25 @@ func (p messagePrelude) PayloadLen() uint32 { return p.Length - p.HeadersLen - minMsgLen } +// ValidateLens checks that the prelude's total and headers lengths are +// consistent before they are used to read the rest of the message. Without +// these checks PayloadLen would underflow for a total length below +// HeadersLen+minMsgLen. func (p messagePrelude) ValidateLens() error { - if p.Length == 0 { + if p.Length < minMsgLen { return LengthError{ Part: "message prelude", Want: minMsgLen, Have: int(p.Length), } } + if p.HeadersLen > p.Length-minMsgLen { + return LengthError{ + Part: "message headers", + Want: int(p.Length - minMsgLen), + Have: int(p.HeadersLen), + } + } return nil } 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 f3cfc2703..5ccdf5bb7 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.8" +const goModuleVersion = "1.28.10" diff --git a/vendor/github.com/aws/smithy-go/transport/http/protocol/internal/json/shape_deserializer.go b/vendor/github.com/aws/smithy-go/transport/http/protocol/internal/json/shape_deserializer.go index 47e9561b3..98ca74a7c 100644 --- a/vendor/github.com/aws/smithy-go/transport/http/protocol/internal/json/shape_deserializer.go +++ b/vendor/github.com/aws/smithy-go/transport/http/protocol/internal/json/shape_deserializer.go @@ -355,12 +355,18 @@ func (d *ShapeDeserializer) ReadBlob(s *smithy.Schema, v *[]byte) error { return fmt.Errorf("expected string, got %s", tok) } - sv, err := unquote(tok) - if err != nil { - return err + encoded := tok[1 : len(tok)-1] + // The parser already checked for escapes. Unescaped base64 can be + // decoded without another scan or a temporary string copy. + if d.p.escaped { + var ok bool + encoded, ok = stdlib.UnquoteBytes(tok) + if !ok { + return fmt.Errorf("cannot unquote %s", tok) + } } - b, err := base64.StdEncoding.DecodeString(sv) + b, err := base64.StdEncoding.AppendDecode([]byte{}, encoded) if err != nil { return fmt.Errorf("decode base64 blob: %w", err) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 21008deb2..54666348f 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.7 +# github.com/aws/aws-sdk-go-v2 v1.48.1 ## 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.8 +# github.com/aws/smithy-go v1.28.10 ## explicit; go 1.24 github.com/aws/smithy-go github.com/aws/smithy-go/auth