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

Update aws_smithy_types::date_time::Format::HttpDate to omit fractional seconds #2831

Closed
Velfi opened this issue Jul 7, 2023 · 3 comments · Fixed by #2989
Closed

Update aws_smithy_types::date_time::Format::HttpDate to omit fractional seconds #2831

Velfi opened this issue Jul 7, 2023 · 3 comments · Fixed by #2989
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Velfi
Copy link
Contributor

Velfi commented Jul 7, 2023

Per smithy-lang/smithy#1847, we need to update aws_smithy_types::date_time::Format::HttpDate to omit fractional seconds.

@Velfi Velfi added bug Something isn't working good first issue Good for newcomers labels Jul 7, 2023
@rschmitt
Copy link
Contributor

This was marked as a good first issue? This strikes me as potentially very complicated, in terms of its implications.

@rcoh
Copy link
Collaborator

rcoh commented Sep 15, 2023

I think the implications are outside of our control here. We need to update the date time serializer to remove the fractional part because services are currently rejecting requests when they have them. If more subtle behavior is required, then we need an update to the Smithy spec.

The implementation itself seems straightforward enough since it's just deleting https://github.com/awslabs/smithy-rs/blob/main/rust-runtime/aws-smithy-types/src/date_time/format.rs#L482 I think?

@rschmitt
Copy link
Contributor

Ok, makes sense.

rschmitt added a commit to rschmitt/smithy-rs that referenced this issue Sep 18, 2023
rschmitt added a commit to rschmitt/smithy-rs that referenced this issue Sep 18, 2023
github-merge-queue bot pushed a commit that referenced this issue Sep 21, 2023
## Motivation and Context
Closes #2831.

## Description
Fractional seconds will still be accepted during parsing, but not
emitted during serialization.

## Testing
```
./gradlew codegen-core:check codegen-client:check codegen-server:check codegen-client-test:check codegen-server-test:check
```

## Checklist
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Co-authored-by: Russell Cohen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants