-
Notifications
You must be signed in to change notification settings - Fork 662
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
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
e89e0c9
add config and change default behavior of checksum middleware
ee0fb5b
merge main into branch
0efe635
regenerate client
bc3f437
regenerate clients
58bf509
merge protocol test code from main
ab72530
merge from main
b0a53a4
add more test cases
f7b5a2d
add changelog
b93f439
modify s3 internal test
72c3ba6
separate checksum config check and workflow
f70fb1d
Merge branch 'main' into feat-flex-checksum
7bc5326
restore s3 test
28e8ac4
remove unused md5 header
23a7d0e
separate checksum config and workflow
e12cb30
Merge branch 'main' into feat-flex-checksum
df759d3
change default checksum to const
93aee16
add checksum unset enum and modify comment of cfg
b147f0f
change comment
db21450
Merge branch 'main' into feat-flex-checksum
3eb7ed7
Update aws/checksum.go
lucix-aws 6be56d3
change checksum value check logic
05ed9a0
remove old check
3b801c2
correct unseekable stream logic without tls and its test cases
606d1ad
resolve merge conflict
59e520b
revert extra codegen
cda7bcc
change tmv1 upload test cases after introducing flex checksum
e912c0a
Merge branch 'main' into feat-flex-checksum
f84cffb
add error test case for crc64
2df24d6
change test name
1cc4bfc
Merge branch 'main' into feat-flex-checksum
16f3efe
default tmv1 checksum and add flex checksum metrics tracking
2288595
Merge branch 'main' into feat-flex-checksum
24c37b1
regenerate client and add metrics mw test
7dde0a9
add comment to exported type
c6f34d2
update s3 snapshot
29f1c9c
update tmv1 integ test
3f79e71
Merge branch 'main' into feat-flex-checksum
9ff1219
exclude default checksum from presign op
4dd0258
Merge branch 'main' into feat-flex-checksum
25d943c
reorder feature id and simplify metric tracking test
bf57f67
Merge branch 'main' into feat-flex-checksum
cc9af06
update changelog
wty-Bryant 8d71128
Merge branch 'main' into feat-flex-checksum
wty-Bryant 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 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,11 @@ | ||
{ | ||
"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.", | ||
"modules": [ | ||
".", | ||
"config", | ||
wty-Bryant marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"service/internal/checksum", | ||
"service/s3" | ||
] | ||
} |
This file contains 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,33 @@ | ||
package aws | ||
|
||
// RequestChecksumCalculation controls request checksum calculation workflow | ||
type RequestChecksumCalculation int | ||
|
||
const ( | ||
// RequestChecksumCalculationUnset is the unset value for RequestChecksumCalculation | ||
RequestChecksumCalculationUnset RequestChecksumCalculation = iota | ||
|
||
// RequestChecksumCalculationWhenSupported indicates request checksum will be calculated | ||
// if the operation supports input checksums | ||
RequestChecksumCalculationWhenSupported | ||
|
||
// RequestChecksumCalculationWhenRequired indicates request checksum will be calculated | ||
// if required by the operation or if user elects to set a checksum algorithm in request | ||
RequestChecksumCalculationWhenRequired | ||
) | ||
|
||
// ResponseChecksumValidation controls response checksum validation workflow | ||
type ResponseChecksumValidation int | ||
|
||
const ( | ||
wty-Bryant marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// ResponseChecksumValidationUnset is the unset value for ResponseChecksumValidation | ||
ResponseChecksumValidationUnset ResponseChecksumValidation = iota | ||
|
||
// ResponseChecksumValidationWhenSupported indicates response checksum will be validated | ||
// if the operation supports output checksums | ||
ResponseChecksumValidationWhenSupported | ||
|
||
// ResponseChecksumValidationWhenRequired indicates response checksum will only | ||
// be validated if the operation requires output checksum validation | ||
ResponseChecksumValidationWhenRequired | ||
) |
This file contains 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 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 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 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 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 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.
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.
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.