Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: multipart copy #319

Merged
merged 3 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## 0.13.4

- Added feature flags `"s3", "sqs", "athena", "lambda"`. By default, all features are enabled, so no breaking change.
- Added MultipartCopy to allow copy of files larger than 5GB.

## 0.13.3

Expand Down
11 changes: 9 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,38 @@ lambda = ["aws_lambda_events"]
anyhow = "1.0"
async-trait = "0.1"
aws-config = { version = "1.3.0", features = ["behavior-version-latest"] }
aws-sdk-athena = { version = "1.23.0", optional = true}
aws-sdk-athena = { version = "1.23.0", optional = true }
aws-sdk-s3 = { version = "1.25.0", optional = true }
aws-sdk-sqs = { version = "1.22.0", optional = true }
aws-smithy-async = { version ="1.2.1", optional = true }
aws-smithy-async = { version = "1.2.1", optional = true }
aws-smithy-runtime-api = "1.5.0"
aws-types = "1.2.0"
aws_lambda_events = { version = "0.15", default-features = false, features = ["sqs"], optional = true }
bytes = "1.6.0"
bytesize = "1.3"
clap = { version = "4.5", features = ["derive", "env"] }
conv = "0.3.3"
derivative = "2.2"
derive_more = "0.99.17"
either = "1.12.0"
futures = "0.3"
http = "1.1"
lambda_runtime = "0.11.1"
serde = "1.0"
serde_json = "1.0"
thiserror = "1.0.61"
tokio = { version = "1.37", features = ["macros"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["json", "env-filter"] }
typed-builder = "0.18.2"
url = { version = "2.5", features = ["serde"] }

[dev-dependencies]
function_name = "0.3.0"
proptest = "1.4.0"
rand = "0.8.5"
rand_chacha = "0.3.1"
reqwest = { version = "0.12.4", features = ["json"] }
serial_test = "3.1.1"
test-strategy = "0.3.1"
tokio-test = "0.4.4"
10 changes: 10 additions & 0 deletions proptest-regressions/s3/multipartcopy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Seeds for failure cases proptest has generated in the past. It is
# automatically read and these particular cases re-run before any
# novel cases are generated.
#
# It is recommended to check this file in to source control so that
# everyone who runs the test benefits from these saved cases.
cc 71f24b033b3e7c3dce10c3a0308243ead2049b247a2031e735effe5c60928976 # shrinks to input = _TestPartCountArgs { source_size: 1, part_size: 9007199254740993 }
cc ce8fa5c461e794c4f2e4926087fa42d703c2cd6d98905320492a4e1d6c518928 # shrinks to input = _TestPartCountLargeValuesArgs { source_size: 4611686018427387903, part_size: 1 }
cc b0dec3e6e5f7a74caa04b85084640c8989c646588cdda586f7b8e43404d5d127 # shrinks to input = _TestValidByteRangeArgs { part_number: 5, part_size: PartSize(3956993702), source_size: SourceSize(0) }
cc 70207a2f433c11b58aa1d44f118c5972e28ebf0ea022c17c007162834fc482fb # shrinks to input = _TestPartCountSmallSourceArgs { part_size: PartSize(5242880), source: 0 }
2 changes: 2 additions & 0 deletions src/s3/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ pub use aws_sdk_s3::Client;

mod async_multipart_put_object;
mod async_put_object;
mod multipartcopy;
mod s3_object;
pub use async_multipart_put_object::AsyncMultipartUpload;
pub use async_put_object::AsyncPutObject;
pub use multipartcopy::{PartSize, S3MultipartCopier, S3MultipartCopierError};
pub use s3_object::S3Object;

/// `FuturesStreamCompatByteStream` is a compatibility layer struct designed to wrap
Expand Down
Loading