-
Notifications
You must be signed in to change notification settings - Fork 695
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
support fail fast for node removal #998
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.
Failing in CI.
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, this one is mystifying me. I'm still trying to figure out why
@@ -526,15 +523,23 @@ public boolean isAcceptingTasks() { | |||
void idleTimeout() { | |||
LOGGER.info("EC2 instance idle time expired: " + getInstanceId()); | |||
if (!stopOnTerminate) { | |||
terminate(); | |||
try { | |||
terminate(); |
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.
(ignore WS)
src/test/java/hudson/plugins/ec2/ssh/verifiers/SshHostKeyVerificationStrategyTest.java
Outdated
Show resolved
Hide resolved
Looks right, but has it been tested? |
|
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.
Regarding #998 (comment) I guess that
ec2-plugin/src/test/java/hudson/plugins/ec2/EC2RetentionStrategyTest.java
Lines 759 to 760 in 753e04a
EC2AbstractSlave node = c.getNode(); | |
assertTrue(node.terminateScheduled.await(10, TimeUnit.SECONDS)); |
Computer.getNode
may return null if the agent definition has been removed from the system before the executor is released and the computer destroyed) but happened to pass before due to different timing conditions. It is not exactly clear to me what the test is supposed to be asserting here. I guess you could just skip the last assertion in case node == null
since this would be normal if the build is finishing.
closing in favor of #1015 due to the branch conflicts |
For the future, please retain the same PR and just resolve conflicts in it. In the worst case, if running a merge tool became completely unwieldy and it was really easiest to start from scratch, just reset your branch to |
@jglick yeah I was having a terrible time with the merge conflicts but I didn't think about force pushing. Will do that next time. |
jenkinsci/workflow-durable-task-step-plugin#372 added fail fast for cloud node removal. However, this feature is not supported by the
ec2
plugin.This PR refactors
EC2AbstractSlave
andEC2Computer
in order to take advantage of jenkinsci/workflow-durable-task-step-plugin#372Testing done
Submitter checklist