Skip to content

Expose health check on WorkflowServiceStubs or WorkflowClient #828

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Tracked by #45
Spikhalskiy opened this issue Oct 19, 2021 · 1 comment · Fixed by #1168
Closed
Tracked by #45

Expose health check on WorkflowServiceStubs or WorkflowClient #828

Spikhalskiy opened this issue Oct 19, 2021 · 1 comment · Fixed by #1168
Assignees
Labels
enhancement User experience
Milestone

Comments

@Spikhalskiy
Copy link
Contributor

Spikhalskiy commented Oct 19, 2021

Temporal SDK should expose a method like WorkflowServiceStubs#healthCheck or WorkflowServiceStubs#isHealthy that allows users to check if the WorkflowClient/WorkflowServiceStubs underlying channel / connection to Temporal server is healthy.
There were quite a bit of user requests for such a method from users for all SDKs.
Having this method on Stubs is preferable over WorkflowClient, because it's the lowest level abstraction on top of the channel and WorkflowClient can just fall back on the WorkflowServiceStubs method. But if the language doesn't have a wrapper for stubs (like Java does), this method may be on WorkflowClient.

Issues for other SDKs:
temporalio/sdk-go#595
temporalio/sdk-typescript#312

@cretz
Copy link
Member

cretz commented Oct 19, 2021

@Spikhalskiy - Will wait on suggested Java signatures before adding to Go.

To confirm, are you thinking healthCheck just invokes https://github.com/grpc/grpc/blob/790ce5c97ff3a3922d50a1fd3a4bab91e2bcd435/src/proto/grpc/health/v1/health.proto#L45 for the workflow service, and then returns a boolean? And isHealthy returns the boolean based on the client's existing known knowledge (i.e. last health check, not a new one)? We can definitely do both easily in Go.

@Spikhalskiy Spikhalskiy changed the title Expose health check on WorkflowClient Expose health check on WorkflowServiceStubs or WorkflowClient Feb 26, 2022
@Spikhalskiy Spikhalskiy added this to the 1.11.0 milestone Apr 25, 2022
@Spikhalskiy Spikhalskiy self-assigned this Apr 25, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement User experience
Projects
None yet
2 participants