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

Deleting/renaming jobs using external builds directory does not move builds

    XMLWordPrintable

Details

    Description

      If you set the external builds directory for Jenkins to e.g. /tmp/builds/${ITEM_FULL_NAME} and build some job, then rename it, the existing build records will remain in /tmp/builds/oldname/* and be inaccessible. Similarly, if you delete the job, the build records will be left behind, potentially consuming a great deal of disk space.

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-16457 [ JENKINS-16457 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-17137 [ JENKINS-17137 ]
            jglick Jesse Glick added a comment -

            JENKINS-17137 is a related problem with a different cause. The fix of JENKINS-16457 helps identify the problem loading the old build records in case of a rename.

            jglick Jesse Glick added a comment - JENKINS-17137 is a related problem with a different cause. The fix of JENKINS-16457 helps identify the problem loading the old build records in case of a rename.
            jglick Jesse Glick added a comment -

            Job.renameTo needs to take getBuildDir into account.

            Also the workspace on master should be moved if it exists.

            jglick Jesse Glick added a comment - Job.renameTo needs to take getBuildDir into account. Also the workspace on master should be moved if it exists.
            jglick Jesse Glick made changes -
            Link This issue is blocking JENKINS-8446 [ JENKINS-8446 ]
            jglick Jesse Glick added a comment -

            Ideally the workspace would be moved, but this is problematic since the workspace path is encoded in the build record. So for now leaving workspaces alone; they are intended to be disposable anyway (so it is not a problem to periodically wipe out the whole external workspace dir).

            jglick Jesse Glick added a comment - Ideally the workspace would be moved, but this is problematic since the workspace path is encoded in the build record. So for now leaving workspaces alone; they are intended to be disposable anyway (so it is not a problem to periodically wipe out the whole external workspace dir).

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            core/src/main/java/hudson/model/Job.java
            test/src/test/java/hudson/model/AbstractProjectTest.java
            http://jenkins-ci.org/commit/jenkins/d98716dfbad96f566938b90a5a8b50ce9765575b
            Log:
            [FIXED JENKINS-17138] Deleting/renaming jobs using external builds directory does not move builds.


            You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
            For more options, visit https://groups.google.com/groups/opt_out.

            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/Job.java test/src/test/java/hudson/model/AbstractProjectTest.java http://jenkins-ci.org/commit/jenkins/d98716dfbad96f566938b90a5a8b50ce9765575b Log: [FIXED JENKINS-17138] Deleting/renaming jobs using external builds directory does not move builds. – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2358
            [FIXED JENKINS-17138] Deleting/renaming jobs using external builds directory does not move builds. (Revision d98716dfbad96f566938b90a5a8b50ce9765575b)

            Result = SUCCESS
            Jesse Glick : d98716dfbad96f566938b90a5a8b50ce9765575b
            Files :

            • changelog.html
            • test/src/test/java/hudson/model/AbstractProjectTest.java
            • core/src/main/java/hudson/model/Job.java
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2358 [FIXED JENKINS-17138] Deleting/renaming jobs using external builds directory does not move builds. (Revision d98716dfbad96f566938b90a5a8b50ce9765575b) Result = SUCCESS Jesse Glick : d98716dfbad96f566938b90a5a8b50ce9765575b Files : changelog.html test/src/test/java/hudson/model/AbstractProjectTest.java core/src/main/java/hudson/model/Job.java
            jglick Jesse Glick made changes -
            Labels lts-candidate
            vjuranek vjuranek made changes -
            Labels lts-candidate 1.509.1-fixed
            danielbeck Daniel Beck made changes -
            Link This issue is duplicated by JENKINS-11716 [ JENKINS-11716 ]
            danielbeck Daniel Beck made changes -
            Link This issue is related to JENKINS-19764 [ JENKINS-19764 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-24825 [ JENKINS-24825 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 147969 ] JNJira + In-Review [ 192664 ]
            danielbeck Daniel Beck made changes -
            Link This issue is related to JENKINS-44657 [ JENKINS-44657 ]
            tadek Tadeusz Kosciuszko made changes -
            Link This issue is related to JENKINS-48188 [ JENKINS-48188 ]

            People

              jglick Jesse Glick
              jglick Jesse Glick
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: