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

feat: flexible checksum updates #2808

Merged
merged 43 commits into from
Jan 14, 2025
Merged

feat: flexible checksum updates #2808

merged 43 commits into from
Jan 14, 2025

Conversation

wty-Bryant
Copy link
Contributor

Add client cfg to opt-in/out checksum calculation/validation, change default algorithm to calculate checksum

@wty-Bryant wty-Bryant requested a review from a team as a code owner September 26, 2024 03:33
aws/checksum.go Show resolved Hide resolved
aws/checksum.go Outdated Show resolved Hide resolved
aws/checksum.go Outdated Show resolved Hide resolved
aws/checksum.go Outdated Show resolved Hide resolved
config/provider.go Show resolved Hide resolved
config/provider.go Show resolved Hide resolved
service/internal/checksum/middleware_add.go Show resolved Hide resolved
service/internal/checksum/middleware_setup_context.go Outdated Show resolved Hide resolved
.changelog/9ebe24c4791541e0840da49eab6f9d97.json Outdated Show resolved Hide resolved
.changelog/9ebe24c4791541e0840da49eab6f9d97.json Outdated Show resolved Hide resolved
aws/checksum.go Outdated Show resolved Hide resolved
aws/checksum.go Outdated Show resolved Hide resolved
aws/checksum.go Outdated Show resolved Hide resolved
service/internal/checksum/middleware_add.go Outdated Show resolved Hide resolved
service/internal/checksum/middleware_setup_context.go Outdated Show resolved Hide resolved
service/internal/checksum/middleware_setup_context.go Outdated Show resolved Hide resolved
service/internal/checksum/middleware_add.go Show resolved Hide resolved
config/load_options.go Show resolved Hide resolved
config/shared_config.go Outdated Show resolved Hide resolved
service/internal/checksum/middleware_add.go Outdated Show resolved Hide resolved
aws/config.go Outdated Show resolved Hide resolved
config/load_options.go Show resolved Hide resolved
aws/config.go Outdated Show resolved Hide resolved
aws/checksum.go Outdated Show resolved Hide resolved
feature/s3/manager/integ_upload_test.go Show resolved Hide resolved
service/internal/checksum/algorithms.go Show resolved Hide resolved
config/load_options.go Outdated Show resolved Hide resolved
aws/middleware/user_agent.go Show resolved Hide resolved
aws/middleware/user_agent.go Show resolved Hide resolved

// ID provides the middleware identifier
func (m *RequestChecksumMetricsTracking) ID() string {
return "AWSChecksum:RequestMetricsTracking"
Copy link
Contributor

Choose a reason for hiding this comment

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

[observation] we don't follow this pattern of x:yon other middlewares, but I like how you used it here

feature/s3/manager/integ_upload_test.go Outdated Show resolved Hide resolved
@lucix-aws lucix-aws changed the title [DO NOT MERGE] Feat flex checksum feat: flexible checksum updates 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.",
Copy link
Contributor

Choose a reason for hiding this comment

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

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.",

@wty-Bryant wty-Bryant merged commit 6636822 into main Jan 14, 2025
13 checks passed
@wty-Bryant wty-Bryant deleted the feat-flex-checksum branch January 14, 2025 22:15
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