[JIRA] (JENKINS-60090) Job Triggered even though there is no change in Bitbucket

11 views
Skip to first unread message

pvlrjrinfy@gmail.com (JIRA)

unread,
Nov 7, 2019, 11:27:02 AM11/7/19
to jenkinsc...@googlegroups.com
Jagadeeswar Reddy created an issue
 
Jenkins / Bug JENKINS-60090
Job Triggered even though there is no change in Bitbucket
Issue Type: Bug Bug
Assignee: Mark Waite
Attachments: Gti_installed_versions.PNG, Jenkins_Git_options.PNG
Components: git-plugin
Created: 2019-11-07 16:26
Environment: RHEL 7
Jenkins Version: Jenkins ver. 2.184
Bitbucket Version: Bitbucket v5.16.2
Git-Plugin
Labels: jenkins git
Priority: Major Major
Reporter: Jagadeeswar Reddy

Hello Team,

Jenkins job configured to trigger jobs when there is any SCM change in bitbucket repository. But Jenkins job triggered even though there is no change in Bitbucket. When we see commit if commit message that was done on 3 years back. This is happening in one job for specific tags in bitbucket that those are created 3 years back.
Please find attached screen shots for Jenkins job git configuration options and git plugin version details which are installed in Jenkins.

jenkins job console startup logs.
=======
20:01:28 Started by an SCM change
20:01:28 Running as SYSTEM
20:01:28 [EnvInject] - Loading node environment variables.
=======
It happen twise in last 15 days. Need your support to find the cause.
Thanks in Advance !!!

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Nov 7, 2019, 12:49:03 PM11/7/19
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-60090
 
Re: Job Triggered even though there is no change in Bitbucket

Please provide enough details so that someone other than the original submitter can duplicate the problem. Ideally, provide a series of numbered steps describing what was done, what was observed, and the desired result that should have been seen instead of what was actually observed.

Some specific questions include:

mark.earl.waite@gmail.com (JIRA)

unread,
Nov 7, 2019, 12:55:02 PM11/7/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-60090
Please provide enough details so that someone other than the original submitter can duplicate the problem.   

  Ideally, provide a * series of numbered steps describing what was done * , what was observed, and the desired result that should have been seen instead of what was actually observed.

Some specific questions include:
* Is this a Freestyle job, a Pipeline job, a Multibranch Pipeline job, an Organization Folder Pipeline job, or some other type of job?
* What is the config.xml file that describes the job?
* Are the agents which  perform the builds ephemeral or static agents?
* If the agents are static, were any of them recently deleted, damaged, or destroyed?
* Have you enabled fetching of tags in the job, in addition to configuring the refspec to retrieve tags?
* Are there other changes in the repository which might be associated with the rebuild of the tag?
* Was the history retention of the Jenkins job changed recently so that existing history which included those previously built tags might have been deleted?  (Git tags do not in general have a concept of `date`.  The git plugin as you've configured it probably attempts to build all tags detected in the remote repository which have not been previously built in this job.  If history were deleted for the job, then that tag may longer be considered "already built" and may be built again)

mark.earl.waite@gmail.com (JIRA)

unread,
Nov 7, 2019, 12:55:02 PM11/7/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-60090
Please provide enough details so that someone other than the original submitter can duplicate the problem.  Ideally, provide a series of numbered steps describing what was done, what was observed, and the desired result that should have been seen instead of what was actually observed.

Some specific questions include:
* Is this a Freestyle job, a Pipeline job, a Multibranch Pipeline job, an Organization Folder Pipeline job, or some other type of job?
* What is the config.xml file that describes the job?
* Are the agents which  perform the builds ephemeral or static agents?
* If the agents are static, were any of them recently deleted, damaged, or destroyed?
* Have you enabled fetching of tags in the job, in addition to configuring the refspec to retrieve tags?
* Are there other changes in the repository which might be associated with the rebuild of the tag?
* Was the history retention of the Jenkins job changed recently so that existing history which included those previously built tags might have been deleted?  (Git tags do not in general have a concept of `date`.  The git plugin as you've configured it probably attempts to build all tags detected in the remote repository which have not been previously built in this job.  If history were deleted for the job, then that tag may longer be considered "already built" and may be built again)

mark.earl.waite@gmail.com (JIRA)

unread,
Nov 7, 2019, 12:55:02 PM11/7/19
to jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Unassigned
 
Change By: Mark Waite
Assignee: Mark Waite

pvlrjrinfy@gmail.com (JIRA)

unread,
Nov 8, 2019, 12:04:02 AM11/8/19
to jenkinsc...@googlegroups.com
Jagadeeswar Reddy commented on Bug JENKINS-60090
 
Re: Job Triggered even though there is no change in Bitbucket

Hello Mark Waite,

Please find the details below.

  • Is this a Freestyle job, a Pipeline job, a Multibranch Pipeline job, an Organization Folder Pipeline job, or some other type of job?  --> It is Freestyle Job.
  • What is the config.xml file that describes the job? --> Please find attached Job config.xml file.
  • Are the agents which perform the builds ephemeral or static agents? --> Static Agents(Windows 10)
  • If the agents are static, were any of them recently deleted, damaged, or destroyed? --> No
  • Have you enabled fetching of tags in the job, in addition to configuring the refspec to retrieve tags? --> Yes
  • Are there other changes in the repository which might be associated with the rebuild of the tag? --> No
  • Was the history retention of the Jenkins job changed recently so that existing history which included those previously built tags might have been deleted? (Git tags do not in general have a concept of `date`. The git plugin as you've configured it probably attempts to build all tags detected in the remote repository which have not been previously built in this job. If history were deleted for the job, then that tag may longer be considered "already built" and may be built again) --> Job configured to build if there is any new tag created in branch. Currently i have only last 30 Builds in my jenkins but i have tags more than that in my branch. It is not triggering for all tags it is picking few tags and building the jobs. Git settings screen shot i have attached(Jenkins_Git_Options.PNG) screen shot.

Thanks.

mark.earl.waite@gmail.com (JIRA)

unread,
Nov 8, 2019, 7:37:02 AM11/8/19
to jenkinsc...@googlegroups.com

I suspect you are relying on the JENKINS-19022 bug which causes build history from earlier builds to be incorrectly included in later build records. The git plugin does not have a concept of the "age" of a tag or of the "create date" of a tag. The git plugin has a concept that a SHA1 has already been built or has not already been built. In your case, my guess would be that the SHA-1 hashes from the very old builds had been copied into later build records due to JENKINS-19022. A further guess is that the build records which contained those old records have now expired off the end of the list.

If my theory is correct, then you should be able to prevent future rebuilds of old tags by retaining all history for that job.

mark.earl.waite@gmail.com (JIRA)

unread,
Nov 8, 2019, 7:38:03 AM11/8/19
to jenkinsc...@googlegroups.com
Mark Waite resolved as Not A Defect
 

Resolving this as "Not a defect" because it is how the plugin is intended to work.

Change By: Mark Waite
Status: Open Resolved
Resolution: Not A Defect
Reply all
Reply to author
Forward
0 new messages