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

NPE if processWorkspaceBeforeDeletion method returns false

    XMLWordPrintable

    Details

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

      Description

      I'm trying to veto the workspace cleanup process by returning false from the
      PerforceSCM.processWorkspaceBeforeDeletion(AbstractProject<?,?> project,
      FilePath workspace, Node node) method. If I do this I get the following stack
      trace:
      INFO: Started Workspace clean-up
      Exception in thread "Workspace clean-up thread" java.lang.NullPointerException
      at hudson.model.WorkspaceCleanupThread.process(WorkspaceCleanupThread.java:114)
      at hudson.model.WorkspaceCleanupThread.execute(WorkspaceCleanupThread.java:43)
      at hudson.model.PeriodicWork$1.run(PeriodicWork.java:41)
      at java.lang.Thread.run(Thread.java:619)

      If I return true then the workspace cleanup seems to work. I'm triggering a
      workspace cleanup via http://server/hudson/workspaceCleanup

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/WorkspaceCleanupThread.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=11665
          Log:
          [FIXED JENKINS-2221] Fixed in 1.250. This is actually unrelated to the veto, but your manually invoking this made the bug more explicit.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/model/WorkspaceCleanupThread.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=11665 Log: [FIXED JENKINS-2221] Fixed in 1.250. This is actually unrelated to the veto, but your manually invoking this made the bug more explicit.

            People

            Assignee:
            kohsuke Kohsuke Kawaguchi
            Reporter:
            thepner thepner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: