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

CRT Enhancements #285

Merged
merged 12 commits into from
Nov 25, 2023
Merged

CRT Enhancements #285

merged 12 commits into from
Nov 25, 2023

Conversation

nateprewitt
Copy link
Contributor

This PR merges a collection of recent enhancements to the CRTTransferManager to improve both durability and throughput in the CLI/Boto3 when opted into this feature.

kyleknap and others added 11 commits November 2, 2023 16:01
Support file-like objects in CRT transfer manager
For uploads, the CRT S3 client will add CRC32 trailing checksums.
For downloads, the CRT S3 client will validate checksums
associated to the object when possible.
Turn on checksum validation for CRT S3 transfer manager
The CRT S3 client performs best when there is only one
instance of it running on a host. This lock allows an application to
signal across processes whether there is another process of the same
application using the CRT S3 client and prevent spawning more than one
CRT S3 clients running on the system for that application.
Instead of defaulting to five gigabits per second when no target
througput is configured, s3transfer will use the CRT to determine
if there is a recommended target throughput to use. If it is unable,
to determine a recommended target throughput, it will default to
ten gigabits per second, which is the current throughput default
for the CRT S3 client.

This behavior was updated to help minimize the amount of configuration
required to get the fastest throughputs from the CRT transfer client.
The fallback throughput was updated from five to ten gigabits so
that the CRT S3 integration is consistent with the underlying CRT S3
client's defaults.
Update throughput target defaults
The two main changes are:
* Update the CRT S3 client factory to accept a CRT credential
  provider instead of a botocore credential provider. Under the
  hood, the S3 client only accepts a CRT credential provider. So,
  this provides more flexibility in being able to provide other
  CRT credenital providers directly instead of being forced to
  the botocore credential provider interface
* Update the botocore to CRT credentials adapter interface to
  only accept botocore credential objects instead of credential
  providers. In general, the credentials object is more accessible
  than the provider; it can be retrieved at the session level and
  is what is passed into clients. Also, this change avoids
  a limitation where the load_credentials() method on the
  credential provider cannot be called more than twice for some
  configurations (e.g. assume role from profile), which can be
  an issue if you create both a botocore client and CRT S3 client.
Update interface for providing credentials to CRT
@nateprewitt nateprewitt requested a review from kyleknap November 25, 2023 00:11
@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2023

Codecov Report

Attention: 123 lines in your changes are missing coverage. Please review.

Comparison is base (cc9345a) 85.36% compared to head (87445dd) 83.15%.

Files Patch % Lines
s3transfer/crt.py 0.00% 123 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #285      +/-   ##
===========================================
- Coverage    85.36%   83.15%   -2.21%     
===========================================
  Files           16       16              
  Lines         2719     2796      +77     
===========================================
+ Hits          2321     2325       +4     
- Misses         398      471      +73     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@kyleknap kyleknap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@nateprewitt nateprewitt merged commit 1bd5298 into develop Nov 25, 2023
@nateprewitt nateprewitt deleted the crt-enhancements branch November 25, 2023 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants