Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-32228

Event when timeout is reach should be customizable

      I would like to edit the event executed when timeout is reach.

      In some scenario, the event "Send interrupt signal to process" won't kill the running process. If I could catch some event, I could force the process to stop and for instance rollback environment.

      timeout(5, unit:'MINUTES') {
                  // 10 minutes process
      } catch {
                  // specific timeout signal
      }
      

          [JENKINS-32228] Event when timeout is reach should be customizable

          Guillaume Théraud created issue -
          Guillaume Théraud made changes -
          Summary Original: Timeout event should be customizable New: Event when timeout is reach should be customizable
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 167812 ] New: JNJira + In-Review [ 182853 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Jesse Glick made changes -
          Component/s New: workflow-basic-steps-plugin [ 21712 ]
          Component/s Original: pipeline [ 21692 ]
          Jesse Glick made changes -
          Component/s New: durable-task-plugin [ 18622 ]
          Jesse Glick made changes -
          Component/s New: workflow-durable-task-step-plugin [ 21715 ]
          Component/s Original: durable-task-plugin [ 18622 ]

          Jesse Glick added a comment -

          In some scenario, the event "Send interrupt signal to process" won't kill the running process.

          I would argue that this is more the point: if DurableTaskStep.Execution.stop does not actually result in termination after some reasonable amount of time, perhaps SIGKILL should be sent and the step exit.

          Additionally/alternately, perhaps timeout should give its body a grace period to exit cleanly, after which running steps and/or CPS-transformed Groovy code and/or native code should be terminated, à la WorkflowRun.doTerm. Cf. JENKINS-32986.

          Jesse Glick added a comment - In some scenario, the event "Send interrupt signal to process" won't kill the running process. I would argue that this is more the point: if DurableTaskStep.Execution.stop does not actually result in termination after some reasonable amount of time, perhaps SIGKILL should be sent and the step exit. Additionally/alternately, perhaps timeout should give its body a grace period to exit cleanly, after which running steps and/or CPS-transformed Groovy code and/or native code should be terminated, à la WorkflowRun.doTerm . Cf. JENKINS-32986 .
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-32986 [ JENKINS-32986 ]

            jglick Jesse Glick
            gtheraud Guillaume Théraud
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: