-
Notifications
You must be signed in to change notification settings - Fork 16
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
pkg/loop: plugins report health to host [BCF-2709] #206
Conversation
db7e8af
to
51cc19d
Compare
51cc19d
to
f22f854
Compare
f22f854
to
c2c5209
Compare
c2c5209
to
6ef2e4a
Compare
6ef2e4a
to
1484a99
Compare
1484a99
to
e443f8f
Compare
e443f8f
to
86072cd
Compare
|
||
hr := map[string]error{s.Name(): s.Healthy()} | ||
|
||
// wait until service is ready, which also triggers the deferred construction to ensure a complete HealthReport |
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.
This works, but it feels hacky 🤔
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.
seems reasonable to me. we either have to pull or push; changing to push would be a lot of work for little gain afaict
6098284
to
22774c5
Compare
22774c5
to
7938700
Compare
serviceCh chan struct{} // closed when service is available | ||
Service S | ||
serviceCh chan struct{} // closed when service is available | ||
Service S |
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.
Do S and HealthReport needed to be synchronously closed when PluginService is closed?
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.
It shouldn't really matter 🤔
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.
Of course if we have log noise or something then that is worth addressing.
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.
Or log after a test close
7938700
to
40b2af1
Compare
https://smartcontract-it.atlassian.net/browse/BCF-2709
This change makes the top level plugin types
services.Service
s in order to report plugin health back through the host.It also introduces testing helpers for verifying service names from health reports and log lines.
Requires:
Supports: