-
Notifications
You must be signed in to change notification settings - Fork 114
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
Remove duplicated and unused code in plugins #341
Remove duplicated and unused code in plugins #341
Conversation
Thanks for your PR,
To skip the vendors CIs use one of:
|
LGTM . Thanks for cleaning |
I am a bit on the fence here with this change. although not directly used i think its useful to:
which is more consistent with the way k8s client informer callback work. An alternative is to keep only |
I agree on this, so let's leave this https://github.com/k8snetworkplumbingwg/sriov-network-operator/pull/341/files#diff-a53b7b593d3d778e62eaeeafa40088656f9212bfa2c2b7991df15fa78e60b0f0L454 'if' statement and move loggin into a daemon.go
I don't understand why do we need to have a dead code just to have a consistency with k8s client. Once we need 'old' object in OnNodeStateChange we can re-introduce it |
All implementations of OnNodeStateAdd method are the same as OnNodeStateChange, so we don't need this code dublication.
'old' argument is not used in any existing plugin. We can re-visit this change if some plugin requires it in the future.
ee3f3f4
to
5addec7
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
Pull Request Test Coverage Report for Build 2739720091
💛 - Coveralls |
} | ||
|
||
// OnNodeStateChange Invoked when SriovNetworkNodeState CR is updated, return if need dain and/or reboot node | ||
// OnNodeStateChange Invoked when SriovNetworkNodeState CR is created or updated, return if need dain and/or reboot node |
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.
nit: technically this plugin does nothing, so we dont really need it.
anyway this can be another cleanup in a separate PR :)
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
No description provided.