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

Perforce plugin uses custom workspace from a different job

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • p4-plugin
    • None
    • Hudson 1.354, Perforce plugin 1.0.28

      My "journey" started with this exception:

      14-04-2010 12:43:13 hudson.triggers.SCMTrigger$Runner runPolling
      SEVERE: Failed to record SCM polling
      java.lang.NumberFormatException: For input string: "-"
      	at java.lang.NumberFormatException.forInputString(Unknown Source)
      	at java.lang.Integer.parseInt(Unknown Source)
      	at java.lang.Integer.(Unknown Source)
      	at com.tek42.perforce.parse.Changes.getChangeNumbers(Changes.java:144)
      	at hudson.plugins.perforce.PerforceSCM.needToBuild(PerforceSCM.java:735)
      	at hudson.plugins.perforce.PerforceSCM.pollChanges(PerforceSCM.java:639)
      	at hudson.scm.SCM.poll(SCM.java:370)
      	at hudson.model.AbstractProject.poll(AbstractProject.java:1157)
      	at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:330)
      	at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:359)
      	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      

      I also added this text as a note to JENKINS-1873, thinking it was the same.
      Some further analysis revealed which job was failing (only one, consistently). After a while, trying to get output of "p4 changes -m 2 //clientspec/...", I discovered that this particular clientspec was using the wrong Root!
      Most of our builds use custom workspaces in the form "${N}/hudson/jobs/${JOB_NAME}/workspace" (N expands to a network drive or mount point, JOB_NAME is a Hudson standard variable).
      This job's Perforce clientspec consistently ends up with a root that is the workspace of a different build (one of its downstream builds, but that's probably coincidence). I have tried many things, including deleting the clientspec and letting the plugin start over; still the same thing happened.

            rpetti Rob Petti
            torbent torbent
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: