-
Notifications
You must be signed in to change notification settings - Fork 130
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
Allow adding health check callback to Dapr App run in gRPC #723
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.
typo: should be _health_servicer.py
1d21d29
to
3b9a918
Compare
Please run |
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.
Great contribution - and LGTM to me. Please run tox -e ruff
to apply our autoformatter for code and commit the changes.
I'll approve and merge once that is done.
@berndverst |
|
a75859b
to
8fe881d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #723 +/- ##
==========================================
- Coverage 86.37% 86.22% -0.15%
==========================================
Files 79 79
Lines 4094 4166 +72
==========================================
+ Hits 3536 3592 +56
- Misses 558 574 +16 ☔ View full report in Codecov by Sentry. |
6e17c56
to
f87e2a5
Compare
Signed-off-by: Yevgen Polyak <[email protected]>
4879ba1
to
bc6cc6f
Compare
@holopin-bot @evhen14 Thank you! |
Congratulations @evhen14, the maintainer of this repository has issued you a badge! Here it is: https://holopin.io/claim/clzvb5nb524130djsaga7l99m This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account. |
Description
Add health check support to the SDK for gRPC following the example of the go-sdk. The dapr docs state that the
/dapr.proto.runtime.v1.AppCallbackHealthCheck/HealthCheck
endpoint is called, but this SDK doesn't support specifying that method implementation.The suggested way to use it would be
app.register_health_check(health_check_func)
Use case 1: gRPC endpoints depend on other components to function properly. The health checks callback can be used to validate the liveness of the other components
Use case 2: Run gRPC app next to a web app in the same container in a separate thread. The entire app is healthy only when both dapr app and web app are healthy. I expect that dapr thread could die or stop being responsive, hence the way to add health checks.
Issue reference
It's the outcome of the issue #722 I raised earlier where I see a gap for adding meaningful health checks
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: