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

ATH does not restart instance when withPlugin() requires newer dependency than the bundled version

      Acceptance Test Harness does not restart when installing plugins requiring newer deps than installed plugins. So I get collisions since some plugins cannot load due to the missing deps

      https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fartifact-manager-s3-plugin/detail/PR-20/5... .

          [JENKINS-51306] ATH does not restart instance when withPlugin() requires newer dependency than the bundled version

          Raul Arabaolaza added a comment - - edited
          master50107|WARNING: Call to pin plugin has been ignored. Plugin name: apache-httpcomponents-client-4-api
          master50107|May 14, 2018 3:57:06 PM hudson.PluginManager dynamicLoad
          master50107|INFO: Attempting to dynamic load /mnt/agent-workspace/workspace/act-manager-s3-plugin_PR-20-UBEU36QRPCUL7VA4PQJRQWYU5NJSIGM3MZDPG2NDBVZY4X65OUXA/src/test/it/ath/testfirefox/target/jenkins6150668327098166345home/plugins/apache-httpcomponents-client-4-api.jpi

          Raul Arabaolaza added a comment - - edited master50107|WARNING: Call to pin plugin has been ignored. Plugin name: apache-httpcomponents-client-4-api master50107|May 14, 2018 3:57:06 PM hudson.PluginManager dynamicLoad master50107|INFO: Attempting to dynamic load /mnt/agent-workspace/workspace/act-manager-s3-plugin_PR-20-UBEU36QRPCUL7VA4PQJRQWYU5NJSIGM3MZDPG2NDBVZY4X65OUXA/src/test/it/ath/testfirefox/target/jenkins6150668327098166345home/plugins/apache-httpcomponents-client-4-api.jpi

          By taking a look at the video and by my local debugging I can confirm that the ATH does restart Jenkins, however, that restart seems to have no effect on the status of the plugin, this is quite strange. I am going to try to reproduce locally (without ATH) to see if is something related to the use of a custom update center or the war itself

          Raul Arabaolaza added a comment - By taking a look at the video and by my local debugging I can confirm that the ATH does restart Jenkins, however, that restart seems to have no effect on the status of the plugin, this is quite strange. I am going to try to reproduce locally (without ATH) to see if is something related to the use of a custom update center or the war itself

          I can confirm this is not an ATH failure, even when starting the war file by itself and trying to update the plugin manually (via UC) it does restart but is not updated... Trying to understand why

          Raul Arabaolaza added a comment - I can confirm this is not an ATH failure, even when starting the war file by itself and trying to update the plugin manually (via UC) it does restart but is not updated... Trying to understand why

          Oleg Nenashev added a comment -

          Likely the bundling functionality does not behave properly since changes around 2.0
          And now I remember that I was doing a patch for JENKINS-36441 (https://github.com/jenkinsci/jenkins/pull/2436/files), which is likely related to the behavior of the plugin manager

          Oleg Nenashev added a comment - Likely the bundling functionality does not behave properly since changes around 2.0 And now I remember that I was doing a patch for JENKINS-36441 ( https://github.com/jenkinsci/jenkins/pull/2436/files ), which is likely related to the behavior of the plugin manager

          Jesse Glick added a comment -

          This does not look like a bug to me—just an incorrect BOM.

          Jesse Glick added a comment - This does not look like a bug to me—just an incorrect BOM.

          Confirmed, with the following BOM all failures related to plugins not being installed are solved

          metadata:
            # labels and annotations are key: value string attributes
            labels:
              name: bom-it
              # Needed to make PCT happy
              groupId: org.jenkins-ci.main
              artifactId: jenkins-war
              version: 2.118-artifact-manager-s3-SNAPSHOT
          spec:
            core:
              version: 2.118
            plugins:
              - groupId: "org.jenkins-ci.plugins.workflow"
                artifactId: "workflow-api"
                version:  2.28-rc333.0675e9e9cb4c
              - groupId: "org.jenkins-ci.plugins"
                artifactId: "copyartifact"
                version: 1.40-rc298.60da56cfabea
              # Maven HPI Plugin improperly resolves dependency trees, needs upper bounds check
              - groupId: "org.jenkins-ci.plugins"
                artifactId: "structs"
                version: 1.14
              - groupId: "org.jenkins-ci.plugins.workflow"
                artifactId: "workflow-step-api"
                version: 2.14
              - groupId: "org.jenkins-ci.plugins.workflow"
                artifactId: "workflow-job"
                version: 2.21
              - groupId: "org.jenkins-ci.plugins.workflow"
                artifactId: "workflow-basic-steps"
                version: 2.7
              - groupId: "org.jenkins-ci.plugins.workflow"
                artifactId: "workflow-support"
                version: 2.18
              - groupId: "org.jenkins-ci.plugins"
                artifactId: "junit"
                version: 1.24
              - groupId: "org.jenkins-ci.plugins"
                artifactId: "mailer"
                version: 1.21
              - groupId: "org.jenkins-ci.plugins"
                artifactId: "scm-api"
                version: 2.2.7
              - groupId: "org.jenkins-ci.plugins"
                artifactId: "script-security"
                version: 1.44
              - groupId: "org.jenkins-ci.plugins"
                artifactId: "aws-java-sdk"
                version: 1.11.264
              - groupId: "org.jenkins-ci.plugins"
                artifactId: "apache-httpcomponents-client-4-api"
                version: 4.5.5-2.0
              - groupId: "org.jenkins-ci.plugins"
                artifactId: "matrix-project"
                version: 1.7.1
              - groupId: "org.jenkins-ci.plugins"
                artifactId: "jackson2-api"
                version: 2.8.11.2
              - groupId: "org.jenkins-ci.plugins"
                artifactId: "display-url-api"
                version: 2.2.0
            environments:
              - name: aws
                plugins:
                  #TODO: BOM does not support FileSystem REFs, so somebody needs to add BOM auto-update logic here
                  - groupId: "io.jenkins.plugins"
                    artifactId: "artifact-manager-s3"
                    version: 1.0-alpha-1-rc20.60688a35a736
          
          

          jglick Made a very interesting (and right IMO) statement in a conversation

          if the plugin is bundled by the CWP, then by definition you do _not_ want to update it
          

          That means if any transitive one is on the wrong version, you should add explicitly on the right one. As a corollary from that (which I can agree also) in the end we are (IMO) going to need a tool to update/generate the BOM file automatically or maintaining it is going to be so impractical that nobody is going to do that, again jglick has pointed to https://issues.jenkins-ci.org/browse/JENKINS-47498 for that

          Raul Arabaolaza added a comment - Confirmed, with the following BOM all failures related to plugins not being installed are solved metadata: # labels and annotations are key: value string attributes labels: name: bom-it # Needed to make PCT happy groupId: org.jenkins-ci.main artifactId: jenkins-war version: 2.118-artifact-manager-s3-SNAPSHOT spec: core: version: 2.118 plugins: - groupId: "org.jenkins-ci.plugins.workflow" artifactId: "workflow-api" version: 2.28-rc333.0675e9e9cb4c - groupId: "org.jenkins-ci.plugins" artifactId: "copyartifact" version: 1.40-rc298.60da56cfabea # Maven HPI Plugin improperly resolves dependency trees, needs upper bounds check - groupId: "org.jenkins-ci.plugins" artifactId: "structs" version: 1.14 - groupId: "org.jenkins-ci.plugins.workflow" artifactId: "workflow-step-api" version: 2.14 - groupId: "org.jenkins-ci.plugins.workflow" artifactId: "workflow-job" version: 2.21 - groupId: "org.jenkins-ci.plugins.workflow" artifactId: "workflow-basic-steps" version: 2.7 - groupId: "org.jenkins-ci.plugins.workflow" artifactId: "workflow-support" version: 2.18 - groupId: "org.jenkins-ci.plugins" artifactId: "junit" version: 1.24 - groupId: "org.jenkins-ci.plugins" artifactId: "mailer" version: 1.21 - groupId: "org.jenkins-ci.plugins" artifactId: "scm-api" version: 2.2.7 - groupId: "org.jenkins-ci.plugins" artifactId: "script-security" version: 1.44 - groupId: "org.jenkins-ci.plugins" artifactId: "aws-java-sdk" version: 1.11.264 - groupId: "org.jenkins-ci.plugins" artifactId: "apache-httpcomponents-client-4-api" version: 4.5.5-2.0 - groupId: "org.jenkins-ci.plugins" artifactId: "matrix-project" version: 1.7.1 - groupId: "org.jenkins-ci.plugins" artifactId: "jackson2-api" version: 2.8.11.2 - groupId: "org.jenkins-ci.plugins" artifactId: "display-url-api" version: 2.2.0 environments: - name: aws plugins: #TODO: BOM does not support FileSystem REFs, so somebody needs to add BOM auto-update logic here - groupId: "io.jenkins.plugins" artifactId: "artifact-manager-s3" version: 1.0-alpha-1-rc20.60688a35a736 jglick Made a very interesting (and right IMO) statement in a conversation if the plugin is bundled by the CWP, then by definition you do _not_ want to update it That means if any transitive one is on the wrong version, you should add explicitly on the right one. As a corollary from that (which I can agree also) in the end we are (IMO) going to need a tool to update/generate the BOM file automatically or maintaining it is going to be so impractical that nobody is going to do that, again jglick has pointed to https://issues.jenkins-ci.org/browse/JENKINS-47498 for that

          oleg_nenashev Closing this as it seems not related to the ATH itself

          Raul Arabaolaza added a comment - oleg_nenashev Closing this as it seems not related to the ATH itself

          The problem is not on the ATH itself, and the root cause needs discussion about the way to be solved

          Raul Arabaolaza added a comment - The problem is not on the ATH itself, and the root cause needs discussion about the way to be solved

            rarabaolaza Raul Arabaolaza
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: