-
Notifications
You must be signed in to change notification settings - Fork 190
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
Simplify event stream message signer configuration #2671
Conversation
6c7eb17
to
9ba10cf
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
9ba10cf
to
5103ddc
Compare
This PR creates a `DeferredSigner` implementation that allows for the event stream message signer to be wired up by the signing implementation later in the request lifecycle rather than by adding an event stream signer method to the config. Refactoring this brings the middleware client implementation closer to how the orchestrator implementation will work, which unblocks the work required to make event streams work in the orchestrator.
5103ddc
to
d76c982
Compare
Never mind. This will break anyone stuck on an old code generator that is using event streams. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
I made the changes semver compliant. They're still behavioral breaking for anyone implementing a custom event stream signer, but I think that should be OK since the fix is easy, and the chances anyone is doing that are low. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
## Motivation and Context This PR gets event streams working in the client orchestrator implementation, and depends on #2671. The orchestrator's `TypeErasedBox` enforces a `Send + Sync` requirement on inputs and outputs. For the most part, this isn't an issue since almost all generated inputs/outputs are `Send + Sync`, but it turns out the `EventStreamSender` wasn't `Sync` due to an omission of the `Sync` bound. Thus, this PR is a breaking change, as it adds a `Sync` requirement for anyone who passes a stream to an event stream operation. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
Motivation and Context
This PR creates a
DeferredSigner
implementation that allows for the event stream message signer to be wired up by the signing implementation later in the request lifecycle rather than by adding an event stream signer method to the config.Refactoring this brings the middleware client implementation closer to how the orchestrator implementation will work, which unblocks the work required to make event streams work in the orchestrator.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.