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

Updating a WAR should unpin a plugin which is now older than the bundled plugin

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      If you have some pinned plugins, and start running a new WAR file with different set/versions of bundled plugins, the current behavior of Jenkins is to unconditionally trust your pinned plugins and never use the bundled versions. But this can be very bad, if you have pinned an old version of a plugin and some other bundled plugins depend on a newer version. So Jenkins should prefer a bundled plugin (removing the pin) if it is newer than the pinned version.

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            Just showing an admin monitor would be less surprising behavior.

            Show
            danielbeck Daniel Beck added a comment - Just showing an admin monitor would be less surprising behavior.
            Hide
            jglick Jesse Glick added a comment -

            Well, by the time an admin sees that, you are already either running a possibly fatal mismatch of versions, or have rejected the combination (JENKINS-21486) and so have disabled the dependent plugin. Better for Jenkins to try to fix the problem immediately, and perhaps issue a warning later about what it did, than to knowingly run a broken configuration.

            Show
            jglick Jesse Glick added a comment - Well, by the time an admin sees that, you are already either running a possibly fatal mismatch of versions, or have rejected the combination ( JENKINS-21486 ) and so have disabled the dependent plugin. Better for Jenkins to try to fix the problem immediately, and perhaps issue a warning later about what it did, than to knowingly run a broken configuration.
            Hide
            jglick Jesse Glick added a comment -

            The more conservative fix is to just add an administrative monitor when you are in this condition, advising you to upgrade.

            Show
            jglick Jesse Glick added a comment - The more conservative fix is to just add an administrative monitor when you are in this condition, advising you to upgrade.
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            The current behavior as it stands allows people to downgrade to an older version in case the version we bundle in the core creates undesirable regressions.

            Forcing the override will make this impossible.

            Implementing this as an AdministrativeMonitor.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - The current behavior as it stands allows people to downgrade to an older version in case the version we bundle in the core creates undesirable regressions. Forcing the override will make this impossible. Implementing this as an AdministrativeMonitor .
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            core/src/main/java/hudson/ClassicPluginStrategy.java
            core/src/main/java/hudson/PluginManager.java
            core/src/main/java/hudson/PluginWrapper.java
            core/src/main/java/jenkins/diagnostics/PinningIsBlockingBundledPluginMonitor.java
            core/src/main/resources/jenkins/diagnostics/PinningIsBlockingBundledPluginMonitor/message.jelly
            core/src/main/resources/jenkins/diagnostics/PinningIsBlockingBundledPluginMonitor/message.properties
            http://jenkins-ci.org/commit/jenkins/19f9b63d74693d4de6f6906e9896399d18b4107f
            Log:
            [FIXED JENKINS-24046]

            Warn users if the pinning is preventing Jenkins from overwriting older versions with bundled versions.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/ClassicPluginStrategy.java core/src/main/java/hudson/PluginManager.java core/src/main/java/hudson/PluginWrapper.java core/src/main/java/jenkins/diagnostics/PinningIsBlockingBundledPluginMonitor.java core/src/main/resources/jenkins/diagnostics/PinningIsBlockingBundledPluginMonitor/message.jelly core/src/main/resources/jenkins/diagnostics/PinningIsBlockingBundledPluginMonitor/message.properties http://jenkins-ci.org/commit/jenkins/19f9b63d74693d4de6f6906e9896399d18b4107f Log: [FIXED JENKINS-24046] Warn users if the pinning is preventing Jenkins from overwriting older versions with bundled versions.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3787
            [FIXED JENKINS-24046] (Revision 19f9b63d74693d4de6f6906e9896399d18b4107f)

            Result = SUCCESS
            kohsuke : 19f9b63d74693d4de6f6906e9896399d18b4107f
            Files :

            • core/src/main/java/hudson/ClassicPluginStrategy.java
            • core/src/main/resources/jenkins/diagnostics/PinningIsBlockingBundledPluginMonitor/message.properties
            • core/src/main/java/hudson/PluginWrapper.java
            • core/src/main/java/jenkins/diagnostics/PinningIsBlockingBundledPluginMonitor.java
            • core/src/main/java/hudson/PluginManager.java
            • core/src/main/resources/jenkins/diagnostics/PinningIsBlockingBundledPluginMonitor/message.jelly
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3787 [FIXED JENKINS-24046] (Revision 19f9b63d74693d4de6f6906e9896399d18b4107f) Result = SUCCESS kohsuke : 19f9b63d74693d4de6f6906e9896399d18b4107f Files : core/src/main/java/hudson/ClassicPluginStrategy.java core/src/main/resources/jenkins/diagnostics/PinningIsBlockingBundledPluginMonitor/message.properties core/src/main/java/hudson/PluginWrapper.java core/src/main/java/jenkins/diagnostics/PinningIsBlockingBundledPluginMonitor.java core/src/main/java/hudson/PluginManager.java core/src/main/resources/jenkins/diagnostics/PinningIsBlockingBundledPluginMonitor/message.jelly

              People

              • Assignee:
                kohsuke Kohsuke Kawaguchi
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: