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

ClearCase views not getting deleted when job is renamed or deleted

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • clearcase-plugin
    • None
    • Platform: All, OS: All

    Description

      The call to cleartool rmview that is invoked when the onDeleted listener method
      runs seems to be using the wrong directory for the workspace argument of the
      cleartool launcher it creates - it's passing
      project.getWorkspace().getParent().getParent(), which ends up being
      [hudson_root]/jobs on the master and [remote_fs_root]/workspace on slaves. The
      call to rmview is "cleartool rmview -force [view_tag]" - but [view_tag] is
      actually in [hudson_root]/jobs/[job_name]/workspace on the master, or
      [remote_fs_root]/workspace/[job_name] on slaves. Therefore, the call to rmview
      fails.

      This can probably be fixed by getting rid of the getParent().getParent() on the
      workspace argument to the cleartool launcher creation in onDeleted, but I'm
      seeing some strange things in the logs, with a bunch of rmview attempts for view
      tags which shouldn't have had onDeleted calls against them. I think they may be
      a result of creating new jobs with the copy-from-another-job option, but I need
      to test it more thoroughly.

      Attachments

        Issue Links

          Activity

            abayer Andrew Bayer added a comment -

            Ok, it's even more annoying than I thought: doRenamed and doDeleted get called
            on the listeners after the job has actually been deleted from disk. So of
            course the rmview won't work.

            abayer Andrew Bayer added a comment - Ok, it's even more annoying than I thought: doRenamed and doDeleted get called on the listeners after the job has actually been deleted from disk. So of course the rmview won't work.

            Code changed in hudson
            User: : abayer
            Path:
            trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java
            trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearCaseSCM.java
            trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearCaseUcmSCM.java
            trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearTool.java
            trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearToolDynamic.java
            trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearToolDynamicUCM.java
            trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearToolExec.java
            trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearToolSnapshot.java
            trunk/hudson/plugins/clearcase/src/main/resources/hudson/plugins/clearcase/ClearCaseSCM/config.jelly
            trunk/hudson/plugins/clearcase/src/main/resources/hudson/plugins/clearcase/ClearCaseUcmSCM/config.jelly
            trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/ClearToolExecTest.java
            http://fisheye4.cenqua.com/changelog/hudson/?cs=18096
            Log:
            [JENKINS-3095, JENKINS-3508] ClearCase plugin now properly handles job renaming and deletion - the view storage is still deleted before the plugin knows anything about it, but it's now just removing the view tag when it does get called, since the view storage is gone. Also, fixed an annoying problem with "Remove view on rename" not sticking in the configuration.

            scm_issue_link 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 trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearCaseSCM.java trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearCaseUcmSCM.java trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearTool.java trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearToolDynamic.java trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearToolDynamicUCM.java trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearToolExec.java trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearToolSnapshot.java trunk/hudson/plugins/clearcase/src/main/resources/hudson/plugins/clearcase/ClearCaseSCM/config.jelly trunk/hudson/plugins/clearcase/src/main/resources/hudson/plugins/clearcase/ClearCaseUcmSCM/config.jelly trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/ClearToolExecTest.java http://fisheye4.cenqua.com/changelog/hudson/?cs=18096 Log: [JENKINS-3095, JENKINS-3508] ClearCase plugin now properly handles job renaming and deletion - the view storage is still deleted before the plugin knows anything about it, but it's now just removing the view tag when it does get called, since the view storage is gone. Also, fixed an annoying problem with "Remove view on rename" not sticking in the configuration.
            abayer Andrew Bayer added a comment -

            Fixed, will be in 0.9.

            abayer Andrew Bayer added a comment - Fixed, will be in 0.9.

            People

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

              Dates

                Created:
                Updated:
                Resolved: