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

Client expecting ObjectLockRetention when server sends Retention on get_object_retention #1065

Closed
jocutajar opened this issue Feb 14, 2024 · 4 comments
Assignees
Labels
bug This issue is a bug. p2 This is a standard priority issue

Comments

@jocutajar
Copy link

Describe the bug

I get this error parsing XML: invalid root, expected ObjectLockRetention got StartEl { name: Name { prefix: "", local: "Retention" }, attributes: [Attr { name: Name { prefix: "", local: "xmlns" }, value: "http://s3.amazonaws.com/doc/2006-03-01/" }], closed: false, depth: 0 }

Request:
GET https://s3.us-east-005.backblazeb2.com/some_bucket/some_file_in_bucket?retention

Response:

HTTP/1.1 200 OK
... headers ...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Retention xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Mode>GOVERNANCE</Mode>
    <RetainUntilDate>2024-01-01T09:25:13.000Z</RetainUntilDate>
</Retention>

Expected Behavior

I'm not sure if the server or the client got it wrong, but considering this was working previously with rusoto_s3, I would suspect the SDK. So the client should parse the Retention element as given.

Current Behavior

Error parsing XML

Reproduction Steps

get_object_retention where such retention is specified

Possible Solution

No response

Additional Information/Context

No response

Version

aws-sdk-rust/1.1.5 api/s3/1.15.0 os/linux lang/rust/1.76.0


├── aws-sdk-s3 v1.15.0
│   ├── aws-credential-types v1.1.5
│   │   ├── aws-smithy-async v1.1.5
│   │   ├── aws-smithy-runtime-api v1.1.5
│   │   │   ├── aws-smithy-async v1.1.5 (*)
│   │   │   ├── aws-smithy-types v1.1.5
│   │   ├── aws-smithy-types v1.1.5 (*)
│   ├── aws-runtime v1.1.5
│   │   ├── aws-credential-types v1.1.5 (*)
│   │   ├── aws-sigv4 v1.1.5
│   │   │   ├── aws-credential-types v1.1.5 (*)
│   │   │   ├── aws-smithy-eventstream v0.60.4
│   │   │   │   ├── aws-smithy-types v1.1.5 (*)
│   │   │   ├── aws-smithy-http v0.60.5
│   │   │   │   ├── aws-smithy-eventstream v0.60.4 (*)
│   │   │   │   ├── aws-smithy-runtime-api v1.1.5 (*)
│   │   │   │   ├── aws-smithy-types v1.1.5 (*)
│   │   │   ├── aws-smithy-runtime-api v1.1.5 (*)
│   │   │   ├── aws-smithy-types v1.1.5 (*)
│   │   ├── aws-smithy-async v1.1.5 (*)
│   │   ├── aws-smithy-eventstream v0.60.4 (*)
│   │   ├── aws-smithy-http v0.60.5 (*)
│   │   ├── aws-smithy-runtime-api v1.1.5 (*)
│   │   ├── aws-smithy-types v1.1.5 (*)
│   │   ├── aws-types v1.1.5
│   │   │   ├── aws-credential-types v1.1.5 (*)
│   │   │   ├── aws-smithy-async v1.1.5 (*)
│   │   │   ├── aws-smithy-runtime-api v1.1.5 (*)
│   │   │   ├── aws-smithy-types v1.1.5 (*)
│   ├── aws-sigv4 v1.1.5 (*)
│   ├── aws-smithy-async v1.1.5 (*)
│   ├── aws-smithy-checksums v0.60.5
│   │   ├── aws-smithy-http v0.60.5 (*)
│   │   ├── aws-smithy-types v1.1.5 (*)
│   ├── aws-smithy-eventstream v0.60.4 (*)
│   ├── aws-smithy-http v0.60.5 (*)
│   ├── aws-smithy-json v0.60.5
│   │   └── aws-smithy-types v1.1.5 (*)
│   ├── aws-smithy-runtime v1.1.5
│   │   ├── aws-smithy-async v1.1.5 (*)
│   │   ├── aws-smithy-http v0.60.5 (*)
│   │   ├── aws-smithy-runtime-api v1.1.5 (*)
│   │   ├── aws-smithy-types v1.1.5 (*)
│   ├── aws-smithy-runtime-api v1.1.5 (*)
│   ├── aws-smithy-types v1.1.5 (*)
│   ├── aws-smithy-xml v0.60.5
│   ├── aws-types v1.1.5 (*)
├── aws-smithy-runtime-api v1.1.5 (*)


### Environment details (OS name and version, etc.)

debian 12

### Logs

_No response_
@jocutajar jocutajar added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 14, 2024
@rcoh
Copy link
Contributor

rcoh commented Feb 14, 2024

that's for including the raw response! I'll see if I can get a quick fix in for the next release which should be out sometime this week or early next.

@Velfi Velfi removed the needs-triage This issue or PR still needs to be triaged. label Feb 20, 2024
@jdisanti jdisanti added the p2 This is a standard priority issue label Mar 14, 2024
@jdisanti jdisanti self-assigned this Mar 14, 2024
@jdisanti jdisanti moved this to In Progress in AWS Rust SDK Public Roadmap Mar 14, 2024
@jdisanti
Copy link
Contributor

Working on a fix in smithy-lang/smithy-rs#3492

@rcoh
Copy link
Contributor

rcoh commented Mar 19, 2024

Fixed in the most recent S3 release. Thanks for reporting! We found a similar issue with GetObjectLockLegalHold which was also fixed

@rcoh rcoh closed this as completed Mar 19, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in AWS Rust SDK Public Roadmap Mar 19, 2024
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue
Projects
Status: Done
Development

No branches or pull requests

4 participants