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

Builds forgotten after containing folder renamed

    XMLWordPrintable

Details

    Description

      1.509.2 plus cloudbees-folder: if a folder is renamed while a job in it has some builds loaded, and the RunMap is purged e.g. by garbage collection, the builds disappear. Reloading configuration or restarting Jenkins restores the build records, though not all permalinks (until new builds are run).

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick created issue -
            jglick Jesse Glick added a comment -

            Seems like the same problem could arise without folders, by editing Jenkins.buildsDir, though this would presumably be rare.

            The most obvious solution would be to deprecate AbstractLazyLoadRunMap.<init>(File) as well as related methods/constructors, and replace it with a () -> File callback. Not sure if there would be a significant performance impact of recalculating getBuildDir() whenever dir is currently used.

            Alternately, have each AbstractProject listen for renames of its parent ItemGroup as well as changes in buildsDir, and rerun createBuildRunMap when that happens. Less expensive in the normal case, more expensive when a rename does occur.

            jglick Jesse Glick added a comment - Seems like the same problem could arise without folders, by editing Jenkins.buildsDir , though this would presumably be rare. The most obvious solution would be to deprecate AbstractLazyLoadRunMap.<init>(File) as well as related methods/constructors, and replace it with a () -> File callback. Not sure if there would be a significant performance impact of recalculating getBuildDir() whenever dir is currently used. Alternately, have each AbstractProject listen for renames of its parent ItemGroup as well as changes in buildsDir , and rerun createBuildRunMap when that happens. Less expensive in the normal case, more expensive when a rename does occur.
            danielbeck Daniel Beck made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-19650 [ JENKINS-19650 ]
            danielbeck Daniel Beck made changes -
            Link This issue is related to JENKINS-18678 [ JENKINS-18678 ]
            danielbeck Daniel Beck made changes -
            Component/s cloudbees-folder [ 18137 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-19650 [ JENKINS-19650 ]
            jglick Jesse Glick made changes -
            Component/s cloudbees-folder [ 18137 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick added a comment -

            Not an lts-candidate since fix requires APIs not expected to be backported to the current LTS line.

            jglick Jesse Glick added a comment - Not an lts-candidate since fix requires APIs not expected to be backported to the current LTS line.
            jglick Jesse Glick made changes -
            Labels folders lazy-loading lts-candidate folders lazy-loading

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            core/src/main/java/hudson/model/AbstractProject.java
            test/src/test/groovy/hudson/model/AbstractProjectTest.groovy
            http://jenkins-ci.org/commit/jenkins/cb623640ccd820ad0540efc3b50cc596626e43a2
            Log:
            [FIXED JENKINS-18694] Generalizing fix of JENKINS-18678 to include also rename of parent folders, taking advantage of JENKINS-18028 API.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/model/AbstractProject.java test/src/test/groovy/hudson/model/AbstractProjectTest.groovy http://jenkins-ci.org/commit/jenkins/cb623640ccd820ad0540efc3b50cc596626e43a2 Log: [FIXED JENKINS-18694] Generalizing fix of JENKINS-18678 to include also rename of parent folders, taking advantage of JENKINS-18028 API.
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3160
            [FIXED JENKINS-18694] Generalizing fix of JENKINS-18678 to include also rename of parent folders, taking advantage of JENKINS-18028 API. (Revision cb623640ccd820ad0540efc3b50cc596626e43a2)

            Result = SUCCESS
            Jesse Glick : cb623640ccd820ad0540efc3b50cc596626e43a2
            Files :

            • test/src/test/groovy/hudson/model/AbstractProjectTest.groovy
            • core/src/main/java/hudson/model/AbstractProject.java
            • changelog.html
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3160 [FIXED JENKINS-18694] Generalizing fix of JENKINS-18678 to include also rename of parent folders, taking advantage of JENKINS-18028 API. (Revision cb623640ccd820ad0540efc3b50cc596626e43a2) Result = SUCCESS Jesse Glick : cb623640ccd820ad0540efc3b50cc596626e43a2 Files : test/src/test/groovy/hudson/model/AbstractProjectTest.groovy core/src/main/java/hudson/model/AbstractProject.java changelog.html
            jglick Jesse Glick made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 150042 ] JNJira + In-Review [ 193399 ]

            People

              jglick Jesse Glick
              jglick Jesse Glick
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: