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

SCM polling stops to work if the previously used build node no longer exists

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When a build job is changed to use a new build node, and also the previously used node is removed from the Jenkins setup, then SCM polling starts to fail with:

      ERROR: Failed to record SCM polling for hudson.model.FreeStyleProject@587918[jobName]
      java.lang.NullPointerException
      	at hudson.plugins.zentimestamp.ZenTimestampEnvironmentContributor.buildEnvironmentFor(ZenTimestampEnvironmentContributor.java:37)
      	at hudson.model.Run.getEnvironment(Run.java:2045)
      	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:931)
      	at hudson.scm.SubversionSCM.compareRemoteRevisionWith(SubversionSCM.java:1230)
      	at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356)
      	at hudson.scm.SCM.poll(SCM.java:373)
      	at hudson.model.AbstractProject._poll(AbstractProject.java:1521)
      	at hudson.model.AbstractProject.poll(AbstractProject.java:1446)
      	at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439)
      	at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468)
      	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:662)
      

      This is because AbstractBuild#getBuiltOn may return null, but this case is not handled in hudson.plugins.zentimestamp.ZenTimestampEnvironmentContributor#buildEnvironmentFor.
      See http://javadoc.jenkins-ci.org/hudson/model/AbstractBuild.html#getBuiltOn() for reference.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/hudson/plugins/zentimestamp/ZenTimestampEnvironmentContributor.java
          http://jenkins-ci.org/commit/zentimestamp-plugin/6568c274b3758e8fea581602eb7b363ffd0d61ed
          Log:
          Fix JENKINS-17975

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/hudson/plugins/zentimestamp/ZenTimestampEnvironmentContributor.java http://jenkins-ci.org/commit/zentimestamp-plugin/6568c274b3758e8fea581602eb7b363ffd0d61ed Log: Fix JENKINS-17975

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              aldaris aldaris
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: