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

Filtered changes being reported when next job runs

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • p4-plugin
    • 1.17.1

      If using a polling build filter anything inside the filter will not trigger a build. 

      The next time a poll detects changes outside the filter the job runs and reports all changelists since the last job execution including the changes that were filtered.

       

      For example in the following screenshot 'abc.txt' was in the polling build filter but when a file that triggers the job runs every changelist since the last build is displayed:

       

      I would expect that only changelist 673 was displayed.

       

      Reproduction steps:

      (1) Add a stream called //streams/main

      (2) Add two files to the stream called //streams/main/abc.txt and //streams/main/def.txt

      (3) Create a pipleine job with the following definition (change 'credential' to match a valid Perforce credential):

      pipeline { 
          agent any
          stages { 
              stage("Repro") { 
                  steps {
                          checkout perforce(credential: 'JenkinsMaster', filter: [pathFilter('//streams/main/sub/abc.txt'), pathFilter('//streams/main/sub2')], populate: autoClean(delete: true, modtime: false, parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: true, replace: true, tidy: false), workspace: streamSpec(charset: 'none', format: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}', pinHost: false, streamName: '//streams/main'))
                  }
              }
          }
      } 

      (4) Build the job.

      (5) Edit and submit //streams/main/abc.txt 

      (6) Run poll on the job (needs the Poll Now plugin). The job does not run.

      (7) Edit and submit //streams/main/abc.txt 

      (8) Run poll on the job (needs the Poll Now plugin). The job does not run.

      (9) Edit and submit //streams/main/def.txt

      (10) Run poll on the job (needs the Poll Now plugin). The job will run and report 3 changelists.

      Expected Behavior - Only the changelist for step (9) should be reported.

       

          [JENKINS-75264] Filtered changes being reported when next job runs

          There are no comments yet on this issue.

            Unassigned Unassigned
            p4karl Karl Wirth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: