Skip to content

Commit

Permalink
Merge pull request #387 from jglick/RemovedNodeListener.cancelOwnerEx…
Browse files Browse the repository at this point in the history
…ecution

`RemovedNodeListener.cancelOwnerExecution` can be noisy
  • Loading branch information
jglick authored Jul 31, 2024
2 parents 38b1b5a + 301e1f3 commit 2fd76fb
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Check warning on line 382 in src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 382 is not covered by tests
continue;
}
task.withExecution(execution -> {
Expand All @@ -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));
});
}
}
Expand Down

0 comments on commit 2fd76fb

Please sign in to comment.