aws-sdk-s3 1.232.1 → 1.232.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/client.rb +1 -1
- data/lib/aws-sdk-s3/customizations/object.rb +34 -25
- data/lib/aws-sdk-s3/transfer_manager.rb +44 -31
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ecc05275841ac516f5ca697b319593901203e00c3ef3674870fa0ae842c11453
|
|
4
|
+
data.tar.gz: 59326a69cd6659c12d2975b9d180aafa4be788d567048f03ad6a1b22f9e1e382
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0657b49f47f041cd1d3cfed2f1eb6edcd2c0529809f83e94b8986f008615c3b34df9f75937026f06578709895e21c811ec258dfd52275455d1647ca0c9243194
|
|
7
|
+
data.tar.gz: fd1d722abbeb71f60fe3ec8d3ecf4c1a808d2d8e54ec9f4260f1dc628c7797c343671d7f001e4d0df85004cea2a26c7df71897aa6258b9f8ed7774fd2f2c0388
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
Unreleased Changes
|
|
2
2
|
------------------
|
|
3
3
|
|
|
4
|
+
1.232.2 (2026-09-25)
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
* Issue - Ensure the internally-created executor is shutdown on error in `TransferManager` and `Aws::S3::Object` resource methods, preventing leaked worker threads on multipart transfer failures (#3419).
|
|
8
|
+
|
|
4
9
|
1.232.1 (2026-09-16)
|
|
5
10
|
------------------
|
|
6
11
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.232.
|
|
1
|
+
1.232.2
|
data/lib/aws-sdk-s3/client.rb
CHANGED
|
@@ -24209,7 +24209,7 @@ module Aws::S3
|
|
|
24209
24209
|
tracer: tracer
|
|
24210
24210
|
)
|
|
24211
24211
|
context[:gem_name] = 'aws-sdk-s3'
|
|
24212
|
-
context[:gem_version] = '1.232.
|
|
24212
|
+
context[:gem_version] = '1.232.2'
|
|
24213
24213
|
Seahorse::Client::Request.new(handlers, context)
|
|
24214
24214
|
end
|
|
24215
24215
|
|
|
@@ -406,17 +406,20 @@ module Aws
|
|
|
406
406
|
def upload_stream(options = {}, &block)
|
|
407
407
|
upload_opts = options.merge(bucket: bucket_name, key: key)
|
|
408
408
|
executor = DefaultExecutor.new(max_threads: upload_opts.delete(:thread_count))
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
409
|
+
begin
|
|
410
|
+
uploader = MultipartStreamUploader.new(
|
|
411
|
+
client: client,
|
|
412
|
+
executor: executor,
|
|
413
|
+
tempfile: upload_opts.delete(:tempfile),
|
|
414
|
+
part_size: upload_opts.delete(:part_size)
|
|
415
|
+
)
|
|
416
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
417
|
+
uploader.upload(upload_opts, &block)
|
|
418
|
+
end
|
|
419
|
+
true
|
|
420
|
+
ensure
|
|
421
|
+
executor.shutdown
|
|
417
422
|
end
|
|
418
|
-
executor.shutdown
|
|
419
|
-
true
|
|
420
423
|
end
|
|
421
424
|
deprecated(:upload_stream, use: 'Aws::S3::TransferManager#upload_stream', version: 'next major version')
|
|
422
425
|
|
|
@@ -480,17 +483,20 @@ module Aws
|
|
|
480
483
|
def upload_file(source, options = {})
|
|
481
484
|
upload_opts = options.merge(bucket: bucket_name, key: key)
|
|
482
485
|
executor = DefaultExecutor.new(max_threads: upload_opts.delete(:thread_count))
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
486
|
+
begin
|
|
487
|
+
uploader = FileUploader.new(
|
|
488
|
+
client: client,
|
|
489
|
+
executor: executor,
|
|
490
|
+
multipart_threshold: upload_opts.delete(:multipart_threshold)
|
|
491
|
+
)
|
|
492
|
+
response = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
493
|
+
uploader.upload(source, upload_opts)
|
|
494
|
+
end
|
|
495
|
+
yield response if block_given?
|
|
496
|
+
true
|
|
497
|
+
ensure
|
|
498
|
+
executor.shutdown
|
|
490
499
|
end
|
|
491
|
-
yield response if block_given?
|
|
492
|
-
executor.shutdown
|
|
493
|
-
true
|
|
494
500
|
end
|
|
495
501
|
deprecated(:upload_file, use: 'Aws::S3::TransferManager#upload_file', version: 'next major version')
|
|
496
502
|
|
|
@@ -562,12 +568,15 @@ module Aws
|
|
|
562
568
|
def download_file(destination, options = {})
|
|
563
569
|
download_opts = options.merge(bucket: bucket_name, key: key)
|
|
564
570
|
executor = DefaultExecutor.new(max_threads: download_opts.delete([:thread_count]))
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
571
|
+
begin
|
|
572
|
+
downloader = FileDownloader.new(client: client, executor: executor)
|
|
573
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
574
|
+
downloader.download(destination, download_opts)
|
|
575
|
+
end
|
|
576
|
+
true
|
|
577
|
+
ensure
|
|
578
|
+
executor.shutdown
|
|
568
579
|
end
|
|
569
|
-
executor.shutdown
|
|
570
|
-
true
|
|
571
580
|
end
|
|
572
581
|
deprecated(:download_file, use: 'Aws::S3::TransferManager#download_file', version: 'next major version')
|
|
573
582
|
|
|
@@ -161,10 +161,12 @@ module Aws
|
|
|
161
161
|
def download_directory(destination, bucket:, **options)
|
|
162
162
|
Aws::Plugins::UserAgent.metric('S3_TRANSFER', 'S3_TRANSFER_DOWNLOAD_DIRECTORY') do
|
|
163
163
|
executor = @executor || DefaultExecutor.new(max_threads: options.delete(:thread_count))
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
begin
|
|
165
|
+
downloader = DirectoryDownloader.new(client: @client, executor: executor, logger: @logger)
|
|
166
|
+
downloader.download(destination, bucket: bucket, **options)
|
|
167
|
+
ensure
|
|
168
|
+
executor.shutdown unless @executor
|
|
169
|
+
end
|
|
168
170
|
end
|
|
169
171
|
end
|
|
170
172
|
|
|
@@ -246,10 +248,13 @@ module Aws
|
|
|
246
248
|
def download_file(destination, bucket:, key:, **options)
|
|
247
249
|
download_opts = options.merge(bucket: bucket, key: key)
|
|
248
250
|
executor = @executor || DefaultExecutor.new(max_threads: download_opts.delete(:thread_count))
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
begin
|
|
252
|
+
downloader = FileDownloader.new(client: @client, executor: executor)
|
|
253
|
+
downloader.download(destination, download_opts)
|
|
254
|
+
true
|
|
255
|
+
ensure
|
|
256
|
+
executor.shutdown unless @executor
|
|
257
|
+
end
|
|
253
258
|
end
|
|
254
259
|
|
|
255
260
|
# Uploads all files under the given directory to the provided S3 bucket.
|
|
@@ -361,10 +366,12 @@ module Aws
|
|
|
361
366
|
def upload_directory(source, bucket:, **options)
|
|
362
367
|
Aws::Plugins::UserAgent.metric('S3_TRANSFER', 'S3_TRANSFER_UPLOAD_DIRECTORY') do
|
|
363
368
|
executor = @executor || DefaultExecutor.new(max_threads: options.delete(:thread_count))
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
369
|
+
begin
|
|
370
|
+
uploader = DirectoryUploader.new(client: @client, executor: executor, logger: @logger)
|
|
371
|
+
uploader.upload(source, bucket, **options.merge(http_chunk_size: resolve_http_chunk_size(options)))
|
|
372
|
+
ensure
|
|
373
|
+
executor.shutdown unless @executor
|
|
374
|
+
end
|
|
368
375
|
end
|
|
369
376
|
end
|
|
370
377
|
|
|
@@ -445,16 +452,19 @@ module Aws
|
|
|
445
452
|
http_chunk_size = resolve_http_chunk_size(upload_opts)
|
|
446
453
|
|
|
447
454
|
executor = @executor || DefaultExecutor.new(max_threads: upload_opts.delete(:thread_count))
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
455
|
+
begin
|
|
456
|
+
uploader = FileUploader.new(
|
|
457
|
+
multipart_threshold: upload_opts.delete(:multipart_threshold),
|
|
458
|
+
http_chunk_size: http_chunk_size,
|
|
459
|
+
client: @client,
|
|
460
|
+
executor: executor
|
|
461
|
+
)
|
|
462
|
+
response = uploader.upload(source, upload_opts)
|
|
463
|
+
yield response if block_given?
|
|
464
|
+
true
|
|
465
|
+
ensure
|
|
466
|
+
executor.shutdown unless @executor
|
|
467
|
+
end
|
|
458
468
|
end
|
|
459
469
|
|
|
460
470
|
# Uploads a stream in a streaming fashion to S3.
|
|
@@ -512,15 +522,18 @@ module Aws
|
|
|
512
522
|
def upload_stream(bucket:, key:, **options, &block)
|
|
513
523
|
upload_opts = options.merge(bucket: bucket, key: key)
|
|
514
524
|
executor = @executor || DefaultExecutor.new(max_threads: upload_opts.delete(:thread_count))
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
525
|
+
begin
|
|
526
|
+
uploader = MultipartStreamUploader.new(
|
|
527
|
+
client: @client,
|
|
528
|
+
executor: executor,
|
|
529
|
+
tempfile: upload_opts.delete(:tempfile),
|
|
530
|
+
part_size: upload_opts.delete(:part_size)
|
|
531
|
+
)
|
|
532
|
+
uploader.upload(upload_opts, &block)
|
|
533
|
+
true
|
|
534
|
+
ensure
|
|
535
|
+
executor.shutdown unless @executor
|
|
536
|
+
end
|
|
524
537
|
end
|
|
525
538
|
|
|
526
539
|
private
|
data/lib/aws-sdk-s3.rb
CHANGED