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

Assorted code clean-up for event stream with RPC-bound protocols #4023

Conversation

ysaito1001
Copy link
Contributor

Motivation and Context

This is the final PR in the series adding support for event streaming with RPC-bound protocols. It primarily focuses on addressing code cleanup tasks that were intentionally left in the previous two PRs.

Description

The code clean-up tasks include

  • adding DisableStalledStreamProtection to disable stalled stream protection from at the top level of ClientCodegenVisitor across the models, eliminating the need for individual service-specific codegen decorators just to disable stalled stream protection.
  • removing eventStreamAllowList.
  • addressing TODO(EventStream) for RPC protocols.
  • adding a custom doc to fluent builders whose output operations are event stream and contain more than one structure members (i.e., need to populate non-event stream members at the end of send).

Testing

  • Existing CI
  • Added DisableStalledStreamProtectionTest

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

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@ysaito1001 ysaito1001 marked this pull request as ready for review February 19, 2025 17:24
@ysaito1001 ysaito1001 requested review from a team as code owners February 19, 2025 17:24
Copy link
Contributor

@landonxjames landonxjames left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@aajtodd aajtodd left a comment

Choose a reason for hiding this comment

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

One thing not in this PR that we might want to cleanup is not having to maintain this.

This most likely belongs on the Protocol interface or possibly the HttpBindingResolver.

It may be fine for now but if a customer brings a new protocol they have no way to do this without modifying smithy-rs (and of course if we implement a new RPC protocol we have to remember to update this).

ysaito1001 added a commit that referenced this pull request Feb 21, 2025
@ysaito1001
Copy link
Contributor Author

One thing not in this PR that we might want to cleanup is not having to maintain this.

Great suggestion. 4c78dc7 has removed the hard-coded RPC_BOUND_PROTOCOLS. This should allow the logic around that map to also work for a new protocol as we implement its HttpBindingResolver.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@ysaito1001 ysaito1001 merged commit 1964098 into ysaito/support-event-stream-for-rpc-bound-protocols Feb 24, 2025
44 of 45 checks passed
@ysaito1001 ysaito1001 deleted the ysaito/code-cleanup branch February 24, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants