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

Perforce plugin syncing whilst another sync is still taking place

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi,

      I've discovered an issue with the Perforce plugin.

      I have a job called "GenerateClassLayout", which is configured to "Let Jenkins Manage Workspace View" and "Clean Workspace before Each Build".
      The Poll SCM schedule is set to */2 * * * * - so poll every 2 minutes.

      When I check the polling log I see this:

      Started on 21-Jul-2011 10:10:42
      Looking for changes...
      Using node: Jenkins
      Using master perforce client: Jenkins_GenerateClassLayout
      [JCI] $ "C:\\Program Files\\Perforce\\p4.exe" workspace -o Jenkins_GenerateClassLayout
      Last sync'd change was 138510
      [JCI] $ "C:\\Program Files\\Perforce\\p4.exe" counter change
      [JCI] $ "C:\\Program Files\\Perforce\\p4.exe" -s changes //Jenkins_GenerateClassLayout/...@138511,@138519
      Latest submitted change selected by workspace is 138519
      [JCI] $ "C:\\Program Files\\Perforce\\p4.exe" describe -s 138519
      [JCI] $ "C:\\Program Files\\Perforce\\p4.exe" -G where //personal/tfields/Live/External/RecastNavigation/DebugUtils/Source/DebugDraw.cpp
      Triggering a build.
      Done. Took 0.7 sec
      Changes found
      

      Syncing all the required files takes longer than 2 minutes so whilst it's still syncing another build is triggered and the polling log contains this:

      Started on 21-Jul-2011 10:12:42
      Looking for changes...
      Using node: Jenkins
      Using master perforce client: Jenkins_GenerateClassLayout
      [JCI] $ "C:\\Program Files\\Perforce\\p4.exe" workspace -o Jenkins_GenerateClassLayout
      Previous build doesn't have Perforce info.
      [JCI] $ "C:\\Program Files\\Perforce\\p4.exe" sync -n
      Workspace not up-to-date.
      Triggering a build.
      Done. Took 0.98 sec
      Changes found
      

      As you can see the build start time is exactly 2 minutes later. The question is why is this happening?
      I suspect it's something to do with the fact that the workspace is not up to date based on this text in the log: "Workspace not up-to-date."

      If I change my polling time to 5 minutes, which gives the system plenty of time to sync then all is well - this is not a solution though.

      Thanks in advance,
      Tom.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Rob Petti
          Path:
          src/main/java/hudson/plugins/perforce/PerforceSCM.java
          http://jenkins-ci.org/commit/perforce-plugin/b187c8fe480a267696f866daa418ce3977971f1f
          Log:
          JENKINS-10411 adding check to compareRemoteRevisionState just in case Jenkins passes in something other than a PerforceSCMRevisionState

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Rob Petti Path: src/main/java/hudson/plugins/perforce/PerforceSCM.java http://jenkins-ci.org/commit/perforce-plugin/b187c8fe480a267696f866daa418ce3977971f1f Log: JENKINS-10411 adding check to compareRemoteRevisionState just in case Jenkins passes in something other than a PerforceSCMRevisionState
          Hide
          dogfood dogfood added a comment -

          Integrated in plugins_perforce #122
          JENKINS-10411 adding check to compareRemoteRevisionState just in case Jenkins passes in something other than a PerforceSCMRevisionState

          Rob Petti :
          Files :

          • src/main/java/hudson/plugins/perforce/PerforceSCM.java
          Show
          dogfood dogfood added a comment - Integrated in plugins_perforce #122 JENKINS-10411 adding check to compareRemoteRevisionState just in case Jenkins passes in something other than a PerforceSCMRevisionState Rob Petti : Files : src/main/java/hudson/plugins/perforce/PerforceSCM.java
          Hide
          rpetti Rob Petti added a comment -

          I've updated it with logic similar to what's used in the SVN plugin, so it should be working now. The snapshot on my page has been updated with the changes if you want to try it again.

          Show
          rpetti Rob Petti added a comment - I've updated it with logic similar to what's used in the SVN plugin, so it should be working now. The snapshot on my page has been updated with the changes if you want to try it again.
          Hide
          tfields Thomas Fields added a comment -

          Hi Rob, Just tried the latest Perforce plugin from your webpage and I'm happy to say that it works great. Could this now be pushed into the main release?

          Thanks, Tom.

          Show
          tfields Thomas Fields added a comment - Hi Rob, Just tried the latest Perforce plugin from your webpage and I'm happy to say that it works great. Could this now be pushed into the main release? Thanks, Tom.
          Hide
          rpetti Rob Petti added a comment -

          Yes it will make it into the next release.

          Show
          rpetti Rob Petti added a comment - Yes it will make it into the next release.

            People

            • Assignee:
              rpetti Rob Petti
              Reporter:
              tfields Thomas Fields
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: