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

Jenkins retriggers job on same changelist every time it polls

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • p4-plugin
    • Windows 8.1 64-bit; Jenkins 1.607 (java 1.7 32-bit); P4 Plugin 1.2.1;

    Description

      Jenkins has repeatedly triggered a CI run on the same Perforce changelist every time it polls. The job is set to poll every two minutes and trigger a new CI run per every new change list. Currently, it keeps running a new job every two minutes even though there are no new changelists committed to the repository. You can tell in the logs below that it stops updating the "current" CL at build 182 and keeps finding changes (408326+), even though they've already been tested (and passed).

      Here's a breakdown of what's going on...

      ///////////////////////////
      // Perforce Checkins
      ///////////////////////////

      405702 4/2/2015 @ 11:17PM
      408326 4/3/2015 @ 10:49AM
      408455 4/3/2015 @ 11:22AM

      ///////////////////////////
      // Jenkins Build Setup:
      ///////////////////////////

      Build Triggers
      ----------------
      -Poll SCM:
      H/2 * * * * (every two minutes)

      SCM
      ----------------
      -Workspace Behavior
      Static
      -Populate Options:
      Sync Only
      Populate have list checked
      -Polling Build Filters:
      "Polling per change" enabled

      ///////////////////////////
      // Polling Logs
      ///////////////////////////

      =========
      BUILD 180
      =========
      Started on Apr 2, 2015 11:04:00 PM
      Polling SCM changes on worker_node_001
      P4: Polling on: worker_node_001 with:my_project_build
      Connected to node: worker_node_001
      Connected to server: perforce01.XXX.com:3666
      Connected to client: my_project_build
      P4: Polling with label/change: 404445,now
      listing changes: //my_project_build/...@404445,now
      ... found change: 405641
      next change: 405641
      Done. Took 1.9 sec
      Changes found

      =========
      BUILD 181
      =========
      Started on Apr 2, 2015 11:18:00 PM
      Polling SCM changes on worker_node_001
      P4: Polling on: worker_node_001 with:my_project_build
      Connected to node: worker_node_001
      Connected to server: perforce01.XXX.com:3666
      Connected to client: my_project_build
      P4: Polling with label/change: 405641,now
      listing changes: //my_project_build/...@405641,now
      ... found change: 405702
      next change: 405702
      Done. Took 1.4 sec
      Changes found

      =========
      BUILD 182
      =========
      Started on Apr 3, 2015 10:50:01 AM
      Polling SCM changes on worker_node_001
      P4: Polling on: worker_node_001 with:my_project_build
      Connected to node: worker_node_001
      Connected to server: perforce01.XXX.com:3666
      Connected to client: my_project_build
      P4: Polling with label/change: 405702,now
      listing changes: //my_project_build/...@405702,now
      ... found change: 408326
      next change: 408326
      Done. Took 2.1 sec
      Changes found

      =========
      BUILD 183
      =========
      Started on Apr 3, 2015 10:52:01 AM
      Polling SCM changes on worker_node_001
      P4: Polling on: worker_node_001 with:my_project_build
      Connected to node: worker_node_001
      Connected to server: perforce01.XXX.com:3666
      Connected to client: my_project_build
      P4: Polling with label/change: 405702,now
      listing changes: //my_project_build_build/...@405702,now
      ... found change: 408326
      next change: 408326
      Done. Took 1.7 sec
      Changes found

      <...kept doing this every two minutes...>

      <I disabled it and updated P4 Plugin from 1.1.2 to 1.2.1>

      =========
      BUILD 193
      =========
      Started on Apr 3, 2015 11:28:00 AM
      Polling SCM changes on worker_node_001
      P4: Polling on: worker_node_001 with:my_project_build
      Connected to node: worker_node_001
      Connected to server: perforce01.XXX.com:3666
      Connected to client: my_project_build
      P4: Polling with label/change: 405702,now
      listing changes: //my_project_build/...@405702,now
      ... found change: 408455
      ... found change: 408326
      next change: 408326
      Done. Took 3.2 sec
      Changes found

      =========
      BUILD 194
      =========
      Started on Apr 3, 2015 11:30:00 AM
      Polling SCM changes on worker_node_001
      P4: Polling on: worker_node_001 with:my_project_build
      Connected to node: worker_node_001
      Connected to server: perforce01.XXX.com:3666
      Connected to client: my_project_build
      P4: Polling with label/change: 405702,now
      listing changes: //my_project_build/...@405702,now
      ... found change: 408455
      ... found change: 408326
      next change: 408326
      Done. Took 2.1 sec
      Changes found

      <...and so on and so forth until I disabled it>

      Attachments

        1. build.xml
          1 kB
        2. changelog.xml
          0.1 kB
        3. log
          1 kB
        4. polling.log
          2 kB

        Issue Links

          Activity

            mhulth Martin Hulth added a comment -

            After both switching to a new worker machine and upgrading Jenkins to 1.610 (from 1.607) the problem cannot reproduce itself. Not enough to say what the cause was and if it's been fixed (or just hidden). Regardless, my CI setup is up and running again.

            mhulth Martin Hulth added a comment - After both switching to a new worker machine and upgrading Jenkins to 1.610 (from 1.607) the problem cannot reproduce itself. Not enough to say what the cause was and if it's been fixed (or just hidden). Regardless, my CI setup is up and running again.
            dantran dan tran added a comment -

            Could be a duplicate

            dantran dan tran added a comment - Could be a duplicate
            p4paul Paul Allen added a comment -

            Fixed 1.3.1 - simplified ReviewNotifier

            p4paul Paul Allen added a comment - Fixed 1.3.1 - simplified ReviewNotifier
            ram237 Pavel Pigalov added a comment -

            Hi all,

            I've just faced the same thing on
            Jenkins v1.639
            P4 Plugin v1.3.6
            running on Mac OSX (El Capitan, 10.11.1) box

            I have 2 jobs constantly polling (every 5 mins in my case) and executing a build even when no changes are made in Perforce.
            For some reason it stuck on changelist 128984 for no visible reason and always polls like:
            P4: Polling with label/change: 128984,now
            followed by hundreds of changelists (we're up to 140k now).

            Interesting that they both have the very same polling configuration (I only set H/5 * * * * polling schedule and "Auto cleanup and sync", no other polling filters or options) and both configured to the same p4 branch.

            However, I've got another one job which is configured exactly the same and it works just perfect: polls correctly (e.g. P4: Polling with label/change: 140584,now) and builds only when there are commits made through the p4.

            Going to upgrade to v1.653 (already upgraded to P4 Plugin v1.3.7) and see if this helps in any way...

            ram237 Pavel Pigalov added a comment - Hi all, I've just faced the same thing on Jenkins v1.639 P4 Plugin v1.3.6 running on Mac OSX (El Capitan, 10.11.1) box I have 2 jobs constantly polling (every 5 mins in my case) and executing a build even when no changes are made in Perforce. For some reason it stuck on changelist 128984 for no visible reason and always polls like: P4: Polling with label/change: 128984,now followed by hundreds of changelists (we're up to 140k now). Interesting that they both have the very same polling configuration (I only set H/5 * * * * polling schedule and "Auto cleanup and sync", no other polling filters or options) and both configured to the same p4 branch. However, I've got another one job which is configured exactly the same and it works just perfect: polls correctly (e.g. P4: Polling with label/change: 140584,now ) and builds only when there are commits made through the p4. Going to upgrade to v1.653 (already upgraded to P4 Plugin v1.3.7) and see if this helps in any way...
            ram237 Pavel Pigalov added a comment -

            Update on my case:

            The upgrade didn't change anything.
            Meanwhile I was able to resolve this by defining the separate p4 client view for each build. Now seems to work OK...

            ram237 Pavel Pigalov added a comment - Update on my case: The upgrade didn't change anything. Meanwhile I was able to resolve this by defining the separate p4 client view for each build. Now seems to work OK...

            People

              p4paul Paul Allen
              mhulth Martin Hulth
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: