-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update Reaper watchers across multiple clouds and config updates #1170
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.
I don't get everything because of the PR size, but all tests are passing and the code looks fine so LGTM
Thanks for reviewing! The only thing I was unsure about and was hoping to get a little guidance on was the deprecation of the Since that is no longer reference anywhere in the class, should I just remove the field and leave the deprecated accessor method to alway return |
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.
I would advise getting #1167 released first and resolve conflicts with that here.
Thanks for the heads-up about #1083. Looks like it will take some work to resolve the merge conflicts but I think they should be mostly superficial.
Did not try to do any sort of detailed code review here—leaving approval to @Vlatombe.
return; | ||
} | ||
|
||
ExtensionList.lookup(Listener.class).forEach(listener -> { |
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.
ExtensionList.lookup(Listener.class).forEach(listener -> { | |
ExtensionList.lookup(Listener.class).forEach(listener -> { // TODO 2.324+ jenkins.util.Listeners |
…dates Update Reaper to keep track of watchers across multiple clouds and add/remove them when clouds are updated. To better track when watchers need to be recreated the KubernetesClientProvider#getValidity method was made public. This allows the Reaper to validate the watch client connection is still valid if the cloud connection properties are updated. If a watcher is closed due to "410 Gone" responses the watcher will deregister itself and reregister next time a node comes online. Watcher implementations will now filter out Bookmark and Error action events which don't represent Pod state changes. Future enhancement might be to use bookmarks on reconnect to catchup on events. Deprecated KubernetesLauncher `watcher` field which does not appear to be used by the plugin anywhere and is a potential for threading issues when lots of agents are launched at once.
398486b
to
9f76251
Compare
Merge branch 'master' of https://github.com/jenkinsci/kubernetes-plugin into retry-JENKINS-49707-base
Update Reaper to keep track of watchers across multiple clouds and add/remove
them when clouds are updated. To better track when watchers need to be
recreated the KubernetesClientProvider#getValidity method was made public.
This allows the Reaper to validate the watch client connection is still valid if
the cloud connection properties are updated.
If a watcher is closed due to "410 Gone" responses the watcher will deregister
itself and reregister next time a node comes online.
Watcher implementations will now filter out Bookmark and Error action events
which don't represent Pod state changes. Future enhancement might be to use
bookmarks on reconnect to catchup on events.
Deprecated KubernetesLauncher
watcher
field which does not appear to beused by the plugin anywhere and is a potential for threading issues when lots of
agents are launched at once.
Changes to KubernetesLauncher may conflict with #1167
Changes to Reaper may conflict with #1083