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

nexus-platform plugin may break with form tables-to-divs changes

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The plugin contains tabular markup on some form elements and will probably present issues with the tables-to-divs changes in https://issues.jenkins-ci.org/browse/JENKINS-62437

      Some migration recipes can be found on https://www.jenkins.io/doc/developer/views/table-to-div-migration/

       

        Attachments

        1. 2021-06-11_11-10.png
          2021-06-11_11-10.png
          189 kB
        2. Selection_048.png
          Selection_048.png
          41 kB
        3. Selection_049.png
          Selection_049.png
          27 kB

          Activity

          Hide
          whyjustin Justin Young added a comment -

          Thanks Félix Queiruga Balado - copying this to our internal Jira. We will track there and update this ticket when addressed.

          Show
          whyjustin Justin Young added a comment - Thanks Félix Queiruga Balado - copying this to our internal Jira. We will track there and update this ticket when addressed.
          Hide
          ironcerocloudbees Ignacio Roncero Bazarra added a comment -

          Hi Folks,

           

          I've tested it using version 3.11.20210420-142258.bdfc332 and Jenkins is not able to save the configuration of this plugin (Manage Jenkins -> Configure System). It seems the items are not correctly included in the JSON object for the save action. Those items should be saved under `org.sonatype.nexus.ci.config.GlobalNexusConfiguration` and are saved under `nxrmConfigs` and `iqConfigs`

          Here, you can find an example that is failing:

          ```
          "httpVerifySSL":false,
          "nxrmConfigs":[

          { "internalId": "8f2cd70d-3234-4bd4-bd09-243830346400", "displayName": "DisplayName2", "id": "ServiceID2", "serverUrl": "http://localhost:8080", "includeUser": "false", "credentialsId": "", "stapler-class": "org.sonatype.nexus.ci.config.Nxrm2Configuration", "$class": "org.sonatype.nexus.ci.config.Nxrm2Configuration" }

          ,

          { "internalId": "f8c74e60-23e1-4b6b-b0c0-346a032ac7b3", "displayName": "DisplayName3", "id": "ServerID3", "serverUrl": "http://localhost:8080", "includeUser": "false", "credentialsId": "", "stapler-class": "org.sonatype.nexus.ci.config.Nxrm3Configuration", "$class": "org.sonatype.nexus.ci.config.Nxrm3Configuration" }

          ],
          "iqConfigs":

          { "serverUrl": "http://localhost:8080", "hideReports":false, "includeUser": "false", "credentialsId": "", "stapler-class": "org.sonatype.nexus.ci.config.NxiqConfiguration", "$class": "org.sonatype.nexus.ci.config.NxiqConfiguration" }

          ,
          "quietMode":false,
          ```

           

          And this is an example that is working:

           

          ```
          "org-sonatype-nexus-ci-config-GlobalNexusConfiguration":{
          "nxrmConfigs":[

          { "internalId":"a9f71cae-1a07-4d14-a426-a4df4b09970a","displayName":"DisplayName1","id":"ServerId1","serverUrl":"http://localhost:8080","includeUser":"false","credentialsId":"","stapler-class":"org.sonatype.nexus.ci.config.Nxrm2Configuration","$class":"org.sonatype.nexus.ci.config.Nxrm2Configuration" }

          ,

          { "internalId":"9772ba94-9eb6-4d6a-b8f7-6dd99b7739b4","displayName":"","id":"","serverUrl":"","includeUser":"false","credentialsId":"","stapler-class":"org.sonatype.nexus.ci.config.Nxrm3Configuration","$class":"org.sonatype.nexus.ci.config.Nxrm3Configuration" }

          ]
          }
          ```

           

          The cause of this problem is the following HTML code:

           

           

          This `div` tag with `org-sonatype-nexus-ci-config-GlobalNexusConfiguration` name should be covering the below `div` tag as you can see in the following image:

           

           

          I hope this information help with fixing the issue.

           

          Kind regards,

           

          Show
          ironcerocloudbees Ignacio Roncero Bazarra added a comment - Hi Folks,   I've tested it using version 3.11.20210420-142258.bdfc332 and Jenkins is not able to save the configuration of this plugin (Manage Jenkins -> Configure System). It seems the items are not correctly included in the JSON object for the save action. Those items should be saved under `org.sonatype.nexus.ci.config.GlobalNexusConfiguration` and are saved under `nxrmConfigs` and `iqConfigs` Here, you can find an example that is failing: ``` "httpVerifySSL":false, "nxrmConfigs":[ { "internalId": "8f2cd70d-3234-4bd4-bd09-243830346400", "displayName": "DisplayName2", "id": "ServiceID2", "serverUrl": "http://localhost:8080", "includeUser": "false", "credentialsId": "", "stapler-class": "org.sonatype.nexus.ci.config.Nxrm2Configuration", "$class": "org.sonatype.nexus.ci.config.Nxrm2Configuration" } , { "internalId": "f8c74e60-23e1-4b6b-b0c0-346a032ac7b3", "displayName": "DisplayName3", "id": "ServerID3", "serverUrl": "http://localhost:8080", "includeUser": "false", "credentialsId": "", "stapler-class": "org.sonatype.nexus.ci.config.Nxrm3Configuration", "$class": "org.sonatype.nexus.ci.config.Nxrm3Configuration" } ], "iqConfigs": { "serverUrl": "http://localhost:8080", "hideReports":false, "includeUser": "false", "credentialsId": "", "stapler-class": "org.sonatype.nexus.ci.config.NxiqConfiguration", "$class": "org.sonatype.nexus.ci.config.NxiqConfiguration" } , "quietMode":false, ```   And this is an example that is working:   ``` "org-sonatype-nexus-ci-config-GlobalNexusConfiguration":{ "nxrmConfigs":[ { "internalId":"a9f71cae-1a07-4d14-a426-a4df4b09970a","displayName":"DisplayName1","id":"ServerId1","serverUrl":"http://localhost:8080","includeUser":"false","credentialsId":"","stapler-class":"org.sonatype.nexus.ci.config.Nxrm2Configuration","$class":"org.sonatype.nexus.ci.config.Nxrm2Configuration" } , { "internalId":"9772ba94-9eb6-4d6a-b8f7-6dd99b7739b4","displayName":"","id":"","serverUrl":"","includeUser":"false","credentialsId":"","stapler-class":"org.sonatype.nexus.ci.config.Nxrm3Configuration","$class":"org.sonatype.nexus.ci.config.Nxrm3Configuration" } ] } ```   The cause of this problem is the following HTML code:     This `div` tag with `org-sonatype-nexus-ci-config-GlobalNexusConfiguration` name should be covering the below `div` tag as you can see in the following image:     I hope this information help with fixing the issue.   Kind regards,  
          Hide
          collinpeters_sonatype Collin added a comment -

          Ignacio Roncero Bazarra - I'm hoping you can provide a bit more guidance on this issue. I am unable to reproduce the problem in Jenkins 289 (current LTS) nor 297. I start up the war in a clean setup, install base plugins, install the nexus plugin, and am able to save config just fine.

          When I look at the source, I see the empty <div>, but I also see the same for all the core plugins (show below is GitHub and Global Libs)

          When I look at the dom (and our source), I do not see any '<table>', '<tr>', '<td>', etc... either.

          Regarding the JSON, I'm not to familiar with how the saving is done. When using web dev tools in Firefox I see the main Jenkins config page is saved with a form submission, and inside there I see a 'json' attribute (which doesn't look like pure json, but some kind of string escaped json), I do see that 'nxrmConfigs' and 'iqConfigs' are attributes under 'GlobalNexusConfiguration'.

          Any advice is appreciated.

          Show
          collinpeters_sonatype Collin added a comment - Ignacio Roncero Bazarra - I'm hoping you can provide a bit more guidance on this issue. I am unable to reproduce the problem in Jenkins 289 (current LTS) nor 297. I start up the war in a clean setup, install base plugins, install the nexus plugin, and am able to save config just fine. When I look at the source, I see the empty <div>, but I also see the same for all the core plugins (show below is GitHub and Global Libs) When I look at the dom (and our source), I do not see any '<table>', '<tr>', '<td>', etc... either. Regarding the JSON, I'm not to familiar with how the saving is done. When using web dev tools in Firefox I see the main Jenkins config page is saved with a form submission, and inside there I see a 'json' attribute (which doesn't look like pure json, but some kind of string escaped json), I do see that 'nxrmConfigs' and 'iqConfigs' are attributes under 'GlobalNexusConfiguration'. Any advice is appreciated.
          Hide
          ironcerocloudbees Ignacio Roncero Bazarra added a comment -

          Hi Collin,

          Thank you for your update.

          You are right, I'm unable to reproduce the problem in Jenkins 289 too. I just checked other versions and the results were the same (no issue saving the configuration):

          • Jenkins LTS 2.289.1 - Nexus Platform plugin version 3.11.20210621-093929.6318134.
          • Jenkins LTS 2.277.4 - Nexus Platform plugin version 3.11.20210621-093929.6318134.
          • Jenkins LTS 2.277.4 - Nexus Platform plugin version 3.11.20210420-142258.bdfc332.

          Although I was able to reproduce it in my previous message, I was not able to reproduce it this time. Recovering that old environment I found the same issue, however, it's pretty clear is related to a different plugin that is affecting here. 

          I believe we could go ahead and close this ticket (at least from my side) since we (you and me) are not able to reproduce the issue.

          Kind regards,

          Show
          ironcerocloudbees Ignacio Roncero Bazarra added a comment - Hi Collin, Thank you for your update. You are right, I'm unable to reproduce the problem in Jenkins 289 too. I just checked other versions and the results were the same (no issue saving the configuration): Jenkins LTS 2.289.1 - Nexus Platform plugin version 3.11.20210621-093929.6318134. Jenkins LTS 2.277.4 - Nexus Platform plugin version 3.11.20210621-093929.6318134. Jenkins LTS 2.277.4 - Nexus Platform plugin version 3.11.20210420-142258.bdfc332. Although I was able to reproduce it in my previous message, I was not able to reproduce it this time. Recovering that old environment I found the same issue, however, it's pretty clear is related to a different plugin that is affecting here.  I believe we could go ahead and close this ticket (at least from my side) since we (you and me) are not able to reproduce the issue. Kind regards,
          Hide
          collinpeters_sonatype Collin added a comment -

          Phew! Good to hear Ignacio Roncero Bazarra ! Agree that we can close this ticket.

          Show
          collinpeters_sonatype Collin added a comment - Phew! Good to hear Ignacio Roncero Bazarra ! Agree that we can close this ticket.

            People

            Assignee:
            whyjustin Justin Young
            Reporter:
            fqueiruga Félix Queiruga Balado
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated: