From 68be217043e3a52a25254c3c433f71e601f043f3 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 23 Jan 2024 16:22:37 -0500 Subject: [PATCH] Fine logging with stack trace when queue item cancelled --- .../plugins/workflow/support/steps/ExecutorStepExecution.java | 3 +++ 1 file changed, 3 insertions(+) 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 85d620bf..7a79ffca 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 @@ -252,6 +252,9 @@ public void stop(@NonNull Throwable cause) throws Exception { if (li.task instanceof PlaceholderTask) { PlaceholderTask task = (PlaceholderTask) li.task; if (!task.stopping) { + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, null, new Throwable(li.task + " was cancelled")); + } task.context.onFailure(new FlowInterruptedException(Result.ABORTED, true, new QueueTaskCancelled())); } }