Skip to content
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

Interrupt any running build if the JFR JVM exits cleanly #541

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jglick
Copy link
Member

@jglick jglick commented Aug 5, 2021

Untested, but should offer better cleanup behavior in case the Pipeline is using any external resources.

@jglick jglick requested a review from a team as a code owner August 5, 2021 15:44
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason to do that? I am not sure why JFR behavior for Pipeline termination should be different from classic Jenkins

@jglick
Copy link
Member Author

jglick commented Aug 26, 2021

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.

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@jglick
Copy link
Member Author

jglick commented Aug 30, 2021

proceed with Jenkins Pipeline execution when used in the CLI mode with external JENKINS_HOME

Sorry, what?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants