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

P4 plugin keeps triggering builds on the same Perforce changelist, even if no new changelist was submitted to Perforce.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • p4-plugin
    • None
    • Jenkins version: 1.626, Perforce Plugin version: 1.3.35

      I noticed that the P4 plugin keeps triggering builds on the same Perforce changelist even if no new changelist was submitted to Perforce. I had a look at the polling log and it seems like the "p4 counter change" command is used by the p4 plugin to determine the latest changelist available on Perforce ( see log at the end of this message ). This is probably wrong, since the Perforce doc (https://www.perforce.com/perforce/r12.2/manuals/cmdref/counter.html) says that this command returns "The last changelist number known to the Perforce service (the output of p4 counter change) includes pending changelists created by users, but not yet submitted to the depot. ". This probably explains the bug, since the plugin triggers a build as long as somebody has a pending changelist in his workspace whose changelist number is higher than the last submitted changelist.

      Started on Jan 19, 2016 1:01:00 PM
      Polling SCM changes on BUILDMACHINE
      Looking for changes...
      Using node: BUILDMACHINE
      Using remote perforce client: build_basic-1162883061
      [Jenkins] $ p4 workspace -o build_basic-1162883061
      [Jenkins] $ p4 counter change
      [Jenkins] $ p4 -s changes -s submitted //SecretPath/...@176960,@329345
      Latest submitted change selected by workspace is 329343
      [Jenkins] $ p4 describe -s 329343
      [Jenkins] $ p4 info
      [Jenkins] $ p4 -G where //...
      Looking for changes...
      Using node: BUILDMACHINE
      Using remote perforce client: Build_BuildScripts-1162883061
      [Jenkins] $ p4 workspace -o Build_BuildScripts-1162883061
      [Jenkins] $ p4 counter change
      [Jenkins] $ p4 -s changes -s submitted //Build_BuildScripts-1162883061/...@176960,@189267
      No changes found.
      Done. Took 17 sec
      Changes found

            p4paul Paul Allen
            spelletier Stéphane Pelletier
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: