-
Notifications
You must be signed in to change notification settings - Fork 32
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
Migrate service proxy and interceptor from SDK #100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Lets get a test or two in here and if you don't mind a GH action to run on each PR just in case (w/ test and lint). I can help here if needed.
Can we also add at least one Go test to the package and run |
Yep I'll copy/amend the SDK unit tests over this afternoon. |
@robholland - we have another use case from temporalio/sdk-go#930. They want to visit every Maybe change Any design ideas on how best to incorporate failure visiting into the proxy? I have some more detailed thoughts. |
Let’s do this please while we’re touching all of this and avoid the risk of more compilation breaking changes for the Go SDK. |
Add some unit tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but would like @alexshtin and/or @yiminc to take a look
Co-authored-by: Chad Retz <[email protected]>
@robholland - we just noticed a bug in the Go SDK version of this where the |
Added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some nit style comments. Didn't go much in generator code, but generated code looks good. No human should review reflection and reflection generated code though.
What changed?
Ported gRPC interceptor and proxy code from sdk-go.
Why?
This allows us to keep the proxy and interceptor inline with the API version and allows varying the API version used by SDKs. Previously the large amount of types touched by the interceptor would cause incompatibility when the API changed.
temporalio/sdk-go#971
How did you test it?
Added some tests and adapter sdk-go to use the API code, also with tests.
Potential risks
This should be a no-op, a bug may cause gRPC proxy or interceptors using these APIs to misbehave.