• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • None

      I just upgraded from Jenkins 1.502 to 1.503. "Discard old builds" has been broken.

      When I go to the "Manage Jenkins" page, I see "You have data stored in an older format and/or unreadable data.", and clicking on "Manage" shows "InstantiationError: jenkins.model.BuildDiscarder" for most of my jobs. All my jobs that previously had "discard old builds" specified don’t have it ticked any more.

      I presume this is related to this changelog entry: "Discard old build records" behavior is now pluggable, allowing plugins to define custom logic.

      If I edit a job and tick "Discard Old Builds", previous values are not there, and there's some spurious text on the page "//x", presumably something that was intended to be removed when this was released.

          [JENKINS-16979] "Discard old builds" broken in 1.503

          Matthew Webber created issue -

          kutzi added a comment -

          kutzi added a comment - See commit https://github.com/jenkinsci/jenkins/commit/f3a2ae31d50d6be6f053a4083b66f3f955fa6248

          Adam Sloan added a comment -

          Was this change coordinated with the Configuration Slicer?
          It has Discard Old Builds Slicer, Discard Old Builds Slicer, Discard Old Builds Slicer, Discard Old Builds Slicer which I take it are now obsolete... and would be nice if the Configuration Slicer could accommodate the new way.

          Adam Sloan added a comment - Was this change coordinated with the Configuration Slicer? It has Discard Old Builds Slicer, Discard Old Builds Slicer, Discard Old Builds Slicer, Discard Old Builds Slicer which I take it are now obsolete... and would be nice if the Configuration Slicer could accommodate the new way.

          Alex Lehmann added a comment -

          I noticed the same problem, I assume the old configuration class doesn't migrate the settings to the new one leaving the settings empty.

          Alex Lehmann added a comment - I noticed the same problem, I assume the old configuration class doesn't migrate the settings to the new one leaving the settings empty.

          Adam Sloan added a comment -

          and now I have 250+ build configurations to fix

          Adam Sloan added a comment - and now I have 250+ build configurations to fix

          >> and now I have 250+ build configurations to fix
          If you roll back to 1.502 then all your configurations will be as previosuly, assuming that you didn't "discard old data".

          Matthew Webber added a comment - >> and now I have 250+ build configurations to fix If you roll back to 1.502 then all your configurations will be as previosuly, assuming that you didn't "discard old data".

          Steve Haworth added a comment -

          I believe introduction of this commit results in a number of issues with configuration slicer the ability to set discard old builds and the plugin also creates a build failure error below

          12:40:55 ERROR: Publisher org.jenkinsci.plugins.discardbuild.DiscardBuildPublisher aborted due to exception
          12:40:55 java.lang.UnsupportedOperationException
          12:40:55 at java.util.AbstractList.add(Unknown Source)
          12:40:55 at java.util.AbstractList.add(Unknown Source)
          12:40:55 at org.jenkinsci.plugins.discardbuild.DiscardBuildPublisher.perform(DiscardBuildPublisher.java:148)
          12:40:55 at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
          12:40:55 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:814)
          12:40:55 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:786)
          12:40:55 at hudson.model.Build$BuildExecution.post2(Build.java:183)
          12:40:55 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:733)
          12:40:55 at hudson.model.Run.execute(Run.java:1592)
          12:40:55 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          12:40:55 at hudson.model.ResourceController.execute(ResourceController.java:88)
          12:40:55 at hudson.model.Executor.run(Executor.java:237)

          Makes this version of Jenkins unusable for me, issue needs fixing or capability removing until fixed.

          Steve Haworth added a comment - I believe introduction of this commit results in a number of issues with configuration slicer the ability to set discard old builds and the plugin also creates a build failure error below 12:40:55 ERROR: Publisher org.jenkinsci.plugins.discardbuild.DiscardBuildPublisher aborted due to exception 12:40:55 java.lang.UnsupportedOperationException 12:40:55 at java.util.AbstractList.add(Unknown Source) 12:40:55 at java.util.AbstractList.add(Unknown Source) 12:40:55 at org.jenkinsci.plugins.discardbuild.DiscardBuildPublisher.perform(DiscardBuildPublisher.java:148) 12:40:55 at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) 12:40:55 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:814) 12:40:55 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:786) 12:40:55 at hudson.model.Build$BuildExecution.post2(Build.java:183) 12:40:55 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:733) 12:40:55 at hudson.model.Run.execute(Run.java:1592) 12:40:55 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 12:40:55 at hudson.model.ResourceController.execute(ResourceController.java:88) 12:40:55 at hudson.model.Executor.run(Executor.java:237) Makes this version of Jenkins unusable for me, issue needs fixing or capability removing until fixed.
          Kohsuke Kawaguchi made changes -
          Assignee New: Kohsuke Kawaguchi [ kohsuke ]

          Oh boy, what have I done.

          Kohsuke Kawaguchi added a comment - Oh boy, what have I done.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/jenkins/model/BuildDiscarder.java
          test/src/test/groovy/jenkins/model/BuildDiscarderTest.groovy
          test/src/test/resources/jenkins/model/BuildDiscarderTest/testCompatibility/config.xml
          test/src/test/resources/jenkins/model/BuildDiscarderTest/testCompatibility/jobs/foo/config.xml
          http://jenkins-ci.org/commit/jenkins/a33e147a0d8b48d9da17d8dee6a9debbceab8323
          Log:
          [FIXED JENKINS-16979]

          Added backward compatible data loader and a corresponding test case.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/jenkins/model/BuildDiscarder.java test/src/test/groovy/jenkins/model/BuildDiscarderTest.groovy test/src/test/resources/jenkins/model/BuildDiscarderTest/testCompatibility/config.xml test/src/test/resources/jenkins/model/BuildDiscarderTest/testCompatibility/jobs/foo/config.xml http://jenkins-ci.org/commit/jenkins/a33e147a0d8b48d9da17d8dee6a9debbceab8323 Log: [FIXED JENKINS-16979] Added backward compatible data loader and a corresponding test case.

            kohsuke Kohsuke Kawaguchi
            mwebber Matthew Webber
            Votes:
            12 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved: