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 health check endpoint to signature-aggregator #442

Merged
merged 4 commits into from
Aug 20, 2024

Conversation

feuGeneA
Copy link
Contributor

Why this should be merged

fixes #424

How this was tested

by putting a 30 second sleep into the signature-aggregator e2e test and then while it was sleeping did:

$ curl localhost:8082/health
{"status":"up","details":{"signature-aggregator":{"status":"up","timestamp":"2024-08-20T01:23:14.351599017Z"}}}

tested by putting a 30 second sleep into the signature-aggregator e2e test and
then while it was sleeping did:

```
$ curl localhost:8082/health
{"status":"up","details":{"signature-aggregator":{"status":"up","timestamp":"2024-08-20T01:23:14.351599017Z"}}}
```
Copy link
Contributor Author

@feuGeneA feuGeneA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussed on a call. we should just add a separate endpoint path to the existing ListenAndServe call, rather than serving on another port, so that the health check won't start saying "healthy" until the main ListenAndServe is actually up and running.

healthChecker := health.NewChecker(
health.WithCheck(health.Check{
Name: "signature-aggregator",
Check: func(context.Context) error { return nil },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is a no-op for now. Can you create a ticket and/or add todo comments here to make this health check meaningful?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I raised an issue here: #447

But, note, this actually already is meaningful, in that the http.ListenAndServe() call made in the aggregator includes both the health check path and also the signature request path, so when this health check starts responding with "healthy", that's an indication that all of the paths served by that ListenAndServe() call are ready, so it tells us that the service is ready to handle signature requests.

@feuGeneA feuGeneA merged commit 8271006 into main Aug 20, 2024
7 checks passed
@feuGeneA feuGeneA deleted the sig-agg-health-check branch August 20, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Health check for signature aggregator
4 participants