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

Artifactory plugin does not support having multiple instances of the build wrapper in Web UI

      When using the Artifactory plugin, the promoted-builds plugin, version 3.3, is not compatible. Having it installed results in being unable to configure artifactory plugin settings in job configurations. Specifically the target repository drop down field will not populate, even after a successful api call to retrieve the available repositories. Also, the upload URL field is duplicated on the screen.

       

      Downgrading promoted-builds plugin to version 3.2 resolved this problem.

       

      This happened with multiple recent artifactory plugin versions. Same behavior each time.

          [JENKINS-58195] Artifactory plugin does not support having multiple instances of the build wrapper in Web UI

          Oleg Nenashev added a comment -

          Please provide screenshots and system logs for the instance after the upgrade.

          Artifactory plugin is a huge monster, and I am not sure what particular setting is broken by the update

          Oleg Nenashev added a comment - Please provide screenshots and system logs for the instance after the upgrade. Artifactory plugin is a huge monster, and I am not sure what particular setting is broken by the update

          Chris Warren added a comment -

          Jenkins version is 2.176.1.

           

          With promoted-builds version 3.3 installed on the system, the configure page on any job using the Artifactory plugin looks like the attached, with duplicated upload and download url fields. The Different Value button does not work. When the Refresh Repositories button is clicked, we can see a successful api call to retrieve them, but the drop down to display the list of repos does not work. This happens for all tested version of the artifactory plugin, but we are currently using 3.3.0.

           

          The attached js exception screenshot occurred on load of the job configure page when the problematic configuration was active.

           

          The workaround on our setup is to downgrade promoted-builds 3.3 to version 3.2. Then it behaves as expected.

          Chris Warren added a comment - Jenkins version is 2.176.1.   With promoted-builds version 3.3 installed on the system, the configure page on any job using the Artifactory plugin looks like the attached, with duplicated upload and download url fields. The Different Value button does not work. When the Refresh Repositories button is clicked, we can see a successful api call to retrieve them, but the drop down to display the list of repos does not work. This happens for all tested version of the artifactory plugin, but we are currently using 3.3.0.   The attached js exception screenshot occurred on load of the job configure page when the problematic configuration was active.   The workaround on our setup is to downgrade promoted-builds 3.3 to version 3.2. Then it behaves as expected.

          Matt Wilson added a comment -

          I had the exact same issue, same other plugin versions as well.  Rolling back to 3.2 got me working again.

          Unfortunately I don't have any screen shots to show.  Going from memory, the configuration buttons where all messed up on the artifactory side of things.  The biggest problem was when using the generic artifactory feature.  Some input fields where displayed twice.  The select different value button was a fraction of its normal size.  No repositories could be listed..  It also seemed to flip my builds configuration from spec file to legacy mode.

          The gradle artifactory integration looked fairly normal, but all the functionality was broken.  i.e. you couldn't list repos or make any selections in the drop downs.

          sorry, for the jumbled info...

          Matt Wilson added a comment - I had the exact same issue, same other plugin versions as well.  Rolling back to 3.2 got me working again. Unfortunately I don't have any screen shots to show.  Going from memory, the configuration buttons where all messed up on the artifactory side of things.  The biggest problem was when using the generic artifactory feature.  Some input fields where displayed twice.  The select different value button was a fraction of its normal size.  No repositories could be listed..  It also seemed to flip my builds configuration from spec file to legacy mode. The gradle artifactory integration looked fairly normal, but all the functionality was broken.  i.e. you couldn't list repos or make any selections in the drop downs. sorry, for the jumbled info...

          I had a look at the artifactory plugin code. It seems the plugin assumes that all UI elements can only exist once in the DOM. Found lots of getElementById calls which would explain why everything looks messed up.

          The input fields being displayed twice is because it displays the inputs for generic as well as spec configuration, whereas normally only one of them would be shown and the other inputs would be hidden.

          Not sure what's the best way to proceed here.. oleg_nenashev What would you suggest? Is this something that should be handled/fixed in the promoted builds plugin? A possible fix/workaround would be to whitelist compatible wrappers - although to me it doesn't feel like the right solution as well..

           

          Patrick Schlebusch added a comment - I had a look at the artifactory plugin code. It seems the plugin assumes that all UI elements can only exist once in the DOM. Found lots of getElementById calls which would explain why everything looks messed up. The input fields being displayed twice is because it displays the inputs for generic as well as spec configuration, whereas normally only one of them would be shown and the other inputs would be hidden. Not sure what's the best way to proceed here.. oleg_nenashev What would you suggest? Is this something that should be handled/fixed in the promoted builds plugin? A possible fix/workaround would be to whitelist compatible wrappers - although to me it doesn't feel like the right solution as well..  

          Oleg Nenashev added a comment - - edited

          > I had a look at the artifactory plugin code. It seems the plugin assumes that all UI elements can only exist once in the DOM. Found lots of getElementById calls which would explain why everything looks messed up.

          Thanks for the investigation schlebu!

          W.r.t. the Artifactory plugin, this is not how Jenkins plugins should be designed. Not the first case for the Artifactory plugin, actually. It is not a responsibility of this plugin to fix bogus assumptions in other plugins. I will assign the issue to the Artifactory plugin maintainers so that can take a look. Although I have some ideas how to fix that, unfortunately I cannot contribute to the Artifactory plugin due to its Contributor License Agreement restrictions. Whomever is am Artifactory plugin user, please feel free to bring up this issue with jFrog support. 

          For Promoted Builds users, it should be less of a problem once the plugin supports Pipeline

          Oleg Nenashev added a comment - - edited > I had a look at the artifactory plugin code. It seems the plugin assumes that all UI elements can only exist once in the DOM. Found lots of getElementById calls which would explain why everything looks messed up. Thanks for the investigation schlebu ! W.r.t. the Artifactory plugin, this is not how Jenkins plugins should be designed. Not the first case for the Artifactory plugin, actually. It is not a responsibility of this plugin to fix bogus assumptions in other plugins. I will assign the issue to the Artifactory plugin maintainers so that can take a look. Although I have some ideas how to fix that, unfortunately I cannot contribute to the Artifactory plugin due to its Contributor License Agreement restrictions. Whomever is am Artifactory plugin user, please feel free to bring up this issue with jFrog support.  For Promoted Builds users, it should be less of a problem once the plugin supports Pipeline

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - Related issue on the JFrog's side:  https://github.com/jfrog/jenkins-artifactory-plugin/issues/166

            eyalbe Eyal Ben Moshe
            chris_warren Chris Warren
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: