Branch: refs/heads/master Home: https://github.com/jenkinsci/durable-task-plugin Commit: 6802fe0f0b82f188d8e2865118548afb6788b668 https://github.com/jenkinsci/durable-task-plugin/commit/6802fe0f0b82f188d8e2865118548afb6788b668 Author: James Nord <jtn...@users.noreply.github.com> Date: 2024-04-16 (Tue, 16 Apr 2024)
Changed paths: M pom.xml M src/main/java/org/jenkinsci/plugins/durabletask/executors/OnceRetentionStrategy.java A src/test/java/org/jenkinsci/plugins/durabletask/executors/OnceRetentionStrategyTest.java Log Message: ----------- [JENKINS-69277] relaunch an agent if the connection is broken (#152) * [JENKINS-69277] relaunch an agent if the connection is broken Even though this is a OnceRetentionStrategy we expect a durable task to be able to run to completion even if the connection is broken. So we relaunch the agent if the agent is offline and it is not done. We are not forcing a reconnect, as this allows any existing connect operation (which could be the first one, to continue running). * [JENKINS-69277] avoid spotbugs warning Whilst spotbugs complained about the lack of synchronization on terminating we do not want to put the connect call inside the synchronized block as it may be long running, or cause some form of re-entry on a different thread. whilst the locking is not perfect, we may try to relaunch and agent just as it was done, we have set the computer to not accept any tasks so the agent should become idle, and be terminated (either in the current termination block) or the next time the check runs. * check if launch is supported early on * [JENKINS-69277] Add a unit test to cover OnceRetentionStrategy iAdds a unit test to cover both the happy case of a cloud agent using OnceRetentionStrategy and the unhappy case where the agent dies and needs restarting. --------- Co-authored-by: Carroll Chiou <cch...@cloudbees.com> To unsubscribe from these emails, change your notification settings at https://github.com/jenkinsci/durable-task-plugin/settings/notifications -- You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/durable-task-plugin/push/refs/heads/master/c8635e-6802fe%40github.com.