Skip to content

Conversation

@analytically
Copy link
Contributor

@analytically analytically commented Sep 22, 2025

Add support for configuring the checksum algorithm used when uploading objects to S3. Users can now specify CRC32, CRC32C, SHA1, SHA256, or CRC64NVME algorithms via the checksum_algorithm source configuration.

Closes #161

Add support for configuring the checksum algorithm used when uploading
objects to S3. Users can now specify CRC32, CRC32C, SHA1, SHA256, or
CRC64NVME algorithms via the checksum_algorithm source configuration.

Signed-off-by: Mathias Bogaert <[email protected]>
Comment on lines +61 to +71
if source.ChecksumAlgorithm != "" {
validAlgorithms := map[string]bool{
"CRC32": true,
"CRC32C": true,
"SHA1": true,
"SHA256": true,
"CRC64NVME": true,
}
if !validAlgorithms[source.ChecksumAlgorithm] {
return false, "checksum_algorithm must be one of: CRC32, CRC32C, SHA1, SHA256, CRC64NVME"
}
Copy link
Member

Choose a reason for hiding this comment

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

Hard-coded lists are always suspect because they become things we need to stay on top of and update (adding and removing items from the list). To reduce maintenance burden, can we leverage something in the AWS SDK?

Digging into the types.ChecksumAlgorithm: https://github.com/aws/aws-sdk-go-v2/blob/a432037f9e94425a2482aa0511f34bc90957462d/service/s3/types/enums.go#L221

There's a handy .Values() function that returns a list of valid values: https://github.com/aws/aws-sdk-go-v2/blob/a432037f9e94425a2482aa0511f34bc90957462d/service/s3/types/enums.go#L236-L244

Can we use that as the source of truth instead of hard-coding the list?

@taylorsilva taylorsilva moved this from Todo to In Progress in Pull Requests Nov 9, 2025
@taylorsilva taylorsilva moved this from In Progress to Waiting on Submitter in Pull Requests Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting on Submitter

Development

Successfully merging this pull request may close these issues.

Support S3 checksum on put

2 participants