-
Notifications
You must be signed in to change notification settings - Fork 48
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
Introducing PodStatusHooks #78
Conversation
mcmadhan01
commented
Sep 26, 2019
- Addresses New Plugin Interface for custom hooks around Executor API methods #75 (comment)
Allow hooks extensibility by pushing pod/task status to a channel fix config key used to fetch configured hooks move general, example plugins to pluginimpl directory bug fixes and unit tests fix go imports
plugin/type.go
Outdated
Execute(podStatus string, data interface{}) error | ||
// BestEffort is invoked in case a Execute returned an error and is expected to return a bool to indicate | ||
// if the execution needs to continue with the next available hook or not | ||
BestEffort() bool |
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.
Good point. Need this to determine whether execution need to proceed to next available hook. It would be better to pass this data in Execute( ) response such as (bool, error). Combining BestEffort() with Execute, as well would make it flexible to handle various situations -- some may be best effort while others could be not.
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.
Yeah, makes sense to combine this or introduce a custom error type. I will make that change.
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