-
Notifications
You must be signed in to change notification settings - Fork 183
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
SUMO-115364 Handle exceptions thrwon from kubeclient calls #106
Conversation
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 with some comments in the unit tests
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 pending Maisie's comments
Refactored the part of creating the test driver with configuration and instance variable setup into a method |
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
Since we are using
timer_execute
forstart_monitor
, any exceptions thrown from the method will cause the timer detached.We are going to add exceptions handling for all methods that have kubeclient calls in events plugin, including following methods:
We will only rescue possible errors and then log the error so that we can know errors from which method they throw. For all other methods except for
start_watch_thread
, we don't want errors from kubeclient blocks the thread of watching, so we just log the error and ignore it. Forstart_watcher_thread
, we needtimer_execute
continues working so exceptions will be swallowed and timer won't be detached in this case.