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

Add 'Are you sure' on Reload configuration from disk

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The button "Reload configuration from disk" in Manage Jenkins can be easily pressed by mistake by an administrator.

      This happened to us and we lost functionality of Jenkins for more than an hour (we waited for Jenkins to come back by itself but it never did and we decided to restart the service on the master).

      Why not make the link points to an "Are you sure?" page like for the safe restart link?

      Thank you very much!

        Attachments

          Issue Links

            Activity

            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2450
            JENKINS-15340 Do not try to click on links with onclick attributes as these require confirmation. (Revision e1f070bbef425fcbc9376eb99190a9b7bf3c4e5e)

            Result = UNSTABLE
            Jesse Glick : e1f070bbef425fcbc9376eb99190a9b7bf3c4e5e
            Files :

            • test/src/test/java/hudson/model/ManagementLinkTest.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2450 JENKINS-15340 Do not try to click on links with onclick attributes as these require confirmation. (Revision e1f070bbef425fcbc9376eb99190a9b7bf3c4e5e) Result = UNSTABLE Jesse Glick : e1f070bbef425fcbc9376eb99190a9b7bf3c4e5e Files : test/src/test/java/hudson/model/ManagementLinkTest.java
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/model/ManagementLink.java
            core/src/main/java/jenkins/management/ReloadLink.java
            core/src/main/java/jenkins/model/Jenkins.java
            core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java
            core/src/main/resources/jenkins/model/Jenkins/manage.jelly
            core/src/main/resources/jenkins/model/Jenkins/manage.properties
            core/src/main/resources/lib/layout/breadcrumbs.js
            core/src/main/resources/lib/layout/confirmationLink.jelly
            core/src/main/resources/lib/layout/task.jelly
            http://jenkins-ci.org/commit/jenkins/e3f905fa5347e3265a9919fd8112902ed53d9fd9
            Log:
            [FIXED JENKINS-15340] Ask for confirmation before reloading config from disk, as it may be expensive.
            First of all, /reload should require POST (also prevents XSS DoS attacks).
            Adding <l:confirmationLink> to encapsulate a link that requires confirmation upon clicking.
            Allowing a ManagementLink to request confirmation (also implying POST); could be used also for e.g. /quietDown.
            Enhancing <l:task> to support confirmation as well, and honoring this in context menu items.(cherry picked from commit 9eb69772a505890a9767375b7c2a78e278895ef9)

            Conflicts:
            changelog.html

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/ManagementLink.java core/src/main/java/jenkins/management/ReloadLink.java core/src/main/java/jenkins/model/Jenkins.java core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java core/src/main/resources/jenkins/model/Jenkins/manage.jelly core/src/main/resources/jenkins/model/Jenkins/manage.properties core/src/main/resources/lib/layout/breadcrumbs.js core/src/main/resources/lib/layout/confirmationLink.jelly core/src/main/resources/lib/layout/task.jelly http://jenkins-ci.org/commit/jenkins/e3f905fa5347e3265a9919fd8112902ed53d9fd9 Log: [FIXED JENKINS-15340] Ask for confirmation before reloading config from disk, as it may be expensive. First of all, /reload should require POST (also prevents XSS DoS attacks). Adding <l:confirmationLink> to encapsulate a link that requires confirmation upon clicking. Allowing a ManagementLink to request confirmation (also implying POST); could be used also for e.g. /quietDown. Enhancing <l:task> to support confirmation as well, and honoring this in context menu items.(cherry picked from commit 9eb69772a505890a9767375b7c2a78e278895ef9) Conflicts: changelog.html
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            test/src/test/java/hudson/model/ManagementLinkTest.java
            http://jenkins-ci.org/commit/jenkins/d7f7a4a7df01a7b3b57c27a095cc70496476a817
            Log:
            JENKINS-15340 Do not try to click on links with onclick attributes as these require confirmation.(cherry picked from commit e1f070bbef425fcbc9376eb99190a9b7bf3c4e5e)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: test/src/test/java/hudson/model/ManagementLinkTest.java http://jenkins-ci.org/commit/jenkins/d7f7a4a7df01a7b3b57c27a095cc70496476a817 Log: JENKINS-15340 Do not try to click on links with onclick attributes as these require confirmation.(cherry picked from commit e1f070bbef425fcbc9376eb99190a9b7bf3c4e5e)
            Hide
            deepchip Martin d'Anjou added a comment - - edited

            Asking "Are you sure" tells nothing to the user about the consequences. Instead, these kinds of confirmation boxes should tell the user what will happen and what to expect before asking the user if they are sure. Telling the use "it's expensive" is not informative either. Telling the user "you will lose all in-flight builds and all pending builds" is informative. I have "by accident" reloaded configuration from disk, and I would have liked to know the consequences (they were bad).

            Show
            deepchip Martin d'Anjou added a comment - - edited Asking "Are you sure" tells nothing to the user about the consequences. Instead, these kinds of confirmation boxes should tell the user what will happen and what to expect before asking the user if they are sure. Telling the use "it's expensive" is not informative either. Telling the user "you will lose all in-flight builds and all pending builds" is informative. I have "by accident" reloaded configuration from disk, and I would have liked to know the consequences (they were bad).
            Hide
            danielbeck Daniel Beck added a comment -

            Martin: Recent Jenkins versions (1.507+) are considered to no longer lose information on running builds when reloading, see JENKINS-3265. This warning (now) exists primarily to prevent accidental reloads that make the Jenkins UI unavailable for several minutes (especially with larger instances).

            I experienced some build data loss in combination with 'Cloudbees Restart Aborted Builds Plugin' (Jenkins Enterprise) but without that plugin, have repeatedly and successfully reloaded configuration from disk without losing in-progress build information.

            If you're on a recent Jenkins version and lost data, you should probably file a new issue and provide more information about your environment.

            Show
            danielbeck Daniel Beck added a comment - Martin: Recent Jenkins versions (1.507+) are considered to no longer lose information on running builds when reloading, see JENKINS-3265 . This warning (now) exists primarily to prevent accidental reloads that make the Jenkins UI unavailable for several minutes (especially with larger instances). I experienced some build data loss in combination with 'Cloudbees Restart Aborted Builds Plugin' (Jenkins Enterprise) but without that plugin, have repeatedly and successfully reloaded configuration from disk without losing in-progress build information. If you're on a recent Jenkins version and lost data, you should probably file a new issue and provide more information about your environment.

              People

              • Assignee:
                Unassigned
                Reporter:
                dblanchette Denis Blanchette
              • Votes:
                3 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: