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

Optional dependencies of bundled and detached plugins are not upgraded if an outdated version is installed

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None

      It appears that optional dependencies are never upgraded when loading detached and bundled plugins, even if the installed version is older than a version requested by one of the bundled plugins. Discovered by danielbeck while investigating JENKINS-48604, see https://github.com/jenkinsci/jenkins/pull/3201#discussion_r157554680 for the initial comment, and commit eb77e5f for an untested fix.

      I don't have an actual example of this in the wild, but here is the idea of how to reproduce:

      1. Assume a plugin artifactA with two releases: 1.0 and 2.0
      2. Assume a plugin artifactB, with a single release 1.0, which has an optional dependency on artifactA:2.0
      3. Create a fresh Jenkins installation and install a plugin artifactA:1.0.
      4. Upgrade Jenkins using a jenkins.war which has artifactB:1.0 bundled in /WEB-INF/plugins.
      5. Expected Result: artifactA should be automatically updated to 2.0.
      6. Actual Result: artifactA is still 1.0.

          [JENKINS-48614] Optional dependencies of bundled and detached plugins are not upgraded if an outdated version is installed

          Devin Nusbaum created issue -
          Devin Nusbaum made changes -
          Link New: This issue relates to JENKINS-48604 [ JENKINS-48604 ]
          Devin Nusbaum made changes -
          Description Original: Discovered by [~danielbeck] while investigating JENKINS-48604, see https://github.com/jenkinsci/jenkins/pull/3201#discussion_r157554680 for the initial comment, and [commit eb77e5f|https://github.com/jenkinsci/jenkins/commit/eb77e5f20d150c272755435201120dfd8317e180] for the

          I don't have an actual example of this in the wild, but here is the idea of how to reproduce:

          # Assume a plugin {{artifactA}} with two releases: 1.0 and 2.0
          # Assume a plugin {{artifactB}}, with a single release 1.0, which has an optional dependency on {{artifactA:2.0}}
          # Create a fresh Jenkins installation and install a plugin {{artifactA:1.0}}.
          # Upgrade Jenkins using a {{jenkins.war}} which has {{artifactB:1.0}} bundled in {{/WEB-INF/plugins}}.
          # Expected Result: {{artifactA}} should be automatically updated to 2.0.
          # Actual Result: {{artifactA}} is still 1.0.
          New: Discovered by [~danielbeck] while investigating JENKINS-48604, see [https://github.com/jenkinsci/jenkins/pull/3201#discussion_r157554680] for the initial comment, and [commit eb77e5f|https://github.com/jenkinsci/jenkins/commit/eb77e5f20d150c272755435201120dfd8317e180] for an untested fix.

          I don't have an actual example of this in the wild, but here is the idea of how to reproduce:
           # Assume a plugin {{artifactA}} with two releases: 1.0 and 2.0
           # Assume a plugin {{artifactB}}, with a single release 1.0, which has an optional dependency on {{artifactA:2.0}}
           # Create a fresh Jenkins installation and install a plugin {{artifactA:1.0}}.
           # Upgrade Jenkins using a {{jenkins.war}} which has {{artifactB:1.0}} bundled in {{/WEB-INF/plugins}}.
           # Expected Result: {{artifactA}} should be automatically updated to 2.0.
           # Actual Result: {{artifactA}} is still 1.0.
          Devin Nusbaum made changes -
          Link New: This issue relates to JENKINS-48615 [ JENKINS-48615 ]
          Devin Nusbaum made changes -
          Description Original: Discovered by [~danielbeck] while investigating JENKINS-48604, see [https://github.com/jenkinsci/jenkins/pull/3201#discussion_r157554680] for the initial comment, and [commit eb77e5f|https://github.com/jenkinsci/jenkins/commit/eb77e5f20d150c272755435201120dfd8317e180] for an untested fix.

          I don't have an actual example of this in the wild, but here is the idea of how to reproduce:
           # Assume a plugin {{artifactA}} with two releases: 1.0 and 2.0
           # Assume a plugin {{artifactB}}, with a single release 1.0, which has an optional dependency on {{artifactA:2.0}}
           # Create a fresh Jenkins installation and install a plugin {{artifactA:1.0}}.
           # Upgrade Jenkins using a {{jenkins.war}} which has {{artifactB:1.0}} bundled in {{/WEB-INF/plugins}}.
           # Expected Result: {{artifactA}} should be automatically updated to 2.0.
           # Actual Result: {{artifactA}} is still 1.0.
          New: It appears that optional dependencies are never upgraded when loading detached and bundled plugins, even if the installed version is older than a version requested by one of the bundled plugins. Discovered by [~danielbeck] while investigating JENKINS-48604, see [https://github.com/jenkinsci/jenkins/pull/3201#discussion_r157554680] for the initial comment, and [commit eb77e5f|https://github.com/jenkinsci/jenkins/commit/eb77e5f20d150c272755435201120dfd8317e180] for an untested fix.

          I don't have an actual example of this in the wild, but here is the idea of how to reproduce:
           # Assume a plugin {{artifactA}} with two releases: 1.0 and 2.0
           # Assume a plugin {{artifactB}}, with a single release 1.0, which has an optional dependency on {{artifactA:2.0}}
           # Create a fresh Jenkins installation and install a plugin {{artifactA:1.0}}.
           # Upgrade Jenkins using a {{jenkins.war}} which has {{artifactB:1.0}} bundled in {{/WEB-INF/plugins}}.
           # Expected Result: {{artifactA}} should be automatically updated to 2.0.
           # Actual Result: {{artifactA}} is still 1.0.
          Devin Nusbaum made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Devin Nusbaum made changes -
          Remote Link New: This issue links to "PR 3202 (Web Link)" [ 19502 ]
          Devin Nusbaum made changes -
          Status Original: In Progress [ 3 ] New: Open [ 1 ]

            dnusbaum Devin Nusbaum
            dnusbaum Devin Nusbaum
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: