jenkinsci / jenkinsci/workflow-basic-steps-plugin

[JENKINS-63696] The timeout activity flag extends the time by one and a half times

Aperta
#513 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
component:workflow-basic-steps-plugin imported-jira-issue pipeline priority:minor resolution:unresolved
Lingua principale
Java
Stelle
73
Fork
129
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

My pipeline has the following options:

  

options {

timestamps ()
timeout(activity: true, time: 30, unit: 'SECONDS')
}

 

And canceling the job occurs after 45 seconds:

22:12:00 Timeout set to expire after 30 sec without activity

[Pipeline] {
[Pipeline] stage
[Pipeline] { (Reservation)
[Pipeline] script
[Pipeline] {
[Pipeline] input
22:12:00 Input requested
22:12:45 Cancelling nested steps due to timeout

This happens for every time I was set (SECONDS, MINUTES and HOURS) - and every time was extended by one and a half times.

  

But if I changed my pipeline options to:

options {

timestamps ()
timeout(activity: false, time: 30, unit: 'SECONDS')
}

 

Every things is ok (sample log):

 

21:36:24  Timeout set to expire in 30 sec 

[Pipeline] {
[Pipeline] stage
[Pipeline] { (Reservation)
[Pipeline] script
[Pipeline] {
[Pipeline] input
21:36:24 Input requested
21:36:54 Cancelling nested steps due to timeout

  

Timeout was called after exactly 30 seconds.

 

I tested this on two different Jenkins instances, and for both I have the same result, as I described above.

 

 

 

---
Originally reported by kornel_mk, imported from: The timeout activity flag extends the time by one and a half times


  • status: Open
  • priority: Minor
  • component(s): workflow-basic-steps-plugin
  • label(s): jenkins, pipeline, plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 3
  • imported: 20251215-220547

Raw content of original issue

My pipeline has the following options:

  



options {

timestamps ()
timeout(activity: true, time: 30, unit: 'SECONDS')
}


 

And canceling the job occurs after 45 seconds:


22:12:00 Timeout set to expire after 30 sec without activity

[Pipeline] {
[Pipeline] stage
[Pipeline] { (Reservation)
[Pipeline] script
[Pipeline] {
[Pipeline] input
22:12:00 Input requested
22:12:45 Cancelling nested steps due to timeout


This happens for every time I was set (SECONDS, MINUTES and HOURS) - and every time was extended by one and a half times.

  

But if I changed my pipeline options to:



options {

timestamps ()
timeout(activity: false, time: 30, unit: 'SECONDS')
}


 

Every things is ok (sample log):
 



21:36:24  Timeout set to expire in 30 sec 

[Pipeline] {
[Pipeline] stage
[Pipeline] { (Reservation)
[Pipeline] script
[Pipeline] {
[Pipeline] input
21:36:24 Input requested
21:36:54 Cancelling nested steps due to timeout


  

Timeout was called after exactly 30 seconds.

 

I tested this on two different Jenkins instances, and for both I have the same result, as I described above.

 

 

 

environment

```
Environment 1:

Jenkins ver. 2.222.3 on Windows 10.

Basic Steps 2.20

Job running on master

Environment 2:

Jenkins ver. 2.190.1 on Debian 9

Basic Steps 2.18

Job running on a Windows Slave connected with JNLP4
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia in workflow-basic-steps-plugin riproducendo la pipeline timeout(activity: true) mostrata nel report e confrontala con timeout(activity: false). Traccia il comportamento del timeout dell’attività e identifica perché un’impostazione di 30 secondi annulla l’esecuzione dopo 45 secondi nelle unità e negli ambienti riportati. Il lavoro è completato quando i timeout basati sull’attività scadono dopo la durata configurata, con test che coprono il comportamento osservato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
ci-cd
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.