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

Event streaming support for protocols that use XML (e.g., restXml) #1379

Closed
sichanyoo opened this issue Mar 6, 2024 · 1 comment
Closed
Assignees

Comments

@sichanyoo
Copy link
Contributor

sichanyoo commented Mar 6, 2024

Background

Currently, the DefaultMessageEncoderStream in smithy-swift's ClientRuntime has requestEncoder: RequestEncoder property. In protocols that use JSON, this field is populated by the encoder property of the client object.

Code path for an event streaming operation:

  • The encoder (JSONEncoder) is saved to middleware context when the context is built (example)
  • The saved encoder is fetched from middleware context in EventStreamBodyMiddleware here.
  • Then, that encoder is passed to DefaultMessageEncoderStream and is used to parse Event into EventStream.Message here.

However, following the XML serde refactor that got rid of 3rd party XML library that uses Codable conformances, encoder and decoder are no longer properties of XML service clients, meaning event streaming operation for an XML protocol would fail due to missing request encoder.

Why was this not caught?

For event stream input, it is because currently no AWS service uses XML & event stream input combo.

For event stream output, the reason why no warnings were thrown is because we do not have integration test for the one operation that uses XML AND event stream output, which is S3:SelectObjectContentEventStream.

Task

  • Investigate if event streaming input and output behaves as it should for restXml protocol
  • Implement support based on the findings.
  • Create an integration test for S3:SelectObjectContentEventStream.
@sichanyoo sichanyoo added needs-triage This issue or PR still needs to be triaged. needs-investigation labels Mar 6, 2024
@sichanyoo sichanyoo self-assigned this Mar 7, 2024
@sichanyoo sichanyoo removed needs-triage This issue or PR still needs to be triaged. needs-investigation labels Mar 8, 2024
@sichanyoo sichanyoo modified the milestone: GA Mar 8, 2024
@sichanyoo sichanyoo changed the title Investigate event streaming support for protocols that use XML (e.g., restXml) Event streaming support for protocols that use XML (e.g., restXml) Mar 8, 2024
@jbelkins
Copy link
Contributor

jbelkins commented Apr 9, 2024

Shipped in AWS SDK for Swift 0.40.0

@jbelkins jbelkins closed this as completed Apr 9, 2024
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

No branches or pull requests

2 participants