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

Event when timeout is reach should be customizable

    XMLWordPrintable

Details

    Description

      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
      }
      

      Attachments

        Issue Links

          Activity

            jglick 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.

            jglick 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 .
            jglick Jesse Glick added a comment -

            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.

            As of JENKINS-38769, the step will exit.

            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

            As of JENKINS-39072, running steps should be stopped. As of JENKINS-25623, CPS-transformed Groovy code will be too. Native code is another case, tracked in JENKINS-32986.

            jglick Jesse Glick added a comment - 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. As of JENKINS-38769 , the step will exit. 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 As of JENKINS-39072 , running steps should be stopped. As of JENKINS-25623 , CPS-transformed Groovy code will be too. Native code is another case, tracked in JENKINS-32986 .

            People

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

              Dates

                Created:
                Updated:
                Resolved: