jenkinsci / jenkinsci/workflow-basic-steps-plugin

[JENKINS-56964] Expose timeout grace period as configurable

Aperta
#487 2 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

As a job author, I would like the pipeline timeout GRACE_PERIOD exposed as a configurable option so that I can allow for teardown steps that take longer than 5s or 60s.

 

I use the timeout option on a stage, but during the normal course of operations if that timeout engages items in an always post step only get that grace period to complete.  For processes with extensive cleanup, you see `Body did not finish within grace period; terminating with extreme prejudice` and it force-kills what's running.  This can leave some cleanup process incomplete.  I'd like to see an option in the timeout step to specify how long that grace period ought to be.

 

 Relevant code link: https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/3ecc7bbd91182e330a23a9e661ae1cdfa2d2b55e/src/main/java/org/jenkinsci/plugins/workflow/steps/TimeoutStepExecution.java#L41

---
Originally reported by jgray599, imported from: Expose timeout grace period as configurable


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

Raw content of original issue

As a job author, I would like the pipeline timeout GRACE_PERIOD exposed as a configurable option so that I can allow for teardown steps that take longer than 5s or 60s.

 

I use the timeout option on a stage, but during the normal course of operations if that timeout engages items in an always post step only get that grace period to complete.  For processes with extensive cleanup, you see `Body did not finish within grace period; terminating with extreme prejudice` and it force-kills what's running.  This can leave some cleanup process incomplete.  I'd like to see an option in the timeout step to specify how long that grace period ought to be.

 

 Relevant code link: https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/3ecc7bbd91182e330a23a9e661ae1cdfa2d2b55e/src/main/java/org/jenkinsci/plugins/workflow/steps/TimeoutStepExecution.java#L41

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start with src/main/java/org/jenkinsci/plugins/workflow/steps/TimeoutStepExecution.java at the linked grace-period code. Trace how the timeout step handles its grace period and determine where a job-author-provided value would be accepted and applied. Done means the timeout option exposes a configurable grace period and cleanup is allowed to run for that selected duration.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.