Skip to content
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

add grpc health methods to runtime. #28

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

mikemrm
Copy link
Collaborator

@mikemrm mikemrm commented Jan 7, 2025

This adds the standard grpc_health_v1 service to the iamruntime package. This provides support for checking health on the runtime ensuring the runtime is healthy before use.

BEHAVIOR CHANGE:

With the introduction of the health check service, NewClient has been updated to block, waiting for the service to report healthy. NewClient will block for up to 10 seconds before reporting that the runtime is not healthy.
If the runtime reports the health service is unimplemented, it is assumed the runtime is ready and unblocks the request.

This behavior change ensures clients are making requests against a healthy runtime. To disable this new behavior NewClient must be updated to NewClientWithoutWait. Alternatively setting the environment variable IAMRUNTIME_NEW_CLIENT_WAIT_TIMEOUT to 0 will disable this new behavior.

This adds the standard grpc_health_v1 service to the iamruntime package.
This provides support for checking health on the runtime ensuring the runtime is healthy before use.

BEHAVIOR CHANGE:

With the introduction of the health check service, NewClient has been updated to block, waiting for the service to report healthy.
NewClient will block for up to 10 seconds before reporting that the runtime is not healthy.

This behavior change ensures clients are making requests against a healthy runtime.
To disable this new behavior `NewClient` must be updated to `NewClientWithoutWait`.
Alternatively setting the environment variable `IAMRUNTIME_NEW_CLIENT_WAIT_TIMEOUT` to 0 will disable this new behavior.

Signed-off-by: Mike Mason <[email protected]>
@mikemrm mikemrm force-pushed the add-health-service branch from 5528b51 to 2f3de64 Compare January 7, 2025 19:14
@mikemrm mikemrm marked this pull request as ready for review January 7, 2025 19:42
@mikemrm mikemrm requested a review from a team as a code owner January 7, 2025 19:42
@mikemrm mikemrm merged commit a074a84 into metal-toolbox:main Jan 8, 2025
1 check passed
@mikemrm mikemrm deleted the add-health-service branch January 8, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants