Interrupt any running build if the JFR JVM exits cleanly#541
Interrupt any running build if the JFR JVM exits cleanly#541jglick wants to merge 1 commit intojenkinsci:mainfrom
Conversation
oleg-nenashev
left a comment
There was a problem hiding this comment.
Any particular reason to do that? I am not sure why JFR behavior for Pipeline termination should be different from classic Jenkins
Because in a Jenkins server, exiting should not interrupt running Pipelines. That would obviate all the durability features of Pipeline! Whereas if a JFR container dies for whatever reason while a build was in progress, clearly that build is going to die as well, so you should give it the chance to clean up a bit: send any “aborted” notifications, release locks on external services, whatever. To be more useful, this should probably wait (up to ~10s) for the build to terminate on its own. The current code sends an abort signal but then allows JVM shutdown to proceed in parallel. |
oleg-nenashev
left a comment
There was a problem hiding this comment.
Jenkinsfile Runner also can proceed with Jenkins Pipeline execution when used in the CLI mode with external JENKINS_HOME. While this is not the immediate use-case for the most of the users, I would not like to block it completely. There should be at least a documented opt out flag
Sorry, what? |
Untested, but should offer better cleanup behavior in case the Pipeline is using any external resources.