diff --git a/src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java b/src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java index 3afb4f61..658020cf 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java @@ -379,7 +379,7 @@ private static void cancelOwnerExecution(Node node, CauseOfInterruption... cause try { listener = task.context.get(TaskListener.class); } catch (Exception x) { - LOGGER.log(Level.WARNING, null, x); + LOGGER.log(Level.FINE, x, () -> task.getFullDisplayName() + " possibly already finished"); continue; } task.withExecution(execution -> { @@ -389,11 +389,7 @@ private static void cancelOwnerExecution(Node node, CauseOfInterruption... cause return; } listener.getLogger().println("Agent " + node.getNodeName() + " was deleted; cancelling node body"); - if (Util.isOverridden(BodyExecution.class, body.getClass(), "cancel", Throwable.class)) { - body.cancel(new FlowInterruptedException(Result.ABORTED, false, causes)); - } else { // TODO remove once https://github.com/jenkinsci/workflow-cps-plugin/pull/570 is widely deployed - body.cancel(causes); - } + body.cancel(new FlowInterruptedException(Result.ABORTED, false, causes)); }); } }