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

Lost all saved managed files after upgrade to 3.0

      Upgraded Jenkins from 2.140 to 2.141 and in the same time config-file-provider-plugin from 2.18 to 3.0 

      After Jenkins restart, all configured files were gone.

      Jenkins shows warning about unreadable data:

      The first one is generic:

      org.jenkinsci.plugins.configfiles.GlobalConfigFiles Managed files ConversionException: org.jenkinsci.plugins.configfiles.GlobalConfigFiles$1 : org.jenkinsci.plugins.configfiles.GlobalConfigFiles$1 ---- Debugging information ---- message : org.jenkinsci.plugins.configfiles.GlobalConfigFiles$1 cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException cause-message : org.jenkinsci.plugins.configfiles.GlobalConfigFiles$1 class : java.util.TreeSet required-type : java.util.TreeSet converter-type : com.thoughtworks.xstream.converters.collections.TreeSetConverter path : /org.jenkinsci.plugins.configfiles.GlobalConfigFiles/configs/comparator line number : 4 -------------------------------, MissingFieldException: No field 'org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig' found in class 'org.jenkinsci.plugins.configfiles.GlobalConfigFiles', MissingFieldException: No field 'org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig' found in class 'org.jenkinsci.plugins.configfiles.GlobalConfigFiles', MissingFieldException: No field 'org.jenkinsci.plugins.configfiles.maven.MavenToolchainsConfig' found in class 'org.jenkinsci.plugins.configfiles.GlobalConfigFiles', MissingFieldException: No field 'org.jenkinsci.plugins.configfiles.maven.MavenToolchainsConfig' found in class 'org.jenkinsci.plugins.configfiles.GlobalConfigFiles'

       

      The second one is specific to one Jenkins Job folder, where there should be no such configuration at all.

      com.cloudbees.hudson.plugins.folder.Folder releng+target ConversionException: org.jenkinsci.plugins.configfiles.folder.FolderConfigFileProperty$1 : org.jenkinsci.plugins.configfiles.folder.FolderConfigFileProperty$1 ---- Debugging information ---- message : org.jenkinsci.plugins.configfiles.folder.FolderConfigFileProperty$1 cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException cause-message : org.jenkinsci.plugins.configfiles.folder.FolderConfigFileProperty$1 class : java.util.TreeSet required-type : java.util.TreeSet converter-type : com.thoughtworks.xstream.converters.collections.TreeSetConverter path : /com.cloudbees.hudson.plugins.folder.Folder/properties/org.jenkinsci.plugins.configfiles.folder.FolderConfigFileProperty/configs/comparator line number : 13 -------------------------------, ConversionException: Could not call org.jenkinsci.plugins.configfiles.folder.FolderConfigFileProperty.readResolve() : null : Could not call org.jenkinsci.plugins.configfiles.folder.FolderConfigFileProperty.readResolve() : null ---- Debugging information ---- message : Could not call org.jenkinsci.plugins.configfiles.folder.FolderConfigFileProperty.readResolve() : null cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException cause-message : Could not call org.jenkinsci.plugins.configfiles.folder.FolderConfigFileProperty.readResolve() : null class : org.jenkinsci.plugins.configfiles.folder.FolderConfigFileProperty required-type : java.util.TreeSet converter-type : hudson.util.RobustReflectionConverter path : /com.cloudbees.hudson.plugins.folder.Folder/properties/org.jenkinsci.plugins.configfiles.folder.FolderConfigFileProperty/configs line number : 14 -------------------------------

       

      Now I don't know if this version is expected to break all stored provided files (the version number change could suggest it). If it is, then there should be a strong warning at the Jenkins plugin page stating that it is incompatible with the old version.

      Otherwise, please fix the problem  Thanks.

          [JENKINS-53399] Lost all saved managed files after upgrade to 3.0

          Jens Beyer created issue -

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - Yes, pom.xml refers 2.15 in compatibleSince: https://github.com/jenkinsci/config-file-provider-plugin/blob/master/pom.xml#L275 . CC domi srempfer

          Jens Beyer added a comment -

          Just for completeness' sake: After downgrading the plugin back to 2.18, the configured managed files are back.

          Jens Beyer added a comment - Just for completeness' sake: After downgrading the plugin back to 2.18, the configured managed files are back.
          Oleg Nenashev made changes -
          Labels New: regression

          I confirm Beyer's note

          Maurizio Nagni added a comment - I confirm Beyer's note

          Hi, I downgraded the plugin to 2.18, but the error remains. 

          Additionally Jenkins complains about not readable data now. 

          Patrick Wolfart added a comment - Hi, I downgraded the plugin to 2.18, but the error remains.  Additionally Jenkins complains about not readable data now. 

          If you used the "Manage Old Data" functionality and removed the unreadable configuration downgrading is useless. So I kept the latest version and I recreated the configuration using the interface and the data I found in a backup in the org.jenkinsci.plugins.configfiles.GlobalConfigFiles.xml file. Than I had to reselect by hand the new configuration name for each job!

          Moreover I found that NPM configuration's id field is read only. I don't know if it's related to this release, but I surely set it by hand the first time I created the NPM configuration.

          Giacomo Boccardo added a comment - If you used the "Manage Old Data" functionality and removed the unreadable configuration downgrading is useless. So I kept the latest version and I recreated the configuration using the interface and the data I found in a backup in the  org.jenkinsci.plugins.configfiles.GlobalConfigFiles.xml file. Than I had to reselect by hand the new configuration name for each job! Moreover I found that NPM configuration's id field is read only. I don't know if it's related to this release, but I surely set it by hand the first time I created the NPM configuration.

          Tomi Pakarinen added a comment - - edited

          I got old configuration to load by changing comparator class

          <comparator class="org.jenkinsci.plugins.configfiles.GlobalConfigFiles$1"/>

          to

          <comparator class="org.jenkinsci.plugins.configfiles.ConfigComparator"/>

           and per project config

          <comparator class="org.jenkinsci.plugins.configfiles.folder.FolderConfigFileProperty$1"/>

           to

          <comparator class="org.jenkinsci.plugins.configfiles.ConfigComparator"/>

           

          Tomi Pakarinen added a comment - - edited I got old configuration to load by changing comparator class <comparator class="org.jenkinsci.plugins.configfiles.GlobalConfigFiles$1"/> to <comparator class="org.jenkinsci.plugins.configfiles.ConfigComparator"/>  and per project config <comparator class="org.jenkinsci.plugins.configfiles.folder.FolderConfigFileProperty$1"/>  to <comparator class="org.jenkinsci.plugins.configfiles.ConfigComparator"/>  

          oeuftete added a comment -

          I can open a new issue, but assuming the same root cause is responsible for the Organization Folder plugin not being able to load its config either.  A downgrade of the Config File Provider plugin back to 2.18 was a successful workaround.

           

          2018-09-04T12:56:53.932168699Z SEVERE: Failed Loading item MyOrg
          2018-09-04T12:56:53.932184399Z java.lang.NullPointerException
          2018-09-04T12:56:53.932195699Z  at jenkins.branch.OrganizationFolder.onLoad(OrganizationFolder.java:199)
          2018-09-04T12:56:53.932207199Z  at hudson.model.Items.load(Items.java:372)
          2018-09-04T12:56:53.932218199Z  at jenkins.model.Jenkins$15.run(Jenkins.java:3125)
          2018-09-04T12:56:53.932229399Z  at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
          2018-09-04T12:56:53.932240499Z  at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
          2018-09-04T12:56:53.932251499Z  at jenkins.model.Jenkins$5.runTask(Jenkins.java:1068)
          2018-09-04T12:56:53.932262499Z  at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
          2018-09-04T12:56:53.932273499Z  at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
          2018-09-04T12:56:53.932284499Z  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          2018-09-04T12:56:53.932295599Z  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          2018-09-04T12:56:53.932306799Z  at java.lang.Thread.run(Thread.java:748)
          

          oeuftete added a comment - I can open a new issue, but assuming the same root cause is responsible for the Organization Folder plugin not being able to load its config either.  A downgrade of the Config File Provider plugin back to 2.18 was a successful workaround.   2018-09-04T12:56:53.932168699Z SEVERE: Failed Loading item MyOrg 2018-09-04T12:56:53.932184399Z java.lang.NullPointerException 2018-09-04T12:56:53.932195699Z at jenkins.branch.OrganizationFolder.onLoad(OrganizationFolder.java:199) 2018-09-04T12:56:53.932207199Z at hudson.model.Items.load(Items.java:372) 2018-09-04T12:56:53.932218199Z at jenkins.model.Jenkins$15.run(Jenkins.java:3125) 2018-09-04T12:56:53.932229399Z at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169) 2018-09-04T12:56:53.932240499Z at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296) 2018-09-04T12:56:53.932251499Z at jenkins.model.Jenkins$5.runTask(Jenkins.java:1068) 2018-09-04T12:56:53.932262499Z at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214) 2018-09-04T12:56:53.932273499Z at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) 2018-09-04T12:56:53.932284499Z at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 2018-09-04T12:56:53.932295599Z at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 2018-09-04T12:56:53.932306799Z at java.lang.Thread.run(Thread.java:748)

          Same for me. On Jenkins 2.121.3 after upgrading the config-file-provider-plugin from 2.18 to 3.0 folders' configurations are lost. Downgrade to 2.18 solves the problem.

          Dmitry Mikhirev added a comment - Same for me. On Jenkins 2.121.3 after upgrading the config-file-provider-plugin from 2.18 to 3.0 folders' configurations are lost. Downgrade to 2.18 solves the problem.

            domi Dominik Bartholdi
            beyerj Jens Beyer
            Votes:
            8 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated:
              Resolved: