-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
BCF-2657: core/services: track spawned job services via the health checker #10695
Conversation
I see that you haven't updated any README files. Would it make sense to do so? |
0e0c3c2
to
d8fc2e2
Compare
@@ -52,6 +53,18 @@ type connectionManager struct { | |||
lggr logger.Logger | |||
} | |||
|
|||
func (m *connectionManager) HealthReport() map[string]error { |
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.
Can we add coverage to the new API surface?
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.
Maybe. I'd rather not repeat something trivial at a low level all over though.
It would be nice to have a high level test that spins up many things and provides a view of all the different kinds of services from one place.
There is a /health
endpoint that we can test against.
Another approach is to eliminate the need to write this method every time. I just revived an old service helper branch that might help with this, by providing an extension of utils.StartStopOnce
that incorporates this, among other things.
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.
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.
Ah, makes sense. I like that approach
@@ -59,6 +61,16 @@ type gatewayConnector struct { | |||
lggr logger.Logger | |||
} | |||
|
|||
func (c *gatewayConnector) HealthReport() map[string]error { |
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.
Same thought as above - wondering if we can directly test this surface area
d8fc2e2
to
c3da5a9
Compare
c3da5a9
to
e0cd817
Compare
e0cd817
to
b2d05d5
Compare
I noticed that we only add services to the health checker during initial application startup, which leaves out services spawned by jobs.
https://smartcontract-it.atlassian.net/browse/BCF-2657