Skip to content
Permalink
Browse files

Add one-off executor to search list for cancel job

By "Build Current Pathcset Only" feature, running and queued jobs with
the same change are canceled. These are found in queue items and
executors.

But MatrixJob uses one-off executor. It is not included in executors. So
it cannot be canceled.

This patch adds one-off executors to executor's list.

Fix for JENKINS-24295

Task-Url: https://issues.jenkins-ci.org/browse/JENKINS-24295
  • Loading branch information...
rinrinne committed Sep 11, 2014
1 parent bbbf405 commit 8b0e9be7c5be6c70c53aeb25c8a1a258ac3d54da
@@ -1980,7 +1980,10 @@ private void cancelJob(ParametersAction parameters) {

// Interrupt any currently running jobs.
for (Computer c : Hudson.getInstance().getComputers()) {
for (Executor e : c.getExecutors()) {
List<Executor> executors = new ArrayList<Executor>();
executors.addAll(c.getOneOffExecutors());
executors.addAll(c.getExecutors());
for (Executor e : executors) {
if (e.getCurrentExecutable() instanceof Actionable) {
Actionable a = (Actionable)e.getCurrentExecutable();
List<ParametersAction> params = a.getActions(ParametersAction.class);

0 comments on commit 8b0e9be

Please sign in to comment.
You can’t perform that action at this time.