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

Builds forgotten after containing folder renamed

      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).

          [JENKINS-18694] Builds forgotten after containing folder renamed

          Jesse Glick created issue -

          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.

          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.
          Daniel Beck made changes -
          Link New: This issue is related to JENKINS-19650 [ JENKINS-19650 ]
          Daniel Beck made changes -
          Link New: This issue is related to JENKINS-18678 [ JENKINS-18678 ]
          Daniel Beck made changes -
          Component/s New: cloudbees-folder [ 18137 ]
          Jesse Glick made changes -
          Link Original: This issue is related to JENKINS-19650 [ JENKINS-19650 ]
          Jesse Glick made changes -
          Component/s Original: cloudbees-folder [ 18137 ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Jesse Glick added a comment -

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

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

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

              Created:
              Updated:
              Resolved: