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.
- depends on
-
JENKINS-32015 Stop Groovy code execution during quietingDown
-
- Resolved
-
- is related to
-
JENKINS-25938 Lock an Executor without creating a Thread
-
- Resolved
-
-
JENKINS-26900 Hide flyweight master executor when ≥1 heavyweight executors running as subtasks
-
- Resolved
-
- links to
[JENKINS-22941] Way to mark an Executable that should not block isReadyToRestart
Labels | Original: api | New: api workflow |
Remote Link | New: This issue links to "Workflow Trello card (Web Link)" [ 11700 ] |
Remote Link | Original: This issue links to "Workflow Trello card (Web Link)" [ 11700 ] |
Link |
New:
This issue is related to |
Link |
New:
This issue is related to |
Assignee | New: Jesse Glick [ jglick ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Remote Link | New: This issue links to "PR 1610 (Web Link)" [ 12177 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Progress [ 3 ] | New: Resolved [ 5 ] |
Resolution | Original: Fixed [ 1 ] | |
Status | Original: Resolved [ 5 ] | New: Reopened [ 4 ] |