-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Default checksum calculation for httpChecksum to CRC32 #3090
Conversation
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.
Nice - looks good overall.
gems/aws-sdk-core/lib/aws-sdk-core/plugins/checksum_algorithm.rb
Outdated
Show resolved
Hide resolved
Detected 2 possible performance regressions:
|
Detected 4 possible performance regressions:
|
Detected 5 possible performance regressions:
|
Detected 5 possible performance regressions:
|
Detected 5 possible performance regressions:
|
Detected 5 possible performance regressions:
|
Detected 5 possible performance regressions:
|
Detected 1 possible performance regressions:
|
1 similar comment
Detected 1 possible performance regressions:
|
gems/aws-sdk-core/lib/aws-sdk-core/plugins/checksum_algorithm.rb
Outdated
Show resolved
Hide resolved
gems/aws-sdk-core/lib/aws-sdk-core/plugins/checksum_algorithm.rb
Outdated
Show resolved
Hide resolved
gems/aws-sdk-core/lib/aws-sdk-core/plugins/checksum_algorithm.rb
Outdated
Show resolved
Hide resolved
gems/aws-sdk-core/lib/aws-sdk-core/plugins/checksum_algorithm.rb
Outdated
Show resolved
Hide resolved
DOCS | ||
|
||
def after_initialize(client) | ||
client.config.request_checksum_calculation = |
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 see why we need to do this for the legacy option.... but I am pretty concerned about the customer behavior from this. Doing this effectively means that request_checksum_calculation
does not work at all for S3 - that is, its value is ignored no matter where it is set (client, ENV, shared config). I think thats pretty confusing.
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.
Yeah, agreed. I think client.config.request_checksum_calculation = 'when_required' unless client.config.compute_checksums
satisfies the concern?
User doesn’t set compute checksums:
- This value defaults to true
- User can freely set new config to required or optional and it will be honored.
User set compute checksums to false:
- Setting new config to when_required basically does the same thing
- Setting to when_optional would maybe be confusing because it would be overwritten, but they have explicitly already chosen a conflicting option of compute checksums false.
I can update the documentation but the "false" case and "when_optional" is probably a less likely use case. However computing checksums in general would make sense to override the when optional anyway.
Defaults CRC32 for httpChecksum implementations and adds CRC64 as a new algorithm.