s3: add checksum configuration options#197
Open
analytically wants to merge 1 commit intoconcourse:masterfrom
Open
s3: add checksum configuration options#197analytically wants to merge 1 commit intoconcourse:masterfrom
analytically wants to merge 1 commit intoconcourse:masterfrom
Conversation
7348607 to
118254c
Compare
Add skip_s3_checksums to disable automatic checksum calculation and validation for S3-compatible providers that don't support checksum headers. Add checksum_algorithm to specify which algorithm to use (CRC32, CRC32C, SHA1, SHA256, CRC64NVME). Ignored when skip_s3_checksums is enabled. Removed UseV2Signing as it wasn't working and partially removed. Signed-off-by: Mathias Bogaert <mathias.bogaert@gmail.com>
118254c to
3e90741
Compare
taylorsilva
requested changes
Nov 26, 2025
Member
taylorsilva
left a comment
There was a problem hiding this comment.
Looks good, some tests would be nice though since the interaction between the two new params are spread out over different functions.
I would add tests:
semver-resource/driver/driver_test.go
Lines 13 to 14 in 3c5cf41
and
semver-resource/driver/s3_test.go
Line 14 in 3c5cf41
I would cover the basics:
- Setting
SkipS3Checksumsresults in the corrects3.Optionsbeing passed into the s3Client - Setting
ChecksumAlgorithmresults in the S3Driver being configured correctly - Setting
ChecksumAlgorithmwhenSkipS3Checksumsis true results inChecksumAlgorithmbeing ignored and not passed into the S3Driver - When
ChecksumAlgorithmis configured in the S3Driver, callingS3Driver.Put()passes in theChecksumAlgorithmparam.
TY!
Comment on lines
+130
to
+132
| if source.ChecksumAlgorithm != "" && !source.SkipS3Checksums { | ||
| checksumAlgorithm = types.ChecksumAlgorithm(source.ChecksumAlgorithm) | ||
| } |
Member
There was a problem hiding this comment.
We should check if the resulting checksumAlgorithm matches one of the types.ChecksumAlgorithm. As-is, someone can pass in anything and we'll happily pass it along.
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 skip_s3_checksums to disable automatic checksum calculation and
validation for S3-compatible providers that don't support checksum
headers.
Add checksum_algorithm to specify which algorithm to use (CRC32,
CRC32C, SHA1, SHA256, CRC64NVME). Ignored when skip_s3_checksums
is enabled.
Removed UseV2Signing as it wasn't working and partially removed.