Skip to content

Commit 301e1f3

Browse files
committed
RemovedNodeListener.cancelOwnerExecution can be noisy
1 parent 38b1b5a commit 301e1f3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ private static void cancelOwnerExecution(Node node, CauseOfInterruption... cause
379379
try {
380380
listener = task.context.get(TaskListener.class);
381381
} catch (Exception x) {
382-
LOGGER.log(Level.WARNING, null, x);
382+
LOGGER.log(Level.FINE, x, () -> task.getFullDisplayName() + " possibly already finished");
383383
continue;
384384
}
385385
task.withExecution(execution -> {
@@ -389,11 +389,7 @@ private static void cancelOwnerExecution(Node node, CauseOfInterruption... cause
389389
return;
390390
}
391391
listener.getLogger().println("Agent " + node.getNodeName() + " was deleted; cancelling node body");
392-
if (Util.isOverridden(BodyExecution.class, body.getClass(), "cancel", Throwable.class)) {
393-
body.cancel(new FlowInterruptedException(Result.ABORTED, false, causes));
394-
} else { // TODO remove once https://github.com/jenkinsci/workflow-cps-plugin/pull/570 is widely deployed
395-
body.cancel(causes);
396-
}
392+
body.cancel(new FlowInterruptedException(Result.ABORTED, false, causes));
397393
});
398394
}
399395
}

0 commit comments

Comments
 (0)