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

Rundeck plugin apiVersion change does not persist

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      If you make any changes to within the manage config area the rundeck apiVersion gets reset to 9 each time. Also within the UI the apiVersion value does not show up after you leave and come back to the page.

        Attachments

          Activity

          Hide
          ahammar Anders Hammar added a comment -

          I believe the problem is even worse, the apiVersion doesn't seem to be used at all. At least not for the test connection. Still a problem in v3.4.

          Show
          ahammar Anders Hammar added a comment - I believe the problem is even worse, the apiVersion doesn't seem to be used at all. At least not for the test connection. Still a problem in v3.4.
          Hide
          ahammar Anders Hammar added a comment - - edited

          Digging into this I realize that the API version not being used in the test connection is a separate issue. Will open a separate ticket for that (JENKINS-28059).

          Show
          ahammar Anders Hammar added a comment - - edited Digging into this I realize that the API version not being used in the test connection is a separate issue. Will open a separate ticket for that ( JENKINS-28059 ).
          Hide
          ahammar Anders Hammar added a comment -

          I've looked into this and the reason for that the apiVersion doesn't show up in the general config page is that the shown value is retrieved from the existing RundeckClient class, which is not possible. Maybe it was possible earlier, I don't know.
          Looking into this I see that the problem migth even be bigger; the RundeckClient is currently created from the stored values through reflection calls. I don't know if that creates it correctly (sets the apiVersion etc). The correct way should be to create it via RundeckClientBuilder.
          I tried to figure out how to create an xstream converter to do this, but didn't really manage in the time frame I had available.

          One other thing I was thinking about is that with the current solution around apiVersion, if the field is left blank (default) it will in fact be persisted as the current API version of the Rundeck client lib used. So when upgrading the rundeck plugin, the apiVersion will not follow along but stay with theearlier version. Not what the help text for the apiVersion field says and what I think it should work. It should be possible to not specify an apiVersion and then always use the default version.

          Show
          ahammar Anders Hammar added a comment - I've looked into this and the reason for that the apiVersion doesn't show up in the general config page is that the shown value is retrieved from the existing RundeckClient class, which is not possible. Maybe it was possible earlier, I don't know. Looking into this I see that the problem migth even be bigger; the RundeckClient is currently created from the stored values through reflection calls. I don't know if that creates it correctly (sets the apiVersion etc). The correct way should be to create it via RundeckClientBuilder. I tried to figure out how to create an xstream converter to do this, but didn't really manage in the time frame I had available. One other thing I was thinking about is that with the current solution around apiVersion, if the field is left blank (default) it will in fact be persisted as the current API version of the Rundeck client lib used. So when upgrading the rundeck plugin, the apiVersion will not follow along but stay with theearlier version. Not what the help text for the apiVersion field says and what I think it should work. It should be possible to not specify an apiVersion and then always use the default version.

            People

            Assignee:
            vbehar Vincent Behar
            Reporter:
            lcasey Luiz Casey
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: