• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • clearcase-plugin
    • None
    • Platform: All, OS: All

      If a slave loses its workspace and the job is using CC, then the view should be removed.

          [JENKINS-2209] Add support for new workspace delete callback

          Andrew Bayer added a comment -

          Assigning to me.

          Andrew Bayer added a comment - Assigning to me.

          Andrew Bayer added a comment -

          Aiming at next release after 0.8.2.

          Andrew Bayer added a comment - Aiming at next release after 0.8.2.

          Peter Hayes added a comment -

          Does this address removal of the view in the following use cases?

          1. A job is renamed thus changing the global path to the view
          2. User runs the "Wipe Out Workspace" action
          3. User deletes the job
          4. User configures job and changes the the view name
          5. User configures job and removes clearcase support

          This is critical as users can easily execute these functions and when the view
          is not properly managed it causes a manual administration intervention.

          Peter Hayes added a comment - Does this address removal of the view in the following use cases? 1. A job is renamed thus changing the global path to the view 2. User runs the "Wipe Out Workspace" action 3. User deletes the job 4. User configures job and changes the the view name 5. User configures job and removes clearcase support This is critical as users can easily execute these functions and when the view is not properly managed it causes a manual administration intervention.

          Andrew Bayer added a comment -

          The first of those use cases is covered by the "Remove clearcase view on rename"
          option, in the ClearCase advanced options of a job. I think it probably is best
          that not removing the view should remain the default option in that case, so I
          think we're ok there.

          The third use case should also already be working - when the job is deleted, the
          view should also be deleted. If that's not happening for you, open a bug for that.

          The second use case is one I ran into a couple weeks ago when a coworker of mine
          wiped out the workspaces of all my jobs to free up disk space while I was out of
          town. So yeah, the current behavior (deleting the view directory, but leaving
          the view registered with ClearCase) is definitely not the correct behavior, and
          it should hopefully be cleared up by the work I'll be doing for this issue. It
          will probably require some changes in AbstractProject.doWipeOutWorkspace, though.

          Use cases #4 and #5...I don't honestly know how to detect those changes to the
          job configuration before they've actually been made. If you could open an
          enhancement request for those two scenarios (just the one issue covering both
          cases should be fine), I'll see if there's anything I can do when I get a chance.

          Andrew Bayer added a comment - The first of those use cases is covered by the "Remove clearcase view on rename" option, in the ClearCase advanced options of a job. I think it probably is best that not removing the view should remain the default option in that case, so I think we're ok there. The third use case should also already be working - when the job is deleted, the view should also be deleted. If that's not happening for you, open a bug for that. The second use case is one I ran into a couple weeks ago when a coworker of mine wiped out the workspaces of all my jobs to free up disk space while I was out of town. So yeah, the current behavior (deleting the view directory, but leaving the view registered with ClearCase) is definitely not the correct behavior, and it should hopefully be cleared up by the work I'll be doing for this issue. It will probably require some changes in AbstractProject.doWipeOutWorkspace, though. Use cases #4 and #5...I don't honestly know how to detect those changes to the job configuration before they've actually been made. If you could open an enhancement request for those two scenarios (just the one issue covering both cases should be fine), I'll see if there's anything I can do when I get a chance.

          Andrew Bayer added a comment -

          Adding dependency on https://hudson.dev.java.net/issues/show_bug.cgi?id=3506 for
          "Wipe Out Workspace" use case.

          Andrew Bayer added a comment - Adding dependency on https://hudson.dev.java.net/issues/show_bug.cgi?id=3506 for "Wipe Out Workspace" use case.

          Peter Hayes added a comment -

          I don't see the option to "Remove clearcase view on rename". Is that in an as
          yet unreleased version of the clearcase plugin?

          I am running the build on a slave agent and when I delete the job, I do not see
          the workspace (or the view) getting removed. Is this supposed to remove it
          immediately or after some interval?

          I will open new enhancement requests for #s 4 & 5.

          Peter Hayes added a comment - I don't see the option to "Remove clearcase view on rename". Is that in an as yet unreleased version of the clearcase plugin? I am running the build on a slave agent and when I delete the job, I do not see the workspace (or the view) getting removed. Is this supposed to remove it immediately or after some interval? I will open new enhancement requests for #s 4 & 5.

          Andrew Bayer added a comment -

          Looks like the rmview on rename functionality was added in 0.8.2, but yeah, I
          just confirmed in a couple tests (both slave and master) that the view isn't
          actually getting rmviewed when the job is deleted. If you could open a bug for
          that, I'd appreciate it. Thanks!

          Andrew Bayer added a comment - Looks like the rmview on rename functionality was added in 0.8.2, but yeah, I just confirmed in a couple tests (both slave and master) that the view isn't actually getting rmviewed when the job is deleted. If you could open a bug for that, I'd appreciate it. Thanks!

          Andrew Bayer added a comment -

          Ok, this is at least a two part bug - I'm going to open a new bug for the view
          deletion problem and will add you as a cc.

          Andrew Bayer added a comment - Ok, this is at least a two part bug - I'm going to open a new bug for the view deletion problem and will add you as a cc.

          Code changed in hudson
          User: : abayer
          Path:
          trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=18111
          Log:
          [FIXED JENKINS-2209] Added overide of SCM.processWorkspaceBeforeDeletion - will be called when workspaceCleanupThread runs, when AbstractProject.performDelete runs, or when AbstractProject.doWipeOutWorkspace runs.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java http://fisheye4.cenqua.com/changelog/hudson/?cs=18111 Log: [FIXED JENKINS-2209] Added overide of SCM.processWorkspaceBeforeDeletion - will be called when workspaceCleanupThread runs, when AbstractProject.performDelete runs, or when AbstractProject.doWipeOutWorkspace runs.

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

              Created:
              Updated:
              Resolved: