| I think there are two desired behaviors depending on the placement of timeout and retry relative to each other. First case (this ticket):
retry(3) {
timeout(time: 5, unit: 'MINUTES') {
// Something that can fail
}
}
In this case, if the timeout triggers, I think the desired behavior is for retry to run its body again. This is not the current behavior. Second case (not this ticket):
timeout(time: 5, unit: 'MINUTES') {
retry(3) {
// Something that can fail
}
}
In this case, if the timeout triggers, I think the desired behavior is for retry to be aborted without retrying anything. This is the current behavior, and as far as I understand, is working as-designed after JENKINS-44379. Switching timeout to use a different kind of exception would fix the first case, but break the second case. To support both use cases, something more complex would be needed (see PR 81 for a possible approach, although retry would need to be updated as well)). Basil Crow Noted that a fix for JENKINS-60354 might overlap a bit with this issue. |