-
Notifications
You must be signed in to change notification settings - Fork 181
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
Small fixes for S3 on Outposts #470
Conversation
fn add_header( | ||
/// Add a header to this message. The header is added if necessary and any existing values for | ||
/// this header are removed. | ||
fn set_header( |
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.
Was there any use of adding a new header with different value rather than overwriting it, earlier?
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.
Nope, that's why I changed it. Multiple headers with the same name is a pretty niche HTTP thing that we don't need.
199bef9
to
1e19915
Compare
1e19915
to
1a81ffd
Compare
I can confirm that this also fixes the GetObject operation on the Seeweb provider; it previously failed with an invalid signature error. Thank you |
This fixes two issues that were preventing Mountpoint from working against Outposts buckets: 1. Outposts doesn't include the bucket name in ListObjectsV2 responses. We weren't actually using that output anyway, so I just removed it. 2. For GetObject requests, we were sending a HTTP header like `Accept: application/xml,*/*`. While technically valid HTTP, it's weird to accept */* as well as something else, and it was confusing Outposts' request signing. So I switched to overwriting the existing header, which is what the comment suggested the code was intended to do anyway. I also took this chance to make a little cleanup to parsing ListObjectsV2 responses: the `parse` functions shouldn't be defined on the generic `ListObjectsResult` structs, which are shared by all clients. Signed-off-by: James Bornholt <[email protected]>
1a81ffd
to
01ae4eb
Compare
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.
LGTM
Update the CRT libraries to the latest releases. In particular, include: * Support full object checksum and crc64nvme. ([awslabs/aws-c-s3#468](awslabs/aws-c-s3#468)) <details> <summary>Full CRT changelog:</summary> ``` Submodule mountpoint-s3-crt-sys/crt/aws-c-common be8ed873..fadfef49: > Support relative paths when prebuilding dependencies with CMake (#1174) > Switch CI to use roles (#1173) Submodule mountpoint-s3-crt-sys/crt/aws-c-s3 45894ed3..337155f6: > Support full object checksum (#468) > [meta request]: assign shutdown_callback inside critical region (#470) > Switch CI to use roles (#463) ``` </details> ### Does this change impact existing behavior? No. ### Does this change need a changelog entry? No. --- 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)](https://developercertificate.org/). Signed-off-by: Alessandro Passaro <[email protected]>
Description of change
This fixes two issues that were preventing Mountpoint from working against Outposts buckets:
Accept: application/xml,*/*
. While technically valid HTTP, it's weird to accept*/*
as well as something else, and it was confusing Outposts' request signing. So I switched to overwriting the existing header, which is what the comment suggested the code was intended to do anyway.I also took this chance to make a little cleanup to parsing ListObjectsV2 responses: the
parse
functions shouldn't be defined on the genericListObjectsResult
structs, which are shared by all clients.This change doesn't make Mountpoint completely work on Outposts. The outstanding issue is that Outposts don't support S3 additional checksums, but we turn those on by default. We'll need a way to turn those off for Outposts buckets. But read-only usage should work.
Does this change impact existing behavior?
Yes, removing the bucket name is a breaking change to the client crate, and we now send a different
Accept
header on GetObject requests. There shouldn't be any customer-visible effects.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).