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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None

      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.

          [JENKINS-24046] Updating a WAR should unpin a plugin which is now older than the bundled plugin

          Daniel Beck added a comment -

          Just showing an admin monitor would be less surprising behavior.

          Daniel Beck added a comment - Just showing an admin monitor would be less surprising behavior.

          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.

          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.

          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.

          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.

          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.

          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 .

          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.

          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.

          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

          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

            kohsuke Kohsuke Kawaguchi
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: