-
Notifications
You must be signed in to change notification settings - Fork 4.3k
[v2] Expose io_chunksize S3 transfer config #9678
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
Open
hssyoo
wants to merge
2
commits into
v2
Choose a base branch
from
expose-io-chunksize
base: v2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+35
−1
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"type": "enhancement", | ||
"category": "``s3``", | ||
"description": "Expose S3 transfer config's ``io_chunksize`` in shared config file" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is the default set? I see we have some defaults configured as well, should it be added there?
https://github.com/aws/aws-cli/pull/9678/files#diff-280c24f20aa46551fbfd53f1910ece8ac396fae5de0956cf3555015592d45161L25
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default is set here:
aws-cli/awscli/s3transfer/manager.py
Line 63 in b9b9e44
We don't need to add it there since it's an optional param with a default value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm missing something, since I don't see the
RuntimeConfig
object gets used anywhere else, but there is a docstring that was munged during lint/format changes that specifies the use ofDEFAULTS
:https://github.com/aws/aws-cli/pull/9678/files#diff-280c24f20aa46551fbfd53f1910ece8ac396fae5de0956cf3555015592d45161L13-L15
The rest of the parameters respected from the
s3
sub-section in the config file are also set inDEFAULTS
.There is a unit test for
RuntimeConfig
that checks if the object created matches what is inDEFAULTS
. As is,io_chunksize
won't be set when creating theRuntimeConfig
object, though, only when creating theTransferConfig
, like here:aws-cli/awscli/customizations/s3/subcommands.py
Line 756 in 01779c1
If this object has a new member, shouldn't that test reflect it?
aws-cli/tests/unit/customizations/s3/test_transferconfig.py
Line 30 in 9824a9a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'm not sure I understand what the problem is when the
TransferConfig
object's initializer has an explicit default value forio_chunksize
. This is the behavior it uses today, ie AWS CLI will always setio_chunksize
to 256KB. It's possible the CLI-specific defaults are there from v1, beforebotocore
was vended just in casebotocore
decided to change its defaults. But I can just add it to our defaults if it'll make it easier