-
Notifications
You must be signed in to change notification settings - Fork 78
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 v2 #1803
Merged
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
452351a
Add requestChecksumCalculation and responseChecksumValidation configs…
5e736d2
Add value resolvers for requestChecksumCalculation and responseChecks…
780e3f3
Add requestChecksumCalculation and responseChecksumValidation configs…
8fba8dd
Add context extension for getting and setting the new config options;…
6922099
Clean up flexchex request middleware conditionals into one logical fl…
d1ec299
Fix validation mode logic in flexchex response middleware; now it use…
5206a1e
Update flexchex request middleware codegen to pass in request checksu…
436757a
Update runtime tests for flexchex middlewares + add a test for no req…
095890c
Update codegen tests.
5e3a4b6
Merge branch 'main' into feat/flexible-checksum-v2
93264a4
Add CRC64NVME as one of the algorithms to check for in flexchex respo…
d8038c0
Add test case for no response validation when validation mode unset a…
798c31b
Address compile time errors in generated code.
8ce4364
Update codegen test
c6d69d2
Skip checksum flow if body is empty + ignore checksum of checksums th…
efc500b
Merge branch 'main' into feat/flexible-checksum-v2
1fd98a4
Add edge case handling for a stream body with size below chunked thre…
696dc72
Merge branch 'main' into feat/flexible-checksum-v2
3aa8ac0
Merge branch 'main' into feat/flexible-checksum-v2
5eb46b3
Add business metric feature ID tracking for flexible checksum v2.
a45ad36
Update initializer call in test.
7cf095e
Merge branch 'main' into feat/flexible-checksum-v2
2f61e67
Merge branch 'main' into feat/flexible-checksum-v2
92c45c9
Reflect context thread-safe changes upstream.
472111a
Fill impl gaps against SEP.
b9b7f18
Merge branch 'main' into feat/flexible-checksum-v2
eabc32e
Update codegen test & fix optional chaining.
bebffb1
Fill unit test gap for flex checksum middlewares
d6932b3
Temporarily comment out manual fill for requestAlgorithmMember http h…
fe87cd8
Merge branch 'main' into feat/flexible-checksum-v2
7be0fbd
Add PRESIGN_URL flow to flexchex request middleware.
ccc77e0
Merge branch 'main' into feat/flexible-checksum-v2
aa1f325
Merge branch 'main' into feat/flexible-checksum-v2
0d2d883
Merge main to feat/flexible-checksum-v2
9680b6e
Merge branch 'main' into feat/flexible-checksum-v2
646f7a2
Update comments in FlexibleChecksumsRequestMiddleware, fix composite …
9dd8ac4
Add integration tests for default checksum flows with data and stream…
4ca7792
Merge branch 'main' into feat/flexible-checksum-v2
82945a7
Merge main into feat/flexible-checksum-v2
ef272e7
Address swiftlint warnings + misc. comment changes.
36fdcea
Merge branch 'main' into feat/flexible-checksum-v2
sichanyoo c0e5a3a
Response algorithms modeled for the operation via httpChecksum trait …
ccea00a
Merge branch 'feat/flexible-checksum-v2' of github.com:awslabs/aws-sd…
f46662a
Update codegen test
24b23f4
Merge branch 'main' into feat/flexible-checksum-v2
d25e83b
Bump minor version by 1; changes next release version from 1.0.79 to …
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.79 | ||
1.1.0 |
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
41 changes: 41 additions & 0 deletions
41
Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Config/AWSChecksumsConfig.swift
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,41 @@ | ||
// | ||
// Copyright Amazon.com Inc. or its affiliates. | ||
// All Rights Reserved. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
import enum AWSSDKChecksums.AWSChecksumCalculationMode | ||
@_spi(FileBasedConfig) import AWSSDKCommon | ||
|
||
public enum AWSChecksumsConfig { | ||
static func requestChecksumCalculation( | ||
configValue: AWSChecksumCalculationMode?, | ||
profileName: String?, | ||
fileBasedConfig: FileBasedConfiguration | ||
) -> AWSChecksumCalculationMode { | ||
return FieldResolver( | ||
configValue: configValue, | ||
envVarName: "AWS_REQUEST_CHECKSUM_CALCULATION", | ||
configFieldName: "request_checksum_calculation", | ||
fileBasedConfig: fileBasedConfig, | ||
profileName: profileName, | ||
converter: { AWSChecksumCalculationMode(caseInsensitiveRawValue: $0) } | ||
).value ?? .whenSupported | ||
} | ||
|
||
static func responseChecksumValidation( | ||
configValue: AWSChecksumCalculationMode?, | ||
profileName: String?, | ||
fileBasedConfig: FileBasedConfiguration | ||
) -> AWSChecksumCalculationMode { | ||
return FieldResolver( | ||
configValue: configValue, | ||
envVarName: "AWS_RESPONSE_CHECKSUM_VALIDATION", | ||
configFieldName: "response_checksum_validation", | ||
fileBasedConfig: fileBasedConfig, | ||
profileName: profileName, | ||
converter: { AWSChecksumCalculationMode(caseInsensitiveRawValue: $0) } | ||
).value ?? .whenSupported | ||
} | ||
} |
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.
would be good to add comment strings explaining what these functions do / how theyre used
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.
These are essentially for default behavior in SDK side; I don't think any SDK user would have to / want to use these directly.