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

Provide paginators interop with the futures::Stream implementation #1028

Closed
Veetaha opened this issue Jan 2, 2024 · 3 comments
Closed

Provide paginators interop with the futures::Stream implementation #1028

Veetaha opened this issue Jan 2, 2024 · 3 comments
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.

Comments

@Veetaha
Copy link

Veetaha commented Jan 2, 2024

Describe the feature

The removal of futures::Stream implementation in 1.0 for paginators is a breaking change for lots of our code (both public: elastio/ssstar#125 and private).

Consider implementing futures::Stream for paginators again either:

  • Unconditionally
  • Under some cargo feature flag like feature = "futures"
  • Via some interop crate that can convert aws SDK paginator into a futures::Stream implementor newtype. For example, like conversion of timestamps to chrono is implemented in aws_smithy_types_convert crate. This is the least-preferred variant, because we'll still need to explicitly import some extension trait and call .into_stream() or smth like that to use the paginator as a futures::Stream.

Basically, we need a shared interop code so that we don't have to write this boilerplate newtype wrapper over and over again in various places. Have a shared interop code that everyone in the open-source community can use.

Use Case

futures::Stream contains a lot of useful combinators with [Try]StreamExt traits and also a lot of our code works with impl futures::Stream. It's basically the golden standard akin to Iterator in the ecosystem and we've been using it everywhere including with the pre-1.0 AWS SDK code.

A note for the community

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue, please leave a comment
@Veetaha Veetaha added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 2, 2024
@rcoh
Copy link
Contributor

rcoh commented Jan 2, 2024

This is actually done and pending release: smithy-lang/smithy-rs#3299

@rcoh rcoh added pending-release This issue will be fixed by an approved PR that hasn't been released yet. and removed needs-triage This issue or PR still needs to be triaged. labels Jan 2, 2024
@jmklix jmklix added the p2 This is a standard priority issue label Jan 5, 2024
@rcoh
Copy link
Contributor

rcoh commented Jan 10, 2024

Done! https://docs.rs/aws-smithy-types-convert/latest/aws_smithy_types_convert/stream/index.html

@rcoh rcoh closed this as completed Jan 10, 2024
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.
Projects
None yet
Development

No branches or pull requests

3 participants