jenkinsci / jenkinsci/workflow-basic-steps-plugin
[JENKINS-52807] Throw a more specific error when the timeout step times out
- Lingua principale
- Java
- Stelle
- 73
- Fork
- 129
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
We ended up having to wrap the timeout step to make it more informative when the timeout occurs.
When the call to timeout throws an error, we determine whether the duration the step took was longer than the timeout. If it took longer, we throw a different TimeoutException which states the time taken and the step being executed, so that someone reading the build log can figure out whether the failure was a timeout or not, and which step took too long.
Unfortunately, there is an edge case where the step takes just longer than the timeout, where it is possible for the step to take slightly too long, but not actually fail due to the timeout. In this situation, we can't tell the difference.
The timeout step itself seems to know when it interrupted the step, so it could do this for us in a much more precise way.
---
Originally reported by
trejkaz, imported from: Throw a more specific error when the timeout step times out
Raw content of original issue
We ended up having to wrap the timeout step to make it more informative when the timeout occurs.
When the call to timeout throws an error, we determine whether the duration the step took was longer than the timeout. If it took longer, we throw a different TimeoutException which states the time taken and the step being executed, so that someone reading the build log can figure out whether the failure was a timeout or not, and which step took too long.
Unfortunately, there is an edge case where the step takes just longer than the timeout, where it is possible for the step to take slightly too long, but not actually fail due to the timeout. In this situation, we can't tell the difference.
The timeout step itself seems to know when it interrupted the step, so it could do this for us in a much more precise way.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Individua l’implementazione del passaggio di timeout e la sua gestione dei passaggi interrotti, quindi esamina i test esistenti relativi al timeout. Determina in che modo il passaggio registra di aver interrotto l’esecuzione e usa questo segnale per la TimeoutException più specifica. Il lavoro è completato quando gli errori di timeout identificano il timeout e il passaggio in esecuzione senza basarsi esclusivamente sulla durata trascorsa.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- devtools
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100