aws-sdk-rust
aws-sdk-rust copied to clipboard
`SelectObjectContent` `ScanRange` does not accept zero-start
Describe the bug
ScanRange is the zero-start range, but Rust SDK doesn't accept zero as Start
value.
https://github.com/awslabs/aws-sdk-rust/blob/b06cd25e2ade91951d4ce52ced908c49ac280401/sdk/s3/src/xml_ser.rs#L1114-L1121
Expected Behavior
When the range is [0, 54], the ScanRange
element of request body should be:
<ScanRange><Start>0</Start><End>54</End></ScanRange>
Current Behavior
When the range is [0, 54], it is currently:
<ScanRange><End>54</End></ScanRange>
Reproduction Steps
let mut select_object_content_req = client
.select_object_content()
.bucket(bucket.to_owned())
.key(key.to_owned())
(snip)
.scan_range(
ScanRange::builder()
.start(0)
.end(54)
.build(),
)
Possible Solution
No response
Additional Information/Context
No response
Version
v0.49.0
Environment details (OS name and version, etc.)
Ubuntu 22.04
Logs
No response
@Licht-T Thanks for reporting this. I'll take a look today and see if I can fix it.
I was able to reproduce this issue. It should be solvable by customizing the serializer to serialize zeros for that operation. Working on that now.
I was able to fix this with a serializer codegen update. I'll update this post again once the fix is released (should be less than 2 weeks.)
Thanks, @Velfi. Looking forward to the PR merged.
It looks like this is going to take longer than I expected. I'm going to be working this week to find a better solution to this issue.
Hey @Licht-T, I'm sorry to say that there's been no new developments. My current stance is that I should probably close the current PR and create a new fix that solves this issue with input tracking, per @jdisanti 's comment.
Sorry again for the lack of movement on this. This week I'm going to check if a recent PR that changes how we handle values like StartRange
and EndRange
fixes this.
After looking into this, I believe it's going to be blocked until we implement smithy IDL v2 support. This is due to the fact that we need to interact with the default
trait which is only available in IDL v2.
Blocked on https://github.com/awslabs/aws-sdk-rust/issues/536 and https://github.com/awslabs/smithy-rs/issues/1767
This should be fixed when S3 adds @clientOptional
to all primitives.
This should be fixed in v0.38, we are verifying
Confirmed this is fixed in the 1.x SDK version.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.