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 incomplete Event Stream support with working Amazon Transcribe example #653

Merged
merged 20 commits into from
Aug 20, 2021

Conversation

jdisanti
Copy link
Collaborator

@jdisanti jdisanti commented Aug 17, 2021

Motivation and Context

This is progress towards adding full Event Stream support to smithy-rs (#121). In particular, this PR:

  • Adds SMITHYRS_EXPERIMENTAL_EVENTSTREAM environment variable which, when set to 1, turns off the removal of Event Stream operations
  • Adds enough support that Amazon Transcribe's StartStreamTranscription operation works
  • Adds an example for Amazon Transcribe
  • Marks areas that need more work with TODO(EventStream) tags

Testing

  • Added some new unit tests, but some are still missing (indicated by TODOs)
  • Manually tested against Transcribe

Checklist

  • I have updated the CHANGELOG

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

@jdisanti jdisanti requested a review from rcoh August 17, 2021 23:52
Copy link
Collaborator

@rcoh rcoh left a comment

Choose a reason for hiding this comment

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

overall this looks great. I didn't review with a find tooth comb looking for bugs yet, more as a general structure. My main comment is around the synthetic event stream shapes, but I think we're really close here overall.

aws/rust-runtime/aws-sig-auth/Cargo.toml Outdated Show resolved Hide resolved
val initial = super.toSymbol(shape)

// We only want to wrap with Event Stream types when dealing with member shapes
if (shape is MemberShape && shape.isEventStream(model)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

generally I structure this as a series of rule outs to remove the nesting, YMMV

rust-runtime/inlineable/src/event_stream.rs Outdated Show resolved Hide resolved
@jdisanti jdisanti requested a review from rcoh August 19, 2021 17:42
Copy link
Collaborator

@rcoh rcoh left a comment

Choose a reason for hiding this comment

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

LGTM! left some potential cleanup ideas inline

@jdisanti jdisanti merged commit 3b8f69c into smithy-lang:main Aug 20, 2021
@jdisanti jdisanti deleted the eventstream-codegen branch August 20, 2021 23:36
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