temporalio / sdk-core

Core Temporal SDK that can be used as a base for language specific Temporal SDKs
MIT License
262 stars 70 forks source link

HTTP CONNECT proxy support #714

Closed cretz closed 4 months ago

cretz commented 4 months ago

What was changed

Can't really perform a test of this without a more involved integration test that has a full proxy server implementation. I have manually tested this with Python SDK using this version of core and connecting to Temporal cloud through the proxy. Now that proxies are officially supported by Temporal, there's a feature PR at https://github.com/temporalio/features/pull/447 for testing them, and Python will be added once this is merged and the Python SDK is updated

Checklist

  1. Closes #309
cretz commented 4 months ago

Looks like this was fairly straightforward, nice.

The result was fairly straightforward but this took a lot of time because I had to dig through the internals because Tonic/Hyper don't make this easy. They don't make it easy to change the target TCP stream and they don't make it easy to do a URL call + upgrade after TCP connection. I also had to setup proxies to test with and verify this behavior matches existing Go and Java gRPC behavior. But yes, luckily the amount of code needed is small.

(waiting on external CI fix before merging)