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

Simplify event stream message signer configuration #2671

Merged
merged 3 commits into from
May 26, 2023

Conversation

jdisanti
Copy link
Collaborator

@jdisanti jdisanti commented May 4, 2023

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.

@jdisanti jdisanti force-pushed the jdisanti-sra-eventstreams branch from 6c7eb17 to 9ba10cf Compare May 4, 2023 01:06
@github-actions
Copy link

github-actions bot commented May 4, 2023

A new generated diff is ready to view.

A new doc preview is ready to view.

@jdisanti jdisanti force-pushed the jdisanti-sra-eventstreams branch from 9ba10cf to 5103ddc Compare May 4, 2023 16:17
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.
@jdisanti
Copy link
Collaborator Author

jdisanti commented May 4, 2023

This is a breaking change, but I don't think we should defer its release to the next breaking release because of how unlikely it is to impact anyone.

Never mind. This will break anyone stuck on an old code generator that is using event streams.

@jdisanti jdisanti marked this pull request as ready for review May 4, 2023 16:47
@jdisanti jdisanti requested review from a team as code owners May 4, 2023 16:47
@github-actions
Copy link

github-actions bot commented May 4, 2023

A new generated diff is ready to view.

A new doc preview is ready to view.

@jdisanti
Copy link
Collaborator Author

jdisanti commented May 4, 2023

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.

@github-actions
Copy link

github-actions bot commented May 4, 2023

A new generated diff is ready to view.

A new doc preview is ready to view.

CHANGELOG.next.toml Show resolved Hide resolved
@jdisanti jdisanti added ready-to-merge This PR is ready to merge into `main` and removed needs-server-review labels May 11, 2023
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@jdisanti jdisanti added this pull request to the merge queue May 26, 2023
@jdisanti jdisanti removed the ready-to-merge This PR is ready to merge into `main` label May 26, 2023
Merged via the queue into main with commit 8773a70 May 26, 2023
@jdisanti jdisanti deleted the jdisanti-sra-eventstreams branch May 26, 2023 16:15
jdisanti added a commit that referenced this pull request May 26, 2023
## 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._
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change This will require a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants