jenkinsci / docker-swarm-plugin

Jenkins plugin which allows to add a Docker Swarm as a cloud agent provider
https://plugins.jenkins.io/docker-swarm/
MIT License
55 stars 47 forks source link

Fixing Pipeline resumption #126

Closed jglick closed 11 months ago

jglick commented 11 months ago

381d0d06300e7b40aa8dc324292e2ea80c67e728 implied that this plugin allowed builds to survive controller restarts, but they did not. To start with, no one should be using EphemeralNode any more, as it completely prevents the agent from reattaching to the controller after a restart and thus letting Pipeline builds resume; as did the recommended use of -noreconnect. Then 5d2a8f16e8e35656e0f4236505614ff65dfcae7f, some sort of optimization which is probably now obsolete (see for example https://github.com/jenkinsci/jenkins/pull/8395), prevented the PlaceholderTask from restarting on the agent even after it reconnected. The purpose of canTake in 6721e1c27678c6d02c5cb6b3df9007bea764c1b7 is also unclear and apparently unnecessary. Also simplified by using _terminate rather than overriding terminate.