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

Jenkins should ask for confirmation before aborting a build

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • core
    • None

    Description

      Jenkins does not ask for confirmation before aborting a build. Since this can cause significant harm in the case of long-running builds or builds with side effects (partial deployments etc.), this should be added to the abort functionality.

      Queued items can be parameterized or triggered in a way that makes them difficult to reproduce (actions added etc.) so those should probably be protected from accidentally canceling them as well.

      Attachments

        Issue Links

          Activity

            danielbeck Daniel Beck created issue -

            Probably the main issue that in highly active queue UI can send abort to wrong running job because of refresh rendering.

            integer Kanstantsin Shautsou added a comment - Probably the main issue that in highly active queue UI can send abort to wrong running job because of refresh rendering.
            danielbeck Daniel Beck added a comment -

            True. Another reason for having this. That was actually the reason I went the extra inch and added the job name for queue items, and job name and build name for running builds, rather than just asking "Are you sure you want to abort?".

            danielbeck Daniel Beck added a comment - True. Another reason for having this. That was actually the reason I went the extra inch and added the job name for queue items, and job name and build name for running builds, rather than just asking "Are you sure you want to abort?".

            Side effect is that if i mistakenly run build i want abort it very fast. And now i can do it.

            integer Kanstantsin Shautsou added a comment - Side effect is that if i mistakenly run build i want abort it very fast. And now i can do it.
            integer Kanstantsin Shautsou made changes -
            Field Original Value New Value
            Remote Link This issue links to "jenkins/pull/1835 (Web Link)" [ 13157 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 165677 ] JNJira + In-Review [ 182084 ]

            Code changed in jenkins
            User: Daniel Beck
            Path:
            core/src/main/resources/hudson/widgets/BuildHistoryWidget/entries.properties
            core/src/main/resources/hudson/widgets/HistoryWidget/entry.jelly
            core/src/main/resources/hudson/widgets/HistoryWidget/entry.properties
            core/src/main/resources/lib/hudson/buildCaption.jelly
            core/src/main/resources/lib/hudson/buildCaption.properties
            core/src/main/resources/lib/hudson/executors.jelly
            core/src/main/resources/lib/hudson/executors.properties
            core/src/main/resources/lib/hudson/queue.jelly
            core/src/main/resources/lib/hudson/queue.properties
            core/src/main/resources/lib/layout/stopButton.jelly
            http://jenkins-ci.org/commit/jenkins/3af3a27116ccec048ce9eb61f947d74e0fe37611
            Log:
            [FIX JENKINS-30565] Ask for confirmation before canceling/aborting (#1835)

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/resources/hudson/widgets/BuildHistoryWidget/entries.properties core/src/main/resources/hudson/widgets/HistoryWidget/entry.jelly core/src/main/resources/hudson/widgets/HistoryWidget/entry.properties core/src/main/resources/lib/hudson/buildCaption.jelly core/src/main/resources/lib/hudson/buildCaption.properties core/src/main/resources/lib/hudson/executors.jelly core/src/main/resources/lib/hudson/executors.properties core/src/main/resources/lib/hudson/queue.jelly core/src/main/resources/lib/hudson/queue.properties core/src/main/resources/lib/layout/stopButton.jelly http://jenkins-ci.org/commit/jenkins/3af3a27116ccec048ce9eb61f947d74e0fe37611 Log: [FIX JENKINS-30565] Ask for confirmation before canceling/aborting (#1835)
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            oleg_nenashev Oleg Nenashev added a comment -

            The fix has been released in 2.21

            oleg_nenashev Oleg Nenashev added a comment - The fix has been released in 2.21
            oleg_nenashev Oleg Nenashev added a comment -

            danielbeck Is it something we want to have in 2.19.x LTS?

            oleg_nenashev Oleg Nenashev added a comment - danielbeck Is it something we want to have in 2.19.x LTS?

            HI,
            After installing Jenkins 2.21, we indeed have a confirmation message before canceling running job or deleting job from queue but when we check the box 'don't display this kind of message anymore' the message well doesn't display anymore but job cancelation has no effect.

            Job is well canceled or removed form queue only when we click on the confirmation message.
            Could you have a look on that please ?
            Thx

            splashnenen Alexandre Aubert added a comment - HI, After installing Jenkins 2.21, we indeed have a confirmation message before canceling running job or deleting job from queue but when we check the box 'don't display this kind of message anymore' the message well doesn't display anymore but job cancelation has no effect. Job is well canceled or removed form queue only when we click on the confirmation message. Could you have a look on that please ? Thx
            splashnenen Alexandre Aubert made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            danielbeck Daniel Beck added a comment -

            'don't display this kind of message anymore' the message well doesn't display anymore but job cancelation has no effect.

            Don't do that then. It's a browser feature designed to prevent popup spam. It won't magically remember your previous answer.

            oleg_nenashev No, not a backportable fix.

            danielbeck Daniel Beck added a comment - 'don't display this kind of message anymore' the message well doesn't display anymore but job cancelation has no effect. Don't do that then. It's a browser feature designed to prevent popup spam. It won't magically remember your previous answer. oleg_nenashev No, not a backportable fix.
            danielbeck Daniel Beck made changes -
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Resolved [ 5 ]
            ssides steve sides added a comment -

            "the message well doesn't display anymore but job cancelation has no effect" hmmm...maybe you missed this point of the comment.
            What I am currently looking at, I click the red x abort job button, a dialog comes up; I dismiss it; I click the red x again; another dialog comes up; I check that box and click ok. However, the job is not cancelled. Jenkins is still hung. The job cancellation has no effect and the jenkins ui is stuck, and the job will not be cancelled. I have to delete the job and/or restart jenkins. This is halfway through a pipeline job using 2.26.

            ssides steve sides added a comment - "the message well doesn't display anymore but job cancelation has no effect" hmmm...maybe you missed this point of the comment. What I am currently looking at, I click the red x abort job button, a dialog comes up; I dismiss it; I click the red x again; another dialog comes up; I check that box and click ok. However, the job is not cancelled. Jenkins is still hung. The job cancellation has no effect and the jenkins ui is stuck, and the job will not be cancelled. I have to delete the job and/or restart jenkins. This is halfway through a pipeline job using 2.26.
            danielbeck Daniel Beck added a comment -

            "the message well doesn't display anymore but job cancelation has no effect" hmmm...maybe you missed this point of the comment.

            I did not. You told your browser "From now on, automatically reject all popup messages from this site", and that's what happens. Jenkins asks for confirmation, your browser tells it "No", and nothing gets cancelled. Remember, your computer does what you tell it to do, not what you want

            The job cancellation has no effect and the jenkins ui is stuck, and the job will not be cancelled. I have to delete the job and/or restart jenkins.

            Or, you know, restart your browser to clear the flag you accidentally set.

            danielbeck Daniel Beck added a comment - "the message well doesn't display anymore but job cancelation has no effect" hmmm...maybe you missed this point of the comment. I did not. You told your browser "From now on, automatically reject all popup messages from this site", and that's what happens. Jenkins asks for confirmation, your browser tells it "No", and nothing gets cancelled. Remember, your computer does what you tell it to do, not what you want The job cancellation has no effect and the jenkins ui is stuck, and the job will not be cancelled. I have to delete the job and/or restart jenkins. Or, you know, restart your browser to clear the flag you accidentally set.
            paulca Paul Carr added a comment -

            This should be feature switchable .... we have hundreds of automated tests that will eventually fail if a server is down. Once we know they're all going to fail we now have to click the popup to cancel each. Could we have an option in the Manage Jenkins menu to disable these popups ?

            paulca Paul Carr added a comment - This should be feature switchable .... we have hundreds of automated tests that will eventually fail if a server is down. Once we know they're all going to fail we now have to click the popup to cancel each. Could we have an option in the Manage Jenkins menu to disable these popups ?
            paulca Paul Carr added a comment -

            This should really be switchable in the jenkins config

            paulca Paul Carr added a comment - This should really be switchable in the jenkins config
            paulca Paul Carr made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            paulca Paul Carr made changes -
            Rank Ranked higher
            oleg_nenashev Oleg Nenashev added a comment -

            > Could we have an option in the Manage Jenkins menu to disable these popups ?

            Likely it lies within the "feel free to contribute". If you have hundreds of tests, the best solution is to write a system Groovy script for it

            oleg_nenashev Oleg Nenashev added a comment - > Could we have an option in the Manage Jenkins menu to disable these popups ? Likely it lies within the "feel free to contribute". If you have hundreds of tests, the best solution is to write a system Groovy script for it
            paulca Paul Carr added a comment -

            Wouldn't that make upgrading more painful ? Having to remember to copy the groovy script etc ?  This was a feature requested by 1 person, with 2 additional votes, and it's made it straight into the main build. I suspect more people than just me will find it infuriating when they eventually upgrade.

            paulca Paul Carr added a comment - Wouldn't that make upgrading more painful ? Having to remember to copy the groovy script etc ?  This was a feature requested by 1 person, with 2 additional votes, and it's made it straight into the main build. I suspect more people than just me will find it infuriating when they eventually upgrade.
            danielbeck Daniel Beck added a comment -

            This is resolved, anything else is a followup RFE.

            danielbeck Daniel Beck added a comment - This is resolved, anything else is a followup RFE.
            danielbeck Daniel Beck made changes -
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Resolved [ 5 ]
            paulca Paul Carr added a comment -

            OK.

            paulca Paul Carr added a comment - OK.

            Requiring all cancelled jobs to be acknowledge is ridiculous without being able to turn it off as a configuration setting.  I regularly have to cancel lots of running jobs. 

            Please add a configuration setting or pull this back.

            ewalt72 Eric Waltersdorf added a comment - Requiring all cancelled jobs to be acknowledge is ridiculous without being able to turn it off as a configuration setting.  I regularly have to cancel lots of running jobs.  Please add a configuration setting or pull this back.
            danielbeck Daniel Beck added a comment -

            ewalt72 Again,

            This is resolved, anything else is a followup RFE.

            Please file that, and link it from here, if you feel something like that is necessary. Also, provide your use case. From my POV "I regularly have dozens or hundreds of builds in the queue and need to cancel them quickly" rather indicates a much different underlying problem to me. Stack Overflow calls this the "X/Y problem", maybe an entirely different solution would be more practical.

            danielbeck Daniel Beck added a comment - ewalt72 Again, This is resolved, anything else is a followup RFE. Please file that, and link it from here, if you feel something like that is necessary. Also, provide your use case. From my POV "I regularly have dozens or hundreds of builds in the queue and need to cancel them quickly" rather indicates a much different underlying problem to me. Stack Overflow calls this the "X/Y problem", maybe an entirely different solution would be more practical.
            oleg_nenashev Oleg Nenashev added a comment - - edited

            If somebody wants to disable this feature, it is pretty trivial to do so by adding a SystemProperty to Jenkins. By default Jenkins should require confirmation IMHO

            oleg_nenashev Oleg Nenashev added a comment - - edited If somebody wants to disable this feature, it is pretty trivial to do so by adding a SystemProperty to Jenkins. By default Jenkins should require confirmation IMHO
            danielbeck Daniel Beck added a comment -

            pretty trivial to do so

            Let's please not add new options without having determined whether there's an actual need for it. See my preceding comment.

            danielbeck Daniel Beck added a comment - pretty trivial to do so Let's please not add new options without having determined whether there's an actual need for it. See my preceding comment.
            danielbeck Daniel Beck made changes -
            Link This issue is related to JENKINS-45592 [ JENKINS-45592 ]

            People

              danielbeck Daniel Beck
              danielbeck Daniel Beck
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: