Avoid printing warnings from CpsStepContext.completed#490
Avoid printing warnings from CpsStepContext.completed#490car-roll merged 3 commits intojenkinsci:masterfrom
CpsStepContext.completed#490Conversation
FWIW I think such an API might be useful for jenkinsci/workflow-durable-task-step-plugin#185 as well, and I would be in favor of adding it. |
|
Perhaps so. Feel free to propose an API in As it turns out in jenkinsci/workflow-durable-task-step-plugin#180 I no longer need this as I found there was already a |
|
@jglick Do you feel there is any worth in including this PR? If not, I can go ahead and close it |
|
No strong feeling either way. I think this warning is usually just noise; but I also do not have a specific example at the moment of a case where it is difficult to avoid by other means (other than the category of cases involving |
|
I don't feel too strongly either way, and I don't recall ever seeing these messages as part of an actual bug. Maybe it would be worth using something like |
…ugin into CpsStepContext.completed
When a
StepContextis completed twice, only the first result is retained, so this situation might be a bug. On the other hand, it might not; some logic in #76 tried to suppress noisy messages under certain circumstances involvingstop(). In jenkinsci/workflow-durable-task-step-plugin#180 I am finding another such case, where oneFlowInterruptedExceptionwithRemovedNodeCauseterminates the body of anodeblock; subsequently, another such termination withQueueTaskCancelledis thrown to the same context. Since there is no API inStepContextto determine whether it is already complete (so there is no need to mark it complete again), and this situation is typically harmless, I am just tuning all the logging down toFINEto avoid pointless warnings.