Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-22941

Way to mark an Executable that should not block isReadyToRestart

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • core

      If you have a Queue.Executable that should consume an executor (so is not from a FlyweightTask), it unconditionally blocks "safe restart": RestartListener.Default merely checks for the existence of at least one busy executor. For an executable using the durable-task plugin or similar, this is undesirable, since the task can in fact survive a Jenkins restart. There should be a way to mark an Executable (or its parent Task) as not blocking restart.

      There is already NonBlockingTask but this controls whether the task can be scheduled while Jenkins is quieting down, while this issue pertains to tasks which are already running and are safe to interrupt.

      As an aside, Jenkins.doSafeExit inexplicably has its own copy of safe shutdown code which neglects to use doQuietDown(true, 0) like doSafeRestart does, and thus does not consider RestartListener.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: