[JIRA] (JENKINS-56447) Git Parameter plugin causes SCM polling to return false negatives

2 views
Skip to first unread message

drosen02@harris.com (JIRA)

unread,
Mar 6, 2019, 4:17:02 PM3/6/19
to jenkinsc...@googlegroups.com
David Rosenfeld created an issue
 
Jenkins / Bug JENKINS-56447
Git Parameter plugin causes SCM polling to return false negatives
Issue Type: Bug Bug
Assignee: Boguslaw Klimas
Components: git-parameter-plugin
Created: 2019-03-06 21:16
Environment: CloudBees Jenkins Enterprise 2.73.30.0.1-fixed
Jenkins master:
   RHEL 6 (2.6.32-642.6.2.el6.x86_64)
   Java 1.7.0_65
Git Parameter Plugin 0.9.9 (upgraded from 0.8.0)
Git client plugin 2.7.1
Git plugin 3.9.3
Atlassian Bitbucket v5.11.1
Priority: Major Major
Reporter: David Rosenfeld

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.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

drosen02@harris.com (JIRA)

unread,
Mar 6, 2019, 4:26:03 PM3/6/19
to jenkinsc...@googlegroups.com
David Rosenfeld updated an issue
Change By: David Rosenfeld
Steps to reproduce:
# 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.
# SCM polling set to 5-minute intervals.
# Commits/pushes to master will trigger builds as expected.
# Add a Git Parameter:
## Name: GIT_BRANCH
## Parameter Type: Branch
## Default Value: master (note: can also use origin/master or refs/heads/master)
## Use repository: (same repo as specified for the Jenkinsfile)
# Update the Branch Specifier for the pipeline to ${GIT_BRANCH}
# Wait one polling interval.
# Push a change to master.

#

# # In a few attempts, the first push was detected correctly, and the false negative did not occur until the second push.
## 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:
# Remove the Git Parameter
# Set the Branch Spec for the pipeline back to "master"
# Start a build manually–this has the effect of resetting/refreshing the polling data
# 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.

robin.jansohn@zf.com (JIRA)

unread,
May 24, 2019, 4:22:02 AM5/24/19
to jenkinsc...@googlegroups.com
Robin Jansohn commented on Bug JENKINS-56447
 
Re: Git Parameter plugin causes SCM polling to return false negatives

I can confirm this (Jenkins 2.164.3, git-parameter-plugin 0.9.10, git-client-plugin 2.7.7, git-plugin 3.10.0, scm-api-plugin 2.4.1). We also use Bitbucket server (v5.14.4).

Is this being looked at? With the current state we cannot use Git SCM polling to trigger nightly builds (@midnight). Changes are simply not detected. I looked at the workspace folder and it did not contain the latest changes (no git pull or similar executed).

Job type is pipeline and we also use the git parameter to specify the branch (default origin/master). As additional behaviors we have Check out to specific local branch with an empty value activated.

Git Polling Log

Started on May 24, 2019, 12:49:00 AM
Using strategy: Default
[poll] Last Built Revision: Revision 8f72cec4daf37c36fd32884b531f6e9ef64bdff9 (refs/remotes/origin/master)
using credential git-ssh-creds
 > /usr/bin/git --version # timeout=10
using GIT_SSH to set credentials SSH key access on Bitbucket server
 > /usr/bin/git ls-remote -h ssh://g...@git.my-company.com:7999/project/repo.git # timeout=10
Found 1 remote heads on ssh://g...@git.my-company.com:7999/project/repo.git
Using strategy: Default
[poll] Last Built Revision: Revision 8f72cec4daf37c36fd32884b531f6e9ef64bdff9 (refs/remotes/origin/master)
using credential git-ssh-creds
 > /usr/bin/git --version # timeout=10
using GIT_SSH to set credentials SSH key access on Bitbucket server
 > /usr/bin/git ls-remote -h ssh://g...@git.my-company.com:7999/project/repo.git # timeout=10
Found 1 remote heads on ssh://g...@git.my-company.com:7999/project/repo.git
Done. Took 0.69 sec
No changes
Reply all
Reply to author
Forward
0 new messages