If you have a pipeline job that logged excessively (due to running a mvn -X step inside it) is so difficult to find "term" or "kill" links after the build number and eventually it disappeared.

      Would be great to have these as more apparent actions in the ui. Could be actions in the build sidepanel (available only when the console links are printed).

          [JENKINS-33721] Hard kill links could be in the build sidepanel

          Andrew Bayer added a comment -

          Thinking about this some...

          So as best as I can tell, doStop() results in a one-off executor getting used and then interrupted, which I assume leads to the interrupt(boolean forShutdown) method of the AsynchronousExecution getting called, and that prints the "Click here to forcibly terminate running steps" link in the console (and clicking that calls doTerm(), which tries to terminate any FlowNode running and prints the "Click here to forcibly kill entire build" link, and clicking that results in everything getting killed).

          Is it viable to track that process, i.e., have a transient variable marking whether doStop() has been called, whether doTerm() has been called, and whether doKill() has been called, and then have a transient action that renders the appropriate link in the side panel depending on state? i.e., isBuilding() needs to be true to have any link show up there, if doStop() hasn't been called, the link says "Abort the build" and calls doStop(), if doStop() has been called but doTerm() has not, the link says "Forcibly terminate running steps" and calls doTerm(), and if doTerm() has been called but doKill() has not, the link says "Forcibly kill entire build" and calls doKill().

          Thoughts?

          Andrew Bayer added a comment - Thinking about this some... So as best as I can tell, doStop() results in a one-off executor getting used and then interrupted, which I assume leads to the interrupt(boolean forShutdown) method of the AsynchronousExecution getting called, and that prints the "Click here to forcibly terminate running steps" link in the console (and clicking that calls doTerm() , which tries to terminate any FlowNode running and prints the "Click here to forcibly kill entire build" link, and clicking that results in everything getting killed). Is it viable to track that process, i.e., have a transient variable marking whether doStop() has been called, whether doTerm() has been called, and whether doKill() has been called, and then have a transient action that renders the appropriate link in the side panel depending on state? i.e., isBuilding() needs to be true to have any link show up there, if doStop() hasn't been called, the link says "Abort the build" and calls doStop() , if doStop() has been called but doTerm() has not, the link says "Forcibly terminate running steps" and calls doTerm() , and if doTerm() has been called but doKill() has not, the link says "Forcibly kill entire build" and calls doKill() . Thoughts?

          Andrew Bayer added a comment -

          Andrew Bayer added a comment - Preliminary PR up at https://github.com/jenkinsci/workflow-job-plugin/pull/4

          Andrew Bayer added a comment -

          Andrew Bayer added a comment - New PR up at https://github.com/jenkinsci/workflow-job-plugin/pull/33

          Andrew Bayer added a comment -

          Andrew Bayer added a comment - New PR up at https://github.com/jenkinsci/workflow-job-plugin/pull/33

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
          src/main/resources/org/jenkinsci/plugins/workflow/job/WorkflowRun/sidepanel.jelly
          src/test/java/org/jenkinsci/plugins/workflow/job/WorkflowRunRestartTest.java
          http://jenkins-ci.org/commit/workflow-job-plugin/4a4d3848a9fe906d4985993fd6021d87a34b24a5
          Log:
          [FIXED JENKINS-33721] - Add contextual term/kill in side panel.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java src/main/resources/org/jenkinsci/plugins/workflow/job/WorkflowRun/sidepanel.jelly src/test/java/org/jenkinsci/plugins/workflow/job/WorkflowRunRestartTest.java http://jenkins-ci.org/commit/workflow-job-plugin/4a4d3848a9fe906d4985993fd6021d87a34b24a5 Log: [FIXED JENKINS-33721] - Add contextual term/kill in side panel.

            abayer Andrew Bayer
            escoem Emilio Escobar
            Votes:
            6 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: