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

Poll results in changes always found when using 2 global libraries

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: p4-plugin
    • Labels:
    • Environment:
      P4 Plugin 1.9.3
      Jenkins 1.89.3
    • Similar Issues:

      Description

      When there are 2 or more global libraries P4Jenkins will use the same SyncID for both. This causes polling to always find a change even when no change has occurred.

      P4: Polling on: master with:jenkins-library
      Found last change 3 on syncID jenkins-library
      Found last change 2 on syncID jenkins-library
        ...cut...
      P4: Polling with range: 2,3
      ... p4 changes -m20 //jenkins-library/...@2,3 +
       ...cut...
      Changes found
      

      Reproduction Steps:

      (1) Under Manage Jenkins add two Helix based Libraries called 'my-shared-library' (org.foo.lib) and 'my-shared-library2' (org.bar.lib).

      (2) Create a Jenkinsfile that includes both libraries and uses one of them. For example:

      @Library('my-shared-library')
      @Library('my-shared-library2')
      import org.foo.lib.*
      import org.bar.lib.*
      pipeline {
        agent { label 'master' }
        stages {
          stage("Repro") {
            steps {
              script {
                 def z = new org.foo.lib()
                 z.testFunc1()
                 z.testFunc2()
              }
            }
          }
        }
      }
      

      (3) Create a pipeline job that uses the above Jenkinsfile and uses polling as the build trigger.

      (4) Manually run the build.

      (5) Wait for each poll interval.

      Result: A build is triggered for every poll.

      Expected Result: Only a change submitted to the libraries after step (4) should cause a poll to trigger a build.

       

       

        Attachments

          Issue Links

            Activity

            Hide
            p4karl Karl Wirth added a comment - - edited

            JENKINS-49047 - This was the previous fix to the same problem.

            Show
            p4karl Karl Wirth added a comment - - edited JENKINS-49047 - This was the previous fix to the same problem.
            Show
            p4paul Paul Allen added a comment - Ready for release. https://ci.jenkins.io/job/Plugins/job/p4-plugin/job/master/281/
            Hide
            p4paul Paul Allen added a comment -

            Released in 1.9.3

            Show
            p4paul Paul Allen added a comment - Released in 1.9.3

              People

              • Assignee:
                p4paul Paul Allen
                Reporter:
                p4karl Karl Wirth
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: