-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix: General err handling for collector #52
fix: General err handling for collector #52
Conversation
The error handler will try to output the failed metrics and make sure the single collector's bug won't affect other collectors.
11b60ec
to
fd75a34
Compare
Ideally, the collector itself should be responsible to catch general error, and produce a payload when it is failed. This changes might potentially affect all collectors, can you add functional test? i.e. enable a collector, mock the fetch function to raise exception, and see if it outputs the failed metrics? Or at least test it manually |
Yes, unit test and manually test are done. Agree with your point that collector should responsible to catch it's error. But won't it be the same if we need to have this practice on all the collectors? |
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.
Request to update the test plan and test case.
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.
A few typos to fix. Otherwise LGTM :)
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.
LGTM thanks
Waiting for canonical/hardware-observer-operator#117 |
The error handler will try to output the failed metrics and make sure the single collector's bug won't affect other collectors.
Review together with: canonical/hardware-observer-operator#117