botocore icon indicating copy to clipboard operation
botocore copied to clipboard

Default to CRC32 for Request Checksum Calculation

Open jonathan343 opened this issue 1 year ago • 1 comments

This PR makes the following updates to the botocore flexible checksum behavior:

General:

  • Remove MD5 checksums and make CRC32 the default checksum algorithm.
  • When the request_checksum_calculation config is set to when_supported (default value), a checksum will be generated whenever one of the following conditions is true:
    • An operation applies the httpchecksum trait and defines a requestAlgorithmMember.
    • An operation applies the httpchecksum trait and defines requestChecksumRequired: true.
  • When the request_checksum_calculation config is set to when_required, a checksum will be generated only when:
    • An operation applies the httpchecksum trait and defines requestChecksumRequired: true.

S3 Customizations:

  • Deprecates existing customizations for MD5 checksums.

~~"CreateMultipartUpload is modeled with a ChecksumAlgorithm member. This member signals to S3 the checksum algorithm that will be used for the related UploadPart operations. If this ChecksumAlgorithm differs from the SDK's default algorithm chosen for UploadPart operations, then S3 will return an error."~~

  • ~~A set_default_multipart_checksum_algorithm handler was implemented to set ChecksumAlgorithm to CRC32 when it isn't set by the customer.~~

jonathan343 avatar Oct 08 '24 20:10 jonathan343

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 97.95918% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (flexible-checksums-v2@fac0754). Learn more about missing BASE report.

Files with missing lines Patch % Lines
botocore/utils.py 66.66% 1 Missing :warning:

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

Additional details and impacted files
@@                   Coverage Diff                    @@
##             flexible-checksums-v2    #3277   +/-   ##
========================================================
  Coverage                         ?   93.14%           
========================================================
  Files                            ?       66           
  Lines                            ?    14424           
  Branches                         ?        0           
========================================================
  Hits                             ?    13435           
  Misses                           ?      989           
  Partials                         ?        0           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Oct 08 '24 21:10 codecov-commenter

This work is being tracked internally.

jonathan343 avatar Dec 19 '24 15:12 jonathan343