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

Git Parameter plugin causes SCM polling to return false negatives


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-parameter-plugin
    • None

      Steps to reproduce:

      1. Initial state is a Jenkins pipeline job, set to "Pipeline script from SCM", with a Jenkinsfile in the root of a Git repo on master.
      2. SCM polling set to 5-minute intervals.
      3. Commits/pushes to master will trigger builds as expected.
      4. Add a Git Parameter:
        1. Name: GIT_BRANCH
        2. Parameter Type: Branch
        3. Default Value: master (note: can also use origin/master or refs/heads/master)
        4. Use repository: (same repo as specified for the Jenkinsfile)
      5. Update the Branch Specifier for the pipeline to ${GIT_BRANCH}
      6. Wait one polling interval.
      7. Push a change to master.
        1. In a few attempts, the first push was detected correctly, and the false negative did not occur until the second push.
        2. In most attempts, the first push was enough to cause the false negative.

      When the false negative occurs, the Git Polling Log correctly shows the Last Built Revision, but does not detect the new HEAD revision.

      Remediating the issue required the following:

      1. Remove the Git Parameter
      2. Set the Branch Spec for the pipeline back to "master"
      3. Start a build manually–this has the effect of resetting/refreshing the polling data
      4. Push a change to master–the next poll should detect the change and build normally

      Running a manual build with the Git Parameter in place, and choosing origin/master from the list, did NOT reset/refresh the polling data, even though the correct hash was checked out for the build.  The false-negative behavior returned on the next poll after another push to master.

      I also upgraded the plugin from version 0.8.0 to version 0.9.9 to see if that would resolve the issue; it did not.

            klimas7 Boguslaw Klimas
            drosen02 David Rosenfeld
            3 Vote for this issue
            5 Start watching this issue