-
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
[JENKINS-49707] If a KubernetesComputer disconnects, remove the KubernetesSlave #461
[JENKINS-49707] If a KubernetesComputer disconnects, remove the KubernetesSlave #461
Conversation
…netesSlave so that DurableTaskStep knows to clean up.
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
Seems |
while this plugin had tried to turn off the rerun feature, what it actually did was make it so that failing tests are rerun once—i.e., run twice before finally failing. This happens even when -Dtest=… is specified, which disables the profile in the parent POM, annoyingly making all failing local tests run twice.
…rely due to a Remoting channel being disconnected. Among other things, this fixes failures in RestartPipelineTest. (Perhaps attributable to org.jvnet.hudson.test.ChannelShutdownListener rather than production behavior, but still.)
Hmm, live tests fail because I did not consider this RBAC scenario:
I suppose the answer is to watch only within the |
…o do not even try.
With @schottsfired’s help I got 61307bf tested in a semirealistic environment. |
Brilliant, @jglick! Looks good on my end. |
Perhaps related to #201. |
Tested using AWS Quickstart for CloudBees Core on EKS with a Pipeline targeted to Spot instances. Simulated a termination in various ways.
…and in either case the agent does get removed and the build aborted. 🎉 |
src/test/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/RestartPipelineTest.java
Outdated
Show resolved
Hide resolved
…imum. Unfortunately I lack write access to the repo so this Jenkinsfile change will be ignored.
Co-Authored-By: Devin Nusbaum <dwnusbaum@users.noreply.github.com>
Downstream of jenkinsci/workflow-durable-task-step-plugin#104. If the pod has disconnected, I am assuming it will not be able to reconnect, and the agent state is lost—true? If so, there is no point in letting any running
sh
step continue: it should fail now.