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

AbstractProject.doWipeOutWorkspace() should support SCM.processWorkspaceBeforeDeletion()

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      Before a workspace is deleted by hudson.model.WorkspaceCleanupThread, it checks
      with the SCM for the job to see if it should be allowed to delete the workspace,
      by calling hudson.scm.SCM.processWorkspaceBeforeDeletion. I'm going to be adding
      an override of that method in the ClearCase plugin to remove the ClearCase view
      and then return true, so that we don't end up with a view still registered in
      ClearCase after its view storage, etc have been deleted.

      However, when "Wipe Out Workspace" is used, there is no check with the SCM
      first. The workspace is just deleted. I believe that doWipeOutWorkspace in
      AbstractProject should call processWorkspaceBeforeDeletion before deleting the
      workspace contents, and should only proceed if processWorkspaceBeforeDeletion
      returns true. This will give us the ability to remove the ClearCase view when
      "Wipe Out Workspace" is used, as well as the ability for SCMs to veto the
      deletion of the workspace.

        Attachments

          Issue Links

            Activity

            Hide
            abayer Andrew Bayer added a comment -

            Modifying AbstractProject.doWipeOutWorkspace as I described earlier.

            Show
            abayer Andrew Bayer added a comment - Modifying AbstractProject.doWipeOutWorkspace as I described earlier.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : abayer
            Path:
            trunk/hudson/main/core/src/main/java/hudson/model/AbstractProject.java
            trunk/hudson/main/core/src/main/resources/hudson/model/AbstractProject/wipeOutWorkspaceBlocked.jelly
            http://fisheye4.cenqua.com/changelog/hudson/?cs=18107
            Log:
            [FIXED JENKINS-3506] - doWipeOutWorkspace now calls SCM.processWorkspaceBeforeDeletion before deleting, same as WorkspaceCleanupThread and AbstractProject.processDelete. If processWorkspaceBeforeDeletion returns false, will redirect to explanatory page.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/hudson/main/core/src/main/java/hudson/model/AbstractProject.java trunk/hudson/main/core/src/main/resources/hudson/model/AbstractProject/wipeOutWorkspaceBlocked.jelly http://fisheye4.cenqua.com/changelog/hudson/?cs=18107 Log: [FIXED JENKINS-3506] - doWipeOutWorkspace now calls SCM.processWorkspaceBeforeDeletion before deleting, same as WorkspaceCleanupThread and AbstractProject.processDelete. If processWorkspaceBeforeDeletion returns false, will redirect to explanatory page.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : abayer
            Path:
            trunk/www/changelog.html
            http://fisheye4.cenqua.com/changelog/hudson/?cs=18109
            Log:
            JENKINS-3506

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=18109 Log: JENKINS-3506

              People

              Assignee:
              abayer Andrew Bayer
              Reporter:
              abayer Andrew Bayer
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: