You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every gRPC request that contains a namespace should have a Temporal-Namespace header (i.e. gRPC metadata) set on the request with the namespace value. This can/should be done with interceptors and needs to be future proof. This means if at all possible the namespace should be extracted out of the request without having to know about specific requests.
We have ensured that every namespace-specific gRPC request has a string namespace field and new RPCs will too.
In Go the extraction can be done with a simple interface assertion containing GetNamespace() string.
In Java and Core this may be a bit more difficult. Not sure if we want to use Java reflection or core macros or what. Or it can be done hardcoded with a the set of requests objects in big switch/match, but there must be a test to confirm nothing is missed when a new RPC is introduced. This could be done by starting a no-op/unavailable-response-only gRPC server that confirms via server-side interceptor that every call has a Temporal-Namespace header. Then simply make a client call for every RPC available, set a namespace on it (reflectively or whatever), and confirm set. But all this doesn't have to be done if there are other ways to make sure new RPCs break the build if not accounted for.
Describe the solution you'd like
Every gRPC request that contains a namespace should have a
Temporal-Namespace
header (i.e. gRPC metadata) set on the request with the namespace value. This can/should be done with interceptors and needs to be future proof. This means if at all possible the namespace should be extracted out of the request without having to know about specific requests.We have ensured that every namespace-specific gRPC request has a
string namespace
field and new RPCs will too.In Go the extraction can be done with a simple interface assertion containing
GetNamespace() string
.In Java and Core this may be a bit more difficult. Not sure if we want to use Java reflection or core macros or what. Or it can be done hardcoded with a the set of requests objects in big switch/match, but there must be a test to confirm nothing is missed when a new RPC is introduced. This could be done by starting a no-op/unavailable-response-only gRPC server that confirms via server-side interceptor that every call has a
Temporal-Namespace
header. Then simply make a client call for every RPC available, set a namespace on it (reflectively or whatever), and confirm set. But all this doesn't have to be done if there are other ways to make sure new RPCs break the build if not accounted for.Per-SDK Tickets
The text was updated successfully, but these errors were encountered: