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

Jobs with “Exclude Changes” Polling Filter Not Syncing Latest at Build Time

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • p4-plugin
    • None
    • P4 2015.2 (Win 2008 R@), Jenkins 2.14 (Win 2008 R2), P4-Plugin 1.4.3

      I’ve found that the latest versions of files that are mapped in a workspace and also in an “Exclude changes from Depot path” polling filter, are not being synced at build time.
      Here’s the scenario. I’m currently set Jobs to use Manual workspaces set in Jenkins, to do a Force Sync, and have the “Populate have list” flag set.

      The Workspace includes an example path:
      PathA/…
      PathB/…

      Also configured with the Polling Filter - “Exclude changes from Depot path” is set to a path under PathB (actually in my test it was the same path).

      What happens:

      1. A check-in under Path A is recognized from polling and triggers a build which has a quiet period associated with it.
      2. During the quiet period, one or more check-ins occur under Path B. These files naturally have a higher changelist number than what triggered the build.
      3. When the quiet period expires, the build starts and syncs Path A’s files to latest available changelist for that Path, whatever it may be – All is good!
      4. For the files in Path B, however, the build syncs to the changelist number from Path A that triggered the build, NOT the latest available changelist. That causes the files under Path B, to be sync’ed to non-latest state.
      5. Again, if check-ins occur in the quiet period under Path A – the latest versions of those files ARE being synced.

      For me, I have files under Path B that must be at latest when the build kicks off. I don’t, however, want to trigger builds with these changes, because unrelated changes occur here all day long. This behavior of sync’ing old files in that path is actually breaking our builds and forcing us to stay at version 1.3.8 which prevents us from using the latest version of the plugin (1.3.9 is where this issues was first noticed).

      Btw – Polling does recognize the changelists in Path B (See below - in my test 4938865 and 4938866 are under Path B), but they are not being synced to the workspace. 4938864 is the change in Path A that triggered the build – that is being synced AND the files in Path B are being synced to the 4938864 level also. The two Path B changes are also not listed/described on the Changes page for the job.

      I can see this maybe being by design, but the Exclude Filter specifically says it’s for polling – not syncing files, plus syncing the latest files from all paths at build time and using an Exclude in Polling path worked up through 1.3.8.

      Started on Jul 22, 2016 9:47:01 AM
      Polling SCM changes on master
      P4: Polling on: master with:Test-Perforce-Plugin
      ... p4 client -o Test-Perforce-Plugin
       +
      ... p4 info
       +
      
      P4 Task: establishing connection.
      ... server: atl-p4-test:1818
      ... node: atl-build-test
      P4: Polling with range: 4938863,now
      ... p4 changes -m100 //Test-Perforce-Plugin/...@4938863,now
       +
      ... p4 change -o 4938866
       +
      ... p4 describe -s 4938866
       +
      ... p4 change -o 4938865
       +
      ... p4 describe -s 4938865
       +
      ... p4 change -o 4938864
       +
      ... p4 describe -s 4938864
       +
      ... found change: 4938864
      Done. Took 0.18 sec
      Changes found
      

            p4paul Paul Allen
            jedavis Jason Davis
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: