Propagate :use_error_serialization_v2 option to GRPC client#296
Propagate :use_error_serialization_v2 option to GRPC client#296DeRauk merged 1 commit intocoinbase:masterfrom
Conversation
|
@davehughes Thank you for the PR! Could you please rebase onto master to get the test fix for CI? |
|
Bump? |
|
@DeRauk thanks! |
|
@davehughes @DeRauk I'm not sure this is working as expected. I believe the value set in the configuration instance will always be used in E.g., Reading this from the options that are passed in from the configuration is still the right way to go, rather than relying on global configuration being read via This change, however, does make a breaking change for anyone who has opted into error serialization v2 via global config. What do you think about changing this from options.fetch(:use_error_serialization_v2, Temporal.configuration.error_serialization_v2)to options[:use_error_serialization] || Temporal.configuration.error_serialization_v2? |
|
Hmm...I see what you mean and how this is an accidentally breaking change for a set of scenarios. My mental model of configuration usage here is that folks should either choose to configure via the global singleton or through local configuration objects depending on their needs. I'm not sure how strongly the project wants to hold to the semantics that the global config is a fallback vs. a distinct thing, though clearly there's some of the former going on. I don't think the proposed change works as written, since if In conjunction with using a All that said, I'm really just a nomad passing through this project. I've left the job where I noticed the issue that led to this PR, and fixing this is not really a priority for me. (Although I do apologize for the inadvertent breakage, and would be happy to shepherd through a PR with the approach above if asked.) |
Attempt to address #295.
Alter
Temporal::Connection::GRPCto respect a:use_error_serialization_v2option, falling back to the global singleton value if not found, and updateTemporal::Configuration#for_connectionto pass its setting through when creating connections.It looks like options can already be plumbed through by editing a Temporal::Configuration instance's
connection_options, but this case seems slightly different becauseuse_error_serialization_v2is an explicit setting on the configuration.