Merged
Conversation
added 8 commits
September 25, 2024 17:59
lucix-aws
reviewed
Sep 26, 2024
lucix-aws
reviewed
Sep 26, 2024
lucix-aws
reviewed
Sep 26, 2024
added 4 commits
September 29, 2024 16:53
Madrigal
reviewed
Sep 30, 2024
lucix-aws
reviewed
Sep 30, 2024
added 3 commits
October 1, 2024 15:25
Madrigal
reviewed
Oct 2, 2024
service/internal/checksum/middleware_compute_input_checksum_test.go
Outdated
Show resolved
Hide resolved
Madrigal
reviewed
Oct 7, 2024
lucix-aws
reviewed
Oct 7, 2024
lucix-aws
reviewed
Oct 7, 2024
added 2 commits
October 7, 2024 17:42
merge main into branch
lucix-aws
reviewed
Oct 8, 2024
Madrigal
reviewed
Dec 18, 2024
|
|
||
| // ID provides the middleware identifier | ||
| func (m *RequestChecksumMetricsTracking) ID() string { | ||
| return "AWSChecksum:RequestMetricsTracking" |
Contributor
There was a problem hiding this comment.
[observation] we don't follow this pattern of x:yon other middlewares, but I like how you used it here
service/internal/checksum/middleware_checksum_metrics_tracking_test.go
Outdated
Show resolved
Hide resolved
merge main to branch
merge main into branch
Madrigal
reviewed
Jan 14, 2025
| { | ||
| "id": "9ebe24c4-7915-41e0-840d-a49eab6f9d97", | ||
| "type": "feature", | ||
| "description": "S3 client behavior is updated to always calculate a checksum by default for operations that support it (such as PutObject or UploadPart), or require it (such as DeleteObjects). The checksum algorithm used by default now becomes CRC32. Checksum behavior can be configured using `when_supported` and `when_required` options - in code using RequestChecksumCalculation, in shared config using request_checksum_calculation, or as env variable using AWS_REQUEST_CHECKSUM_CALCULATION. The S3 client attempts to validate response checksums for all S3 API operations that support checksums. However, if the SDK has not implemented the specified checksum algorithm then this validation is skipped. Checksum validation behavior can be configured using `when_supported` and `when_required` options - in code using ResponseChecksumValidation, in shared config using response_checksum_validation, or as env variable using AWS_RESPONSE_CHECKSUM_VALIDATION.", |
Contributor
There was a problem hiding this comment.
Suggested change
| "description": "S3 client behavior is updated to always calculate a checksum by default for operations that support it (such as PutObject or UploadPart), or require it (such as DeleteObjects). The checksum algorithm used by default now becomes CRC32. Checksum behavior can be configured using `when_supported` and `when_required` options - in code using RequestChecksumCalculation, in shared config using request_checksum_calculation, or as env variable using AWS_REQUEST_CHECKSUM_CALCULATION. The S3 client attempts to validate response checksums for all S3 API operations that support checksums. However, if the SDK has not implemented the specified checksum algorithm then this validation is skipped. Checksum validation behavior can be configured using `when_supported` and `when_required` options - in code using ResponseChecksumValidation, in shared config using response_checksum_validation, or as env variable using AWS_RESPONSE_CHECKSUM_VALIDATION.", | |
| "description": "S3 client behavior is updated to always calculate a checksum by default for operations that support it (such as PutObject or UploadPart), or require it (such as DeleteObjects). The checksum algorithm used by default now becomes CRC32. Checksum behavior can be configured using `when_supported` and `when_required` options in 3 different places - in code using RequestChecksumCalculation, in shared config using request_checksum_calculation, or as env variable using AWS_REQUEST_CHECKSUM_CALCULATION. The S3 client attempts to validate response checksums for all S3 API operations that support checksums. However, if a different checksum algorithm is specified and the SDK has not yet implemented it, this validation is skipped. Checksum validation behavior can be configured using `when_supported` and `when_required` options in 3 places as well - in code using ResponseChecksumValidation, in shared config using response_checksum_validation, or as env variable using AWS_RESPONSE_CHECKSUM_VALIDATION.", |
Madrigal
approved these changes
Jan 14, 2025
stanhu
added a commit
to stanhu/aws-sdk-go-v2
that referenced
this pull request
Jul 21, 2025
As announced in aws#2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (aws#2808) that adopted the new default integrity protections. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default. This commit checks the S3 options and only attaches the CRC32 checksums if `when_required` is not set. Relates to aws#3007
stanhu
added a commit
to stanhu/aws-sdk-go-v2
that referenced
this pull request
Jul 21, 2025
As announced in aws#2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (aws#2808) that adopted the new default integrity protections. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default. This commit checks the S3 options and only attaches the CRC32 checksums if `when_required` is not set. Relates to aws#3007 Signed-off-by: Stan Hu <stanhu@gmail.com>
stanhu
added a commit
to stanhu/aws-sdk-go-v2
that referenced
this pull request
Jul 21, 2025
As announced in aws#2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (aws#2808) that adopted the new default integrity protections. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default. This commit checks the S3 options and only attaches the CRC32 checksums if `when_required` is not set. Relates to aws#3007 Signed-off-by: Stan Hu <stanhu@gmail.com>
stanhu
added a commit
to stanhu/aws-sdk-go-v2
that referenced
this pull request
Jul 21, 2025
As announced in aws#2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (aws#2808) that adopted the new default integrity protections. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default. This commit checks the S3 options and only attaches the CRC32 checksums if `when_required` is not set. Relates to aws#3007 Signed-off-by: Stan Hu <stanhu@gmail.com>
stanhu
added a commit
to stanhu/aws-sdk-go-v2
that referenced
this pull request
Jul 21, 2025
As announced in aws#2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (aws#2808) that adopted the new default integrity protections. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default. This commit checks the S3 options and only attaches the CRC32 checksums if `when_required` is not set. Relates to aws#3007 Signed-off-by: Stan Hu <stanhu@gmail.com>
stanhu
added a commit
to stanhu/aws-sdk-go-v2
that referenced
this pull request
Jul 21, 2025
As announced in aws#2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (aws#2808) that adopted the new default integrity protections. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default. This commit checks the S3 options and only attaches the CRC32 checksums if `when_required` is not set. Relates to aws#3007 Signed-off-by: Stan Hu <stanhu@gmail.com>
stanhu
added a commit
to stanhu/aws-sdk-go-v2
that referenced
this pull request
Jul 21, 2025
As announced in aws#2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (aws#2808) that adopted the new default integrity protections. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default. This commit checks the S3 options and only attaches the CRC32 checksums if `when_required` is not set. Relates to aws#3007 Signed-off-by: Stan Hu <stanhu@gmail.com>
stanhu
added a commit
to stanhu/aws-sdk-go-v2
that referenced
this pull request
Jul 21, 2025
As announced in aws#2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (aws#2808) that adopted the new default integrity protections. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default. This commit checks the S3 options and only attaches the CRC32 checksums if `when_required` is not set. Relates to aws#3007 Signed-off-by: Stan Hu <stanhu@gmail.com>
wty-Bryant
pushed a commit
that referenced
this pull request
Jul 22, 2025
…3148) As announced in #2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (#2808) that adopted the new default integrity protections. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default. This commit checks the S3 options and only attaches the CRC32 checksums if `when_required` is not set. Relates to #3007 Signed-off-by: Stan Hu <stanhu@gmail.com>
stanhu
added a commit
to stanhu/aws-sdk-go-v2
that referenced
this pull request
Jul 25, 2025
… default checksums (aws#3148) As announced in aws#2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (aws#2808) that adopted new default integrity protections, automatically calculating CRC32 checksums for operations like PutObject and UploadPart. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default regardless of the global setting. This commit adds a new `RequestChecksumCalculation` field to the Uploader struct that allows users to control checksum behavior: - `RequestChecksumCalculationWhenSupported` (default): Always calculates CRC32 checksums for multipart uploads - `RequestChecksumCalculationWhenRequired`: Only calculates checksums when explicitly set by the user, preserving backwards compatibility For example: ```go uploader := manager.NewUploader(client, func(u *manager.Uploader) { u.RequestChecksumCalculation = aws.RequestChecksumCalculationWhenRequired }) ``` S3 Express One Zone buckets always require CRC32 checksums regardless of this setting, as mandated by the S3 Express service requirements. The uploader automatically detects S3 Express buckets (names ending with `--x-s3`) and applies CRC32 checksums unconditionally. Fixes aws#3007
stanhu
added a commit
to stanhu/aws-sdk-go-v2
that referenced
this pull request
Jul 25, 2025
As announced in aws#2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (aws#2808) that adopted new default integrity protections, automatically calculating CRC32 checksums for operations like PutObject and UploadPart. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default regardless of the global setting. This commit adds a new `RequestChecksumCalculation` field to the Uploader struct that allows users to control checksum behavior: - `RequestChecksumCalculationWhenSupported` (default): Always calculates CRC32 checksums for multipart uploads - `RequestChecksumCalculationWhenRequired`: Only calculates checksums when explicitly set by the user, preserving backwards compatibility For example: ```go uploader := manager.NewUploader(client, func(u *manager.Uploader) { u.RequestChecksumCalculation = aws.RequestChecksumCalculationWhenRequired }) ``` S3 Express One Zone buckets always require CRC32 checksums regardless of this setting, as mandated by the S3 Express service requirements. The uploader automatically detects S3 Express buckets (names ending with `--x-s3`) and applies CRC32 checksums unconditionally. Fixes aws#3007
stanhu
added a commit
to stanhu/aws-sdk-go-v2
that referenced
this pull request
Jul 25, 2025
As announced in aws#2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (aws#2808) that adopted new default integrity protections, automatically calculating CRC32 checksums for operations like PutObject and UploadPart. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default regardless of the global setting. This commit adds a new `RequestChecksumCalculation` field to the Uploader struct that allows users to control checksum behavior: - `RequestChecksumCalculationWhenSupported` (default): Always calculates CRC32 checksums for multipart uploads - `RequestChecksumCalculationWhenRequired`: Only calculates checksums when explicitly set by the user, preserving backwards compatibility For example: ```go uploader := manager.NewUploader(client, func(u *manager.Uploader) { u.RequestChecksumCalculation = aws.RequestChecksumCalculationWhenRequired }) ``` S3 Express One Zone buckets always require CRC32 checksums regardless of this setting, as mandated by the S3 Express service requirements. The uploader automatically detects S3 Express buckets (names ending with `--x-s3`) and applies CRC32 checksums unconditionally. Fixes aws#3007 Signed-off-by: Stan Hu <stanhu@gmail.com>
stanhu
added a commit
to stanhu/aws-sdk-go-v2
that referenced
this pull request
Jul 25, 2025
As announced in aws#2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (aws#2808) that adopted new default integrity protections, automatically calculating CRC32 checksums for operations like PutObject and UploadPart. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default regardless of the global setting. This commit adds a new `RequestChecksumCalculation` field to the Uploader struct that allows users to control checksum behavior: - `RequestChecksumCalculationWhenSupported` (default): Always calculates CRC32 checksums for multipart uploads - `RequestChecksumCalculationWhenRequired`: Only calculates checksums when explicitly set by the user, preserving backwards compatibility For example: ```go uploader := manager.NewUploader(client, func(u *manager.Uploader) { u.RequestChecksumCalculation = aws.RequestChecksumCalculationWhenRequired }) ``` S3 Express One Zone buckets always require CRC32 checksums regardless of this setting, as mandated by the S3 Express service requirements. The uploader automatically detects S3 Express buckets (names ending with `--x-s3`) and applies CRC32 checksums unconditionally. Fixes aws#3007 Signed-off-by: Stan Hu <stanhu@gmail.com>
stanhu
added a commit
to stanhu/aws-sdk-go-v2
that referenced
this pull request
Aug 8, 2025
As announced in aws#2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (aws#2808) that adopted new default integrity protections, automatically calculating CRC32 checksums for operations like PutObject and UploadPart. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default regardless of the global setting. This commit adds a new `RequestChecksumCalculation` field to the Uploader struct that allows users to control checksum behavior: - `RequestChecksumCalculationWhenSupported` (default): Always calculates CRC32 checksums for multipart uploads - `RequestChecksumCalculationWhenRequired`: Only calculates checksums when explicitly set by the user, preserving backwards compatibility For example: ```go uploader := manager.NewUploader(client, func(u *manager.Uploader) { u.RequestChecksumCalculation = aws.RequestChecksumCalculationWhenRequired }) ``` S3 Express One Zone buckets always require CRC32 checksums regardless of this setting, as mandated by the S3 Express service requirements. The uploader automatically detects S3 Express buckets (names ending with `--x-s3`) and applies CRC32 checksums unconditionally. Fixes aws#3007 Signed-off-by: Stan Hu <stanhu@gmail.com>
stanhu
added a commit
to stanhu/aws-sdk-go-v2
that referenced
this pull request
Aug 8, 2025
As announced in aws#2960, AWS SDK for Go v2 service/s3 v1.73.0 shipped a change (aws#2808) that adopted new default integrity protections, automatically calculating CRC32 checksums for operations like PutObject and UploadPart. While it is possible to revert to the previous behavior by setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting did not apply to the S3 Manager multipart uploader, which always enabled CRC32 checksums by default regardless of the global setting. This commit adds a new `RequestChecksumCalculation` field to the Uploader struct that allows users to control checksum behavior: - `RequestChecksumCalculationWhenSupported` (default): Always calculates CRC32 checksums for multipart uploads - `RequestChecksumCalculationWhenRequired`: Only calculates checksums when explicitly set by the user, preserving backwards compatibility For example: ```go uploader := manager.NewUploader(client, func(u *manager.Uploader) { u.RequestChecksumCalculation = aws.RequestChecksumCalculationWhenRequired }) ``` S3 Express One Zone buckets always require CRC32 checksums regardless of this setting, as mandated by the S3 Express service requirements. The uploader automatically detects S3 Express buckets (names ending with `--x-s3`) and applies CRC32 checksums unconditionally. Fixes aws#3007 Signed-off-by: Stan Hu <stanhu@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add client cfg to opt-in/out checksum calculation/validation, change default algorithm to calculate checksum