aws-sdk-s3 1.113.0 → 1.113.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/client.rb +1 -1
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +6 -1
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5274b91e581e514386584d3ea2284363db3bcc1d1d6cbdd3ea992484a26ba3e3
|
4
|
+
data.tar.gz: 6659086890fbfcb9223311361dbb67f3a55738f2a01ce4845bb05210dd06f59a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e25bc0dd1c8249a1c5982cb36f1e06b8b8dc8c3c04e277cd2b9eff8bb3ed2fc4cfd2617ecdd8ea206881e066a02a0bccfc525258a5dc9b2b15a42ad1568a31b
|
7
|
+
data.tar.gz: 9fb04f15c827cdcad16645bde85de0e2b9bdca01483acebc13d6ca8b163eeb21038882468a275b96e293f4c7be42ff481b9275c681d492925cc6e3469a05de02
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.113.2 (2022-04-26)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Issue - Fix an issue where `ExpiredToken` errors were retried as if the request was from another region.
|
8
|
+
|
9
|
+
1.113.1 (2022-04-25)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Issue - Rewind the underlying file on a streaming retry that is not a truncated body (#2692).
|
13
|
+
|
4
14
|
1.113.0 (2022-02-24)
|
5
15
|
------------------
|
6
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.113.
|
1
|
+
1.113.2
|
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -15332,7 +15332,7 @@ module Aws::S3
|
|
15332
15332
|
params: params,
|
15333
15333
|
config: config)
|
15334
15334
|
context[:gem_name] = 'aws-sdk-s3'
|
15335
|
-
context[:gem_version] = '1.113.
|
15335
|
+
context[:gem_version] = '1.113.2'
|
15336
15336
|
Seahorse::Client::Request.new(handlers, context)
|
15337
15337
|
end
|
15338
15338
|
|
@@ -138,7 +138,8 @@ module Aws
|
|
138
138
|
def handle_region_errors(response)
|
139
139
|
if wrong_sigv4_region?(response) &&
|
140
140
|
!fips_region?(response) &&
|
141
|
-
!custom_endpoint?(response)
|
141
|
+
!custom_endpoint?(response) &&
|
142
|
+
!expired_credentials?(response)
|
142
143
|
get_region_and_retry(response.context)
|
143
144
|
else
|
144
145
|
response
|
@@ -162,6 +163,10 @@ module Aws
|
|
162
163
|
resp.context.http_request.endpoint.host.include?('fips')
|
163
164
|
end
|
164
165
|
|
166
|
+
def expired_credentials?(resp)
|
167
|
+
resp.context.http_response.body_contents.match(/<Code>ExpiredToken<\/Code>/)
|
168
|
+
end
|
169
|
+
|
165
170
|
def custom_endpoint?(resp)
|
166
171
|
resolved_suffix = Aws::Partitions::EndpointProvider.dns_suffix_for(
|
167
172
|
resp.context.config.region,
|
@@ -36,6 +36,17 @@ module Aws
|
|
36
36
|
def rewind; end
|
37
37
|
end
|
38
38
|
|
39
|
+
class NonRetryableStreamingError < StandardError
|
40
|
+
|
41
|
+
def initialize(error)
|
42
|
+
super('Unable to retry request - retry could result in processing duplicated chunks.')
|
43
|
+
set_backtrace(error.backtrace)
|
44
|
+
@original_error = error
|
45
|
+
end
|
46
|
+
|
47
|
+
attr_reader :original_error
|
48
|
+
end
|
49
|
+
|
39
50
|
# This handler works with the ResponseTarget plugin to provide smart
|
40
51
|
# retries of S3 streaming operations that support the range parameter
|
41
52
|
# (currently only: get_object). When a 200 OK with a TruncatedBodyError
|
@@ -84,8 +95,18 @@ module Aws
|
|
84
95
|
end
|
85
96
|
|
86
97
|
context.http_response.on_error do |error|
|
87
|
-
if retryable_body?(context)
|
88
|
-
|
98
|
+
if retryable_body?(context)
|
99
|
+
if truncated_body?(error)
|
100
|
+
context.http_request.headers[:range] = "bytes=#{context.http_response.body.size}-"
|
101
|
+
else
|
102
|
+
case context.http_response.body
|
103
|
+
when RetryableManagedFile
|
104
|
+
# call rewind on the underlying file
|
105
|
+
context.http_response.body.instance_variable_get(:@file).rewind
|
106
|
+
else
|
107
|
+
raise NonRetryableStreamingError, error
|
108
|
+
end
|
109
|
+
end
|
89
110
|
end
|
90
111
|
end
|
91
112
|
end
|
data/lib/aws-sdk-s3.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.113.
|
4
|
+
version: 1.113.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-kms
|