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

feat: add event stream serde dependencies #824

Merged

Conversation

AllanZhengYP
Copy link
Contributor

This change add 3 packages that used to serialize/deserialize the event stream:

  • @aws-sdk/eventstream-serde-browser: provide an EventStreamMarshaller class that has serialize and deserialize methods. serialize() serializes input into event stream formatted binary stream; Whereas deserialize() converts output from response ReadableStream to structured output. The implementation is adopted from v2 eventstream
  • @aws-sdk/eventstream-serde-node: Same function to @aws-sdk/eventstream-serde-browser by compatible with NodeJs stream API.
  • @aws-sdk/eventstream-serde-config-resolver: Provide a client config resolver function that resolve client config to EventStreamMarshaller on different runtimes accordingly. This config will apply to client only if eventstream trait is found in model.

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

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@AllanZhengYP AllanZhengYP requested a review from trivikr January 31, 2020 19:51
@AllanZhengYP AllanZhengYP force-pushed the event-stream-utils-dev-1 branch from 3daeabe to d264d87 Compare January 31, 2020 23:58
@codecov-io
Copy link

codecov-io commented Jan 31, 2020

Codecov Report

Merging #824 into smithy-codegen will decrease coverage by 0.21%.
The diff coverage is 86.55%.

Impacted file tree graph

@@                Coverage Diff                @@
##           smithy-codegen    #824      +/-   ##
=================================================
- Coverage           92.12%   91.9%   -0.22%     
=================================================
  Files                 145     150       +5     
  Lines                2908    3027     +119     
  Branches              513     529      +16     
=================================================
+ Hits                 2679    2782     +103     
- Misses                229     245      +16
Impacted Files Coverage Δ
packages/eventstream-marshaller/src/Int64.ts 100% <ø> (ø) ⬆️
...ges/eventstream-marshaller/src/HeaderMarshaller.ts 100% <ø> (ø) ⬆️
...entstream-serde-node/src/fixtures/event.fixture.ts 100% <100%> (ø)
...ventstream-marshaller/src/EventStreamMarshaller.ts 96% <50%> (-4%) ⬇️
...stream-serde-node/src/MessageUnmarshallerStream.ts 68% <68%> (ø)
...ntstream-serde-node/src/EventDeserializerStream.ts 85.71% <85.71%> (ø)
...ode/src/fixtures/MockEventMessageSource.fixture.ts 86.36% <86.36%> (ø)
...stream-serde-node/src/EventMessageChunkerStream.ts 96.22% <96.22%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 720d5f6...2e82629. Read the comment docs.

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@AllanZhengYP AllanZhengYP force-pushed the event-stream-utils-dev-1 branch from d264d87 to 71e0ab1 Compare February 4, 2020 18:58
@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@AllanZhengYP AllanZhengYP force-pushed the event-stream-utils-dev-1 branch from 4ef3b40 to 3441e19 Compare February 14, 2020 00:17
@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@AllanZhengYP AllanZhengYP requested a review from srchase February 14, 2020 18:36
* to event stream binary chunks; Use a pull stream
* here to support low connection speed.
*
* This doesn't work actually on browser currently

This comment was marked as resolved.

@AllanZhengYP AllanZhengYP force-pushed the event-stream-utils-dev-1 branch from 3441e19 to a2b931d Compare February 14, 2020 23:00
@aws-sdk-js-automation

This comment has been minimized.

@AllanZhengYP AllanZhengYP force-pushed the event-stream-utils-dev-1 branch 2 times, most recently from 2e82629 to fc25e69 Compare February 14, 2020 23:32
@aws-sdk-js-automation

This comment has been minimized.

feat: revive event stream dependencies

feat: allow event signer provider in the config

feat: rename util-eventstream-node to eventstream-serde-node

feat: separate eventstream serde from util package

feat: exprimental event stream signing dependencies

feat: add eventstream-serde-browser

chore: add doc for not supporting eventstream request on browser

chore: add ignore files to eventstream dependencies

chore: remove middleware-eventstream-signing from PR

chore: remove eventstream-signer-node from PR

chore(eventstream-serde-node): add unit tests

feat: throw error/exception event and terminate event stream

chore: fix docs

fix: add eventstream-serde-config-resolver
@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@AllanZhengYP AllanZhengYP merged commit 08f8213 into aws:smithy-codegen Feb 14, 2020
AllanZhengYP added a commit to AllanZhengYP/aws-sdk-js-v3 that referenced this pull request Feb 17, 2020
* feat: add event stream serde dependencies([aws#824](aws#824))
* support eventstream traits([smithy-typescript#110](smithy-lang/smithy-typescript#110))
AllanZhengYP added a commit that referenced this pull request Feb 17, 2020
* feat: add event stream serde dependencies([#824](#824))
* support eventstream traits([smithy-typescript#110](smithy-lang/smithy-typescript#110))
@lock
Copy link

lock bot commented Feb 21, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants