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

Add checksum algorithm to ListObjectsV2 response #1086

Merged
merged 7 commits into from
Oct 29, 2024

Conversation

dannycjones
Copy link
Contributor

@dannycjones dannycjones commented Oct 28, 2024

Description of change

For a consumer of the S3 client, we need to return the checksum algorithm used with objects.

This change exposes the checksum algorithm that is sometimes returned as part of a ListObjectsV2 request. This functionality is not opt-in, and will now simply be exposed to be used by consumers of Mountpoint S3 client where supported.

This change also updates ChecksumAlgorithm to have a new Unknown variant. This is a common pattern in AWS SDKs. This will allow clients to recognize where an unknown algorithm is returned (should the S3 service start supporting additional algorithms), and avoid either returning None (if optional) or panicking when the error may be recoverable.

Relevant issues: N/A

Does this change impact existing behavior?

Yes, it changes the ObjectInfo and ChecksumAlgorithm structs. Specifically, they are now marked non_exhaustive meaning that new fields could be added in the future (as has been done in this PR).

Does this change need a changelog entry in any of the crates?

Yes, relevant change logs for breaking change (non_exhaustive) as well as new feature (exposing checksum algorithm) have been added to mountpoint-s3-client's changelog.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
mountpoint-s3-client/src/mock_client.rs Outdated Show resolved Hide resolved
mountpoint-s3-client/src/mock_client.rs Outdated Show resolved Hide resolved
…e case

Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
Copy link
Contributor

@passaro passaro left a comment

Choose a reason for hiding this comment

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

Looks good, just a couple of minor suggestions.

mountpoint-s3-client/CHANGELOG.md Show resolved Hide resolved
mountpoint-s3-client/src/object_client.rs Outdated Show resolved Hide resolved
…algorithm method

Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
@passaro passaro added this pull request to the merge queue Oct 29, 2024
Merged via the queue into awslabs:main with commit 856c31d Oct 29, 2024
23 checks passed
@dannycjones dannycjones deleted the listobjects-return-checksumalgo branch October 29, 2024 15:31
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.

2 participants