-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid printing warnings from CpsStepContext.completed
#490
Conversation
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
StepContext
is 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 oneFlowInterruptedException
withRemovedNodeCause
terminates the body of anode
block; subsequently, another such termination withQueueTaskCancelled
is thrown to the same context. Since there is no API inStepContext
to 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 toFINE
to avoid pointless warnings.