[JIRA] (JENKINS-52816) scm poll triggers even there is no change in repository(bitbucket)

73 views
Skip to first unread message

syaramada-c@scrippsnetworks.com (JIRA)

unread,
Jul 31, 2018, 8:29:02 AM7/31/18
to jenkinsc...@googlegroups.com
suryatej yaramada created an issue
 
Jenkins / Bug JENKINS-52816
scm poll triggers even there is no change in repository(bitbucket)
Issue Type: Bug Bug
Assignee: Mark Waite
Components: git-plugin, job-dsl-plugin
Created: 2018-07-31 12:28
Environment: we are using Jenkins LTS 2.121.2 on hosted on amazonlinux , recently we downgraded job-dsl plugin to 1.69 as it had few components deprecated which we are using , job-dsl - 1.69 , git plugin - 3.9.1
Priority: Minor Minor
Reporter: suryatej yaramada

we are using dsl jobs to  create jobs for scripted pipelines and had this function 
triggers {
scm('H/10 * * * *')
 
even though there is no change in repo it is triggering jobs , we are using ecs executors
 

Polling Log

This page captures the polling log that triggered this build.
Started on Jul 30, 2018 7:15:00 PM Using strategy: Default [poll] Last Built Revision: Revision 80ae1a7997f138af5faa0e594eca7e88eb174026 (origin/master) > git --version # timeout=10 > git ls-remote -h g...@bitbucket.org:xxx/xxxxxxx # timeout=10 Found 1 remote heads on g...@bitbucket.org:xx/xxxxxx[poll] Latest remote head revision on refs/heads/master is: 80ae1a7997f138af5faa0e594eca7e88eb174026 - already built by 185 no polling baseline in /var/lib/jenkins/workspace/Sandbox/xxxx/xxxx/1.Build-Dev-Int@libs/jpl on Using strategy: Default > git --version # timeout=10 using GIT_SSH to set credentials Bitbucket SSH Key > git ls-remote -h g...@bitbucket.org:xxxxx.git # timeout=10 Found 1 remote heads on g...@bitbucket.org:xx/xxxx.git [poll] Latest remote head revision on refs/heads/master is: 80ae1a7997f138af5faa0e594eca7e88eb174026 Done. Took 2.7 sec Changes found

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

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

unread,
Jul 31, 2018, 10:40:01 PM7/31/18
to jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Unassigned
Change By: Mark Waite
Assignee: Mark Waite

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

unread,
Jul 31, 2018, 10:45:01 PM7/31/18
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-52816
 
Re: scm poll triggers even there is no change in repository(bitbucket)
Please provide a *+ series of numbered steps +* that will allow another person to duplicate the problem you're seeing.  There are too many details missing from the description to help with the issue you're seeing.

For example, what is the final definition of the job as created by Job DSL?

Is there a webhook configured from Bitbucket to Jenkins?  If not, why not (since polling is much less efficient than web hooks)?  

If you use a web hook instead of polling, does that resolve the problem?

Is the problem job a Pipeline (not multibranch) or a multibranch Pipeline?

What is the branch definition in the jobs?

What are the branches defined in the repository?

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

unread,
Jul 31, 2018, 10:45:02 PM7/31/18
to jenkinsc...@googlegroups.com

Please provide a series of numbered steps that will allow another person to duplicate the problem you're seeing. There are too many details missing from the description to help with the issue you're seeing.

For example, what is the final definition of the job as created by Job DSL?

Is there a webhook configured from Bitbucket to Jenkins? If not, why not (since polling is much less efficient than web hooks)?

If you use a web hook instead of polling, does that resolve the problem?

Is the problem job a Pipeline (not multibranch) or a multibranch Pipeline?

What is the branch definition in the jobs?

What are the branches defined in the repository?

syaramada-c@scrippsnetworks.com (JIRA)

unread,
Aug 8, 2018, 1:22:02 PM8/8/18
to jenkinsc...@googlegroups.com
suryatej yaramada updated an issue
 
Change By: suryatej yaramada
we are using dsl jobs to  create jobs for scripted pipelines and had this function 
triggers {
scm('H/10 * * * *')
 
even though there is no change in repo it is triggering jobs , we are using ecs executors
 
h1. Polling Log


This page captures the polling log that triggered this build.
Started on Jul 30, 2018 7:15:00 PM Using strategy: Default [poll] Last Built Revision: Revision 80ae1a7997f138af5faa0e594eca7e88eb174026 (origin/master) > git --version # timeout=10 > git ls-remote -h g...@bitbucket.org:xxx/xxxxxxx # timeout=10 Found 1 remote heads on g...@bitbucket.org:xx/xxxxxx[poll] Latest remote head revision on refs/heads/master is: 80ae1a7997f138af5faa0e594eca7e88eb174026 - already built by 185 no polling baseline in /var/lib/jenkins/workspace/Sandbox/xxxx/xxxx/1.Build-Dev-Int@libs/ jpl xxx on Using strategy: Default > git --version # timeout=10 using GIT_SSH to set credentials Bitbucket SSH Key > git ls-remote -h g...@bitbucket.org:xxxxx.git # timeout=10 Found 1 remote heads on g...@bitbucket.org:xx/xxxx.git [poll] Latest remote head revision on refs/heads/master is: 80ae1a7997f138af5faa0e594eca7e88eb174026 Done. Took 2.7 sec Changes found

swtch3k@gmail.com (JIRA)

unread,
Nov 22, 2018, 2:39:01 AM11/22/18
to jenkinsc...@googlegroups.com

For example, what is the final definition of the job as created by Job DSL?

  •  declerative pipeline jobs using one checkout in job configuration for the jenkinsfile with branch */master and also multiple other git repos in the jenkinsfile with */master

Is there a webhook configured from Bitbucket to Jenkins? If not, why not (since polling is much less efficient than web hooks)?

If you use a web hook instead of polling, does that resolve the problem?

  • here it's the other way around, pure polling seems to work and scm poll end up after certain build with no baseline for ***

Is the problem job a Pipeline (not multibranch) or a multibranch Pipeline?

  • yes, as already mentioned before

What is the branch definition in the jobs?

  • */branchname, some other jobs contain slashes based on the gitflow pattern

I hope that is enough.

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

swtch3k@gmail.com (JIRA)

unread,
Nov 22, 2018, 2:57:02 AM11/22/18
to jenkinsc...@googlegroups.com
Cenk Tosun edited a comment on Bug JENKINS-52816
For example, what is the final definition of the job as created by Job DSL?
*  declerative pipeline jobs using one checkout in job configuration for the jenkinsfile with branch */master and also multiple other git repos in the jenkinsfile with */master


Is there a webhook configured from Bitbucket to Jenkins? If not, why not (since polling is much less efficient than web hooks)?
* Yes, with [http://Jenkinsurl/git/notifyCommit?url=repourl|http://jenkinsurl/git/notifyCommit?url=repourl] - jobs are receiving the notification from bitbucket


If you use a web hook instead of polling, does that resolve the problem?
* here it's the other way around,  pure polling seems to work and scm poll but nevertheless both end up after certain build with no baseline for *** and starting multiple jobs

Is the problem job a Pipeline (not multibranch) or a multibranch Pipeline?
* yes, as already mentioned before


What is the branch definition in the jobs?
* */branchname, some other jobs contain slashes based on the gitflow pattern


I hope that is enough.

swtch3k@gmail.com (JIRA)

unread,
Nov 22, 2018, 3:26:02 AM11/22/18
to jenkinsc...@googlegroups.com

i have also identical log outputs (even identical sha1) for the builds which are triggered

Started on Nov 22, 2018 8:37:06 AM

no polling baseline in <path>@libs\shared-library-repo on
Using strategy: Default
[poll] Last Built Revision: Revision <sha1> (refs/remotes/origin/master)
Using strategy: Default
[poll] Last Built Revision: Revision <sha1> (refs/remotes/origin/master)
Using strategy: Default
[poll] Last Built Revision: Revision <sha1> (refs/remotes/origin/master)
Done. Took 5 ms
Changes found

 

 

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

unread,
Nov 22, 2018, 9:47:02 AM11/22/18
to jenkinsc...@googlegroups.com

I think you're assuming that I'll do a lot of work to guess the conditions for this problem. When I make guesses, the guesses may be wrong. If I guess incorrectly, I spend time investigating something that is not the problem you are seeing. I'm a volunteer that works on the git plugin during my nights and weekends.

For example, I would not have guessed that you were using '/master' to refer to a branch when 'master' is the shorter form and 'origin/master' is the more precise form. Using '/master' with some configurations will increase the risk that the plugin will incorrectly match a branch name from the wrong remote repository.

As another example, I would not have guessed that you were using multiple other git repos. I assume those multiple other git repos are being cloned into separate subdirectories, but since you don't say that and don't provide steps to duplicate the problem, I cannot be sure.

As another example, I asked if the job is a Pipeline or a multibranch Pipeline. You answered "yes, as already mentioned before". That didn't answer my question. A multibranch Pipeline has some important differences compared to a Pipeline. I need to know which of those two types it is.

When you provide a series of numbered steps that will allow another person to duplicate the problem you're seeing, I'll consider further investigation.

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

unread,
Nov 22, 2018, 9:48:02 AM11/22/18
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-52816
I think you're assuming that I'll do a lot of work to guess the conditions for this problem.  When I make guesses, the guesses may be wrong.  If I guess incorrectly, I spend time investigating something that is not the problem you are seeing.  I'm a volunteer that works on the git plugin during my nights and weekends.

For example, I would not have guessed that you were using '*/master' to refer to a branch when 'master' is the shorter form and 'origin/master' is the more precise form.  Using ' {{ */master }} ' with some configurations will increase the risk that the plugin will incorrectly match a branch name from the wrong remote repository.


As another example, I would not have guessed that you were using multiple other git repos.  I assume those multiple other git repos are being cloned into separate subdirectories, but since you don't say that and don't provide steps to duplicate the problem, I cannot be sure.

As another example, I asked if the job is a Pipeline or a multibranch Pipeline.  You answered "yes, as already mentioned before".  That didn't answer my question.  A multibranch Pipeline has some important differences compared to a Pipeline.  I need to know which of those two types it is.

When you provide a *+series of numbered steps+* that will allow another person to duplicate the problem you're seeing, I'll consider further investigation.

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

unread,
Nov 22, 2018, 9:48:02 AM11/22/18
to jenkinsc...@googlegroups.com

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

unread,
Nov 22, 2018, 9:49:02 AM11/22/18
to jenkinsc...@googlegroups.com

swtch3k@gmail.com (JIRA)

unread,
Nov 26, 2018, 6:10:02 AM11/26/18
to jenkinsc...@googlegroups.com

so it's not enough...

 

I'll try to go into more detail:
we are using pipeline jobs and in the job configuration we checkout the jenksfile
Branch: /master or */releases/
Additial Behaviours: Don't trigger a build on commit notifications

In the jenkinsfile we checkout several git repos
Branch: /master or */releases/
Additial Behaviours:

  • useSubfolder
  • includePath
  • excludePath
  • UserExclusion

we are not using the multibranch pipeline plugin

i saw also your answer in https://issues.jenkins-ci.org/browse/JENKINS-50683 and the entry in the docu
"In the event that Fast Remote Polling is detected as being not possible (branches to build contains wildcards, etc), polling will fallback to requiring a workspace."

it looks like my problem is exactly related to this behavior by using:

  • wildcard branch names (changing to origin/master and origin/release/branchname is no problem)
  • an exclude message or path definition
  • an include region definition
  • an excluded user definition

and since we delete the workspace every night, we get this behavior.

so due this facts it seems that atm frp is not possible for me. any idea how to handle this?

swtch3k@gmail.com (JIRA)

unread,
Nov 27, 2018, 2:23:01 AM11/27/18
to jenkinsc...@googlegroups.com

one detail more, we use also the additional behaviour : check out to specific local branch by using ** 

swtch3k@gmail.com (JIRA)

unread,
Nov 27, 2018, 2:51:02 AM11/27/18
to jenkinsc...@googlegroups.com
Cenk Tosun edited a comment on Bug JENKINS-52816
so it's not enough...

 

I'll try to go into more detail:
we are using pipeline jobs and in the job configuration we checkout the jenksfile
Branch: * * /master or */releases/*

Additial Behaviours: Don't trigger a build on commit notifications

In the jenkinsfile we checkout several git repos
Branch: * * /master or */releases/*
Additial Behaviours:


- useSubfolder
- includePath
- excludePath
- UserExclusion


we are not using the multibranch pipeline plugin

i saw also your answer in https://issues.jenkins-ci.org/browse/JENKINS-50683 and the entry in the docu
"In the event that Fast Remote Polling is detected as being not possible (branches to build contains wildcards, etc), polling will fallback to requiring a workspace."

it looks like my problem is exactly related to this behavior by using:
- wildcard branch names (changing to origin/master and origin/release/branchname is no problem)
- an exclude message or path definition
- an include region definition
- an excluded user definition


and since we delete the workspace every night, we get this behavior.

so due this facts it seems that atm frp is not possible for me. any idea how to handle this?

swtch3k@gmail.com (JIRA)

unread,
Nov 27, 2018, 3:17:02 AM11/27/18
to jenkinsc...@googlegroups.com
Cenk Tosun edited a comment on Bug JENKINS-52816
so it's not enough...

 

I'll try to go into more detail:
we are using pipeline jobs and in the job configuration we checkout the jenksfile
Branch: **/master or */releases/*

Additial Behaviours: Don't trigger a build on commit notifications

In the jenkinsfile we checkout several git repos
Branch: **/master or */releases/*

Additial Behaviours:
- useSubfolder
- includePath
- excludePath
- UserExclusion

{code:java}
     checkout([
        $class: 'GitSCM',
        branches: [[name: 'origin/master']],
        credentialsId: <credtials>,
        doGenerateSubmoduleConfigurations: false,
        extensions:
                [$class: 'LocalBranch', localBranch: **],
                [$class: 'ScmName', name: repoName],
                [$class: 'CloneOption', depth: cloneDepth, honorRefspec: true, noTags: false, reference: '', shallow: false],
                [$class: 'UserExclusion', excludedUsers: <excluded User>]
                [$class: 'PathRestriction', excludedRegions: <excludePath>, includedRegions: <includePath>]
                [$class: 'RelativeTargetDirectory', relativeTargetDir: item]
                only for one repo:
                  [$class: 'IgnoreNotifyCommit']
                  [$class: 'WipeWorkspace']
        submoduleCfg: [],
        userRemoteConfigs: [[url: <repoUrl>]]
      ])
{code}
we are not using the multibranch pipeline plugin

i saw also your answer in https://issues.jenkins-ci.org/browse/JENKINS-50683 and the entry in the docu
"In the event that Fast Remote Polling is detected as being not possible (branches to build contains wildcards, etc), polling will fallback to requiring a workspace."

it looks like my problem is exactly related to this behavior by using:
- wildcard branch names (changing to origin/master and origin/release/branchname is no problem)
- an exclude message or path definition
- an include region definition
- an excluded user definition

and since we delete the workspace every night, we get this behavior.

so due this facts it seems that atm frp is not possible for me. any idea how to handle this?

swtch3k@gmail.com (JIRA)

unread,
Nov 27, 2018, 3:35:02 AM11/27/18
to jenkinsc...@googlegroups.com
Cenk Tosun edited a comment on Bug JENKINS-52816
one detail more , we use also strange behavior. No change but two builds with the additional behaviour same git log
{code
: check out java}
Started on Nov 27, 2018 4:39:39 AM
Using strategy: Default
[poll] Last Built Revision: Revision fec1077f7d8b5a9b808abd0da6a84966ebe900df (refs/remotes/origin/master)
> git.exe --version # timeout=10
using GIT_SSH
to specific local branch set credentials
> git.exe ls-remote -h <gitUrl> # timeout=10
Found 21 remote heads on <gitUrl>
[poll] Latest remote head revision on refs/heads/master is: fec1077f7d8b5a9b808abd0da6a84966ebe900df - already built
by 186
no polling baseline in <buildworkspace>@libs\sharedLibrary on
Using strategy: Default
[poll] Last Built Revision: Revision b00d5f0ce8cbf798ff613ac61ec5ad28824afd6b (refs/remotes/origin/master)
Using strategy: Default
[poll] Last Built Revision: Revision fec1077f7d8b5a9b808abd0da6a84966ebe900df (refs/remotes/origin/master)
Using strategy: Default
[poll] Last Built Revision: Revision 4895bd129cdbd7678807c88f372fdc0b37295cee (refs/remotes/origin/master)
Done. Took 0.27 sec
Changes found                     Started on Nov 27, 2018 4:24:39 AM
Using strategy: Default
[poll] Last Built Revision: Revision fec1077f7d8b5a9b808abd0da6a84966ebe900df (refs/remotes/origin/master)
> git.exe --version # timeout=10
using ** GIT_SSH to set credentials
> git.exe ls-remote -h <gitUrl> # timeout=10
Found 21 remote heads on <gitUrl>
[poll] Latest remote head revision on refs/heads/master is: fec1077f7d8b5a9b808abd0da6a84966ebe900df - already built by 185
no polling baseline in <buildworkspace>@libs\sharedLibrary on
Using strategy: Default
[poll] Last Built Revision: Revision b00d5f0ce8cbf798ff613ac61ec5ad28824afd6b (refs/remotes/origin/master)
Using strategy: Default
[poll] Last Built Revision: Revision fec1077f7d8b5a9b808abd0da6a84966ebe900df (refs/remotes/origin/master)
Using strategy: Default
[poll] Last Built Revision: Revision 4895bd129cdbd7678807c88f372fdc0b37295cee (refs/remotes/origin/master)
Done. Took 0.26 sec
Changes found
{code}
 

 

swtch3k@gmail.com (JIRA)

unread,
Nov 27, 2018, 3:36:03 AM11/27/18
to jenkinsc...@googlegroups.com
Cenk Tosun edited a comment on Bug JENKINS-52816
so it's not enough...

 

I'll try to go into more detail:
we are using pipeline jobs and in the job configuration we checkout the jenksfile
Branch: **/master or */releases/*
Additial Behaviours: Don't trigger a build on commit notifications

In the jenkinsfile we checkout several git repos
Branch: **/master or */releases/*
Additial Behaviours:
- useSubfolder
- localBrach
-
includePath

swtch3k@gmail.com (JIRA)

unread,
Nov 27, 2018, 3:36:03 AM11/27/18
to jenkinsc...@googlegroups.com
Cenk Tosun edited a comment on Bug JENKINS-52816
one more strange behavior. No change but two builds with the same git log
{code:java}

Started on Nov 27, 2018 4:39:39 AM
Using strategy: Default
[poll] Last Built Revision: Revision fec1077f7d8b5a9b808abd0da6a84966ebe900df (refs/remotes/origin/master)
> git.exe --version # timeout=10
using GIT_SSH to set credentials

> git.exe ls-remote -h <gitUrl> # timeout=10
Found 21 remote heads on <gitUrl>
[poll] Latest remote head revision on refs/heads/master is: fec1077f7d8b5a9b808abd0da6a84966ebe900df - already built by 186
no polling baseline in <buildworkspace>@libs\sharedLibrary on
Using strategy: Default
[poll] Last Built Revision: Revision b00d5f0ce8cbf798ff613ac61ec5ad28824afd6b (refs/remotes/origin/master)
Using strategy: Default
[poll] Last Built Revision: Revision fec1077f7d8b5a9b808abd0da6a84966ebe900df (refs/remotes/origin/master)
Using strategy: Default
[poll] Last Built Revision: Revision 4895bd129cdbd7678807c88f372fdc0b37295cee (refs/remotes/origin/master)
Done. Took 0.27 sec
Changes found
                     Started on Nov 27, 2018 4:24:39 AM
Using strategy: Default
[poll] Last Built Revision: Revision fec1077f7d8b5a9b808abd0da6a84966ebe900df (refs/remotes/origin/master)
> git.exe --version # timeout=10
using GIT_SSH to set credentials

> git.exe ls-remote -h <gitUrl> # timeout=10
Found 21 remote heads on <gitUrl>
[poll] Latest remote head revision on refs/heads/master is: fec1077f7d8b5a9b808abd0da6a84966ebe900df - already built by 185
no polling baseline in <buildworkspace>@libs\sharedLibrary on
Using strategy: Default
[poll] Last Built Revision: Revision b00d5f0ce8cbf798ff613ac61ec5ad28824afd6b (refs/remotes/origin/master)
Using strategy: Default
[poll] Last Built Revision: Revision fec1077f7d8b5a9b808abd0da6a84966ebe900df (refs/remotes/origin/master)
Using strategy: Default
[poll] Last Built Revision: Revision 4895bd129cdbd7678807c88f372fdc0b37295cee (refs/remotes/origin/master)
Done. Took 0.26 sec
Changes found
{code}
 

 

swtch3k@gmail.com (JIRA)

unread,
Nov 27, 2018, 3:46:02 AM11/27/18
to jenkinsc...@googlegroups.com
  sometimes it seems to work and in the git log there are outputs like:

Ignored commit: <sha1> : No paths matched included region whitelist
Ignored commit: <sha1> : No paths matched included region whitelist

excluded user: <excludedUser>

and more and more often it just seems to miss out and fallback no no baseline found

changes found...

 

swtch3k@gmail.com (JIRA)

unread,
Nov 27, 2018, 3:47:01 AM11/27/18
to jenkinsc...@googlegroups.com
and more and more often it just seems to miss out and fallback to no no baseline found

changes found...

 

swtch3k@gmail.com (JIRA)

unread,
Nov 27, 2018, 4:08:02 AM11/27/18
to jenkinsc...@googlegroups.com
and more and more often it just seems to miss out and fallback to no baseline found

changes found...

{color:#de350b}*And one more critical infomartion:*{color}   the jobs run on a farm of various slaves using labels.

swtch3k@gmail.com (JIRA)

unread,
Nov 27, 2018, 7:59:02 AM11/27/18
to jenkinsc...@googlegroups.com
Cenk Tosun edited a comment on Bug JENKINS-52816
one more strange behavior , if the workspaces are missing . No change but two builds with the same identical git log
  sometimes it seems to work and in if the git log there workspaces are available, there is no problem and i get outputs like:


Ignored commit: <sha1> : No paths matched included region whitelist
Ignored commit: <sha1> : No paths matched included region whitelist

excluded user: <excludedUser>

and more and more often it just seems to miss out and fallback to no baseline found  

changes found...

{color:#de350b}*And one more critical infomartion additinal information :*{color} the jobs run on a farm of various slaves using labels. one common label

swtch3k@gmail.com (JIRA)

unread,
Nov 27, 2018, 3:20:02 PM11/27/18
to jenkinsc...@googlegroups.com
Cenk Tosun updated an issue
 
Change By: Cenk Tosun
Comment: one more strange behavior, if the workspaces are missing. No change but two builds with the identical git log
 if the workspaces are available, there is no problem and i get outputs like:


Ignored commit: <sha1> : No paths matched included region whitelist
Ignored commit: <sha1> : No paths matched included region whitelist

excluded user: <excludedUser>

 

{color:#de350b}*And one additinal information:*{color} the jobs run on a farm of various slaves using one common label

swtch3k@gmail.com (JIRA)

unread,
Nov 27, 2018, 3:22:03 PM11/27/18
to jenkinsc...@googlegroups.com
Cenk Tosun edited a comment on Bug JENKINS-52816
- we are not using the multibranch pipeline plugin

- most jobs run on slave farm using one common label

i saw also your answer in https://issues.jenkins-ci.org/browse/JENKINS-50683 and the entry in the docu
"In the event that Fast Remote Polling is detected as being not possible (branches to build contains wildcards, etc), polling will fallback to requiring a workspace."

it looks like my problem is exactly related to this behavior by using:
- wildcard branch names (changing to origin/master and origin/release/branchname is no problem)
- an exclude message or path definition
- an include region definition
- an excluded user definition

and since we delete the workspace every night, we get this behavior.

so due this facts it seems that atm frp is not possible for me. any idea how to handle this?

swtch3k@gmail.com (JIRA)

unread,
Nov 30, 2018, 9:44:03 AM11/30/18
to jenkinsc...@googlegroups.com

Mark Waite - I guess workspace polling always needs the same workspace and causes problems when the next build runs on a different slave, correct?

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

unread,
Dec 3, 2018, 11:46:02 AM12/3/18
to jenkinsc...@googlegroups.com

Cenk Tosun worspace polling for Freestyle jobs does not require the same workspace for each build. If a workspace does not exist on the agent performing the poll, then a complete workspace is created for it. I have not performed deep checks of the behavior of Pipelines (that are not multibranch) with workspace based polling.

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

unread,
Dec 3, 2018, 11:47:02 AM12/3/18
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-52816
[~swtch3k] worspace workspace polling for Freestyle jobs does not require the same workspace for each build.  If a workspace does not exist on the agent performing the poll, then a complete workspace is created for it.  I have not performed deep checks of the behavior of Pipelines (that are not multibranch) with workspace based polling.

swtch3k@gmail.com (JIRA)

unread,
Feb 14, 2019, 3:14:02 AM2/14/19
to jenkinsc...@googlegroups.com

update:

in the meantime i found the problem. the problem was that changes from the repo, from which we get the jenkinsfile, were not ignored even though the additional behavior "dont trigger a build on commit notification" was selected.

it's fatal to assume that everything that is available also have to work correctly. the polling log was not conclusive at this point, it differs for repos which are checkout out outside the pipeline definition.

 

--> i think the issue can be closed, no activity from the reporter

thomas.martitz@mailbox.org (JIRA)

unread,
Feb 22, 2019, 9:27:03 AM2/22/19
to jenkinsc...@googlegroups.com
Thomas M commented on Bug JENKINS-52816

I have the same problem. Cenk Tosun It sounds exactly as you describe. Do you have a solution or at least a workaround?

 

In fact, I believe the causing SCM is not the one providing the Jenkins file but the one that provides the pipeline library ("@Library") that the Jenkinsfile uses (in thise case both branches are on the same repository). But I may be wrong.

 

But the polling protocol does say "already built by XX" for scm polls that are explicitely mentioned in the groovy code so I don't think these are causing the rebuilds.

swtch3k@gmail.com (JIRA)

unread,
Feb 22, 2019, 4:03:03 PM2/22/19
to jenkinsc...@googlegroups.com

Hey Thomas M, my workaround was to add an additional behavior at the pipeline definition for the jenkinsfile, where i use ignore certain path with an inclusion of "ignoreRepo". If you believe the causing repo is the shared library, you have to look at the configuration via jenkins system configuration. Good luck!

 

 

swtch3k@gmail.com (JIRA)

unread,
Feb 22, 2019, 4:04:01 PM2/22/19
to jenkinsc...@googlegroups.com
Cenk Tosun edited a comment on Bug JENKINS-52816
Hey [~kugel], my workaround was to add an additional behavior at the pipeline definition for the jenkinsfile, where i use ignore certain path with an inclusion of "ignoreRepo". If you believe the causing repo is the shared library, you have to look at the configuration via in the jenkins system configuration. Good luck!

 

 

thomas.martitz@mailbox.org (JIRA)

unread,
Feb 26, 2019, 2:39:01 AM2/26/19
to jenkinsc...@googlegroups.com
Thomas M commented on Bug JENKINS-52816

Do you also use pipeline libraries? I tried your workaround on the job for the repo that pulls the Jenkinsfile, but the parent project (and the Jenkinsfile) specifies a pipeline library. For that library I cannot specifiy ignore patterns in the same way as for the Jenkinsfile itself.

mail@daniel-spilker.com (JIRA)

unread,
Mar 25, 2019, 5:05:05 PM3/25/19
to jenkinsc...@googlegroups.com
Change By: Daniel Spilker
Status: Open Fixed but Unreleased
Assignee: Daniel Spilker
Resolution: Cannot Reproduce

gdan2000@gmail.com (JIRA)

unread,
Aug 8, 2019, 7:36:03 AM8/8/19
to jenkinsc...@googlegroups.com
Gregory Danenberg commented on Bug JENKINS-52816
 
Re: scm poll triggers even there is no change in repository(bitbucket)

Hi

We have the same problem and did not find any solution so far.

We set polling in job settings while job itself is pipeline style.

Shared libraries defined with polling disabled.

And jobs randomly running even if there are no pushes to git.

Based on your experience, did you resolve problems you had?    

jaimishra.us@gmail.com (JIRA)

unread,
Oct 3, 2019, 10:16:11 AM10/3/19
to jenkinsc...@googlegroups.com

i have the same problem.Please let me know when are you planning to release this fix.

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

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

unread,
Oct 3, 2019, 11:24:02 AM10/3/19
to jenkinsc...@googlegroups.com

Jai Mishra no fix has been implemented. Cenk Tosun reported a workaround in an earlier comment. Are you absolutely certain after reading all the descriptions and comments that your issue is the same problem as described here? If so, does the workaround from Cenk Tosun also fix it for you?

jaimishra.us@gmail.com (JIRA)

unread,
Oct 7, 2019, 10:06:03 AM10/7/19
to jenkinsc...@googlegroups.com

Hi Mark Waite yes,only diff. is we are not triggering a pipeline but a simple job.

We have a scheduled job which runs every hr to check if there is a new commit if its there,it will trigger the build process.

This was working all fine with SVN, we recently moved to Bitbucket and we see this problem, even if there is no new commit ,build would trigger.

swtch3k@gmail.com (JIRA)

unread,
Oct 16, 2019, 4:23:03 PM10/16/19
to jenkinsc...@googlegroups.com

Hey, I have managed it in the meantime that the "fast remote polling" works again. Therefore my tip, eliminate  following extensions:

    • wildcard branch names (changing to origin/master and origin/release/branchname is no problem)
    • an exclude message or path definition
    • an include region definition
    • an excluded user definition

    That makes everything easier. No workaround needed.

    syaramada-c@scrippsnetworks.com (JIRA)

    unread,
    Oct 16, 2019, 4:36:02 PM10/16/19
    to jenkinsc...@googlegroups.com
    suryatej yaramada updated an issue
     
    Change By: suryatej yaramada
    Attachment: Screenshot from 2019-10-16 16-29-58.png

    syaramada-c@scrippsnetworks.com (JIRA)

    unread,
    Oct 16, 2019, 4:37:02 PM10/16/19
    to jenkinsc...@googlegroups.com
    suryatej yaramada commented on Bug JENKINS-52816
     
    Re: scm poll triggers even there is no change in repository(bitbucket)

    we have configured this in pipeline scm and we have SCM polling for every 15 minutes but still we seeing jobs are continuously rebuilding for every 15 min without change 

    syaramada-c@scrippsnetworks.com (JIRA)

    unread,
    Oct 16, 2019, 4:43:06 PM10/16/19
    to jenkinsc...@googlegroups.com
    suryatej yaramada updated an issue
    Change By: suryatej yaramada
    Attachment: Screenshot from 2019-10-16 16-42-12.png

    syaramada-c@scrippsnetworks.com (JIRA)

    unread,
    Oct 16, 2019, 4:43:07 PM10/16/19
    to jenkinsc...@googlegroups.com
     
    Re: scm poll triggers even there is no change in repository(bitbucket)

    what we found is we facing this situation when we create a branch in our shared pipeline repo.

    syaramada-c@scrippsnetworks.com (JIRA)

    unread,
    Oct 16, 2019, 4:49:02 PM10/16/19
    to jenkinsc...@googlegroups.com

    this issue is not yet resolve , I can walk you through steps if need to be reproduce , we trying to explore option for reverse proxy using smee but even it had issue with Bitbucket - https://github.com/probot/smee-client/issues/116  , we need to disable many jobs to not triggered. It will be really helpful if any work around or implementation to resolve this bug.

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

    unread,
    Oct 16, 2019, 5:10:06 PM10/16/19
    to jenkinsc...@googlegroups.com

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

    unread,
    Oct 16, 2019, 5:10:52 PM10/16/19
    to jenkinsc...@googlegroups.com
    Change By: Mark Waite
    Resolution: Cannot Reproduce
    Status: Fixed but Unreleased Reopened

    syaramada-c@scrippsnetworks.com (JIRA)

    unread,
    Oct 16, 2019, 5:21:02 PM10/16/19
    to jenkinsc...@googlegroups.com
     
    Re: scm poll triggers even there is no change in repository(bitbucket)

    Using strategy: Default
    [poll] Last Built Revision: Revision 6717866352d0d5a5e9b41da88a799993ab1d4191 (origin/master)
    No credentials specified
    > git --version # timeout=10
    > git ls-remote -h g...@bitbucket.org:xx/test # timeout=10
    Found 3 remote heads on g...@bitbucket.org:xxx/test
    [poll] Latest remote head revision on refs/heads/master is: 6717866352d0d5a5e9b41da88a799993ab1d4191 - already built by 97
    Using strategy: Specific revision
    [poll] Last Built Revision: Revision a7cf4fd0c7484765c4a5166a36613c387aee8501 (surya/MCDCA-1412-ECR-NEW-ACCOUNT)
    No credentials specified
    > git --version # timeout=10
    > git ls-remote -h g...@bitbucket.org:xxx/shared # timeout=10
    Found 3 remote heads on g...@bitbucket.org:xxx/shared
    [poll] Latest remote head revision on refs/heads/surya/MCDCA-1412-ECR-NEW-ACCOUNT is: ab8eb071afb815bca04fd4e50a991ae54ea37e8c
    Using strategy: Default
    [poll] Last Built Revision: Revision 6717866352d0d5a5e9b41da88a799993ab1d4191 (origin/master)
    using credential 6e83116e-4fb6-491a-a2c9-9ac9d51d4765
    > git --version # timeout=10


    using GIT_SSH to set credentials

    > git ls-remote -h g...@bitbucket.org:xxx/test # timeout=10
    Found 3 remote heads on g...@bitbucket.org:xxx/test
    [poll] Latest remote head revision on refs/heads/master is: 6717866352d0d5a5e9b41da88a799993ab1d4191 - already built by 97
    Done. Took 8.6 sec
    Changes found

     

     

    This is what we seeing in polling log , if you observer I created a branch in shared repo , then test repo which builts in 97 again triggered as it found changes and rebuilding many times so we need to disable and enable job whenever needed.

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

    unread,
    Oct 16, 2019, 5:23:05 PM10/16/19
    to jenkinsc...@googlegroups.com

    suryatej yaramada if you can walk through the steps to reproduce it, then it seems like you can also provide those steps as a numbered sequence of detailed instructions written into this issue report so that someone else can use those detailed instructions to duplicate the problem. Please provide that numbered set of steps so that someone else could work on the problem without needing to make guesses about the steps.

    Many times when I've tried to make guesses about the steps to duplicate the problem, I've wasted many hours investigating things that the original author of the issue report could have clarified initially. You're trying to persuade

    The current descriptions in this issue report seem to be from several different people, with at least one finding a workaround and another saying "I have the same problem" but providing no additional detail. Your description does not have enough detail to duplicate the problem. Cenk Tosun describes in much greater detail but then states that a workaround has been found. You then say that the issue is not resolved, which I assume means that your specific details are different than those provided by Cenk Tosun .

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

    unread,
    Oct 16, 2019, 5:25:04 PM10/16/19
    to jenkinsc...@googlegroups.com
    Mark Waite edited a comment on Bug JENKINS-52816
    [~yrsurya] if you can walk through the steps to reproduce it, then it seems like you can also provide those steps as a numbered sequence of detailed instructions written into this issue report so that someone else can use those detailed instructions to duplicate the problem.  Please provide that numbered set of steps so that someone else could work on the problem without needing to make guesses about the steps.


    Many times when I've tried to make guesses about the steps to duplicate the problem, I've wasted many hours investigating things that the original author of the issue report could have clarified initially.
      You're trying to persuade


    The current descriptions in this issue report seem to be from several different people, with at least one finding a workaround and another saying "I have the same problem" but providing no additional detail.  Your description does not have enough detail to duplicate the problem.  [~swtch3k] describes in much greater detail but then states that a workaround has been found.  You then say that the issue is not resolved, which I assume means that your specific details are different than those provided by  [~swtch3k] .

    syaramada-c@scrippsnetworks.com (JIRA)

    unread,
    Oct 16, 2019, 5:27:04 PM10/16/19
    to jenkinsc...@googlegroups.com
    suryatej yaramada updated an issue
    Change By: suryatej yaramada
    Environment: we are using Jenkins LTS 2. 121 176 . 2 3 on hosted on amazonlinux , recently we downgraded job-dsl plugin to 1.69 as it had few components deprecated which we are using , job - dsl - 1. 69 74 , git plugin - 3 4 . 9 0 . 1 0-rc

    syaramada-c@scrippsnetworks.com (JIRA)

    unread,
    Oct 16, 2019, 5:31:03 PM10/16/19
    to jenkinsc...@googlegroups.com

    thomas.martitz@mailbox.org (JIRA)

    unread,
    Oct 16, 2019, 5:48:03 PM10/16/19
    to jenkinsc...@googlegroups.com
    Thomas M commented on Bug JENKINS-52816

    Mark Waite We found that most proably shared pipeline libraries cause the rebuilds. Can you rule this out?

    syaramada-c@scrippsnetworks.com (JIRA)

    unread,
    Oct 16, 2019, 5:53:03 PM10/16/19
    to jenkinsc...@googlegroups.com
    suryatej yaramada updated an issue
    Change By: suryatej yaramada
    we are using dsl jobs to  step 1: create jobs for scripted pipelines and had this function a seed job  
    ```
    String basepath = 'Common/Java/testapp'

    String giturl = 'g...@bitbucket.org:abc/testapp'

    pipelineJob("$basepath/1.Build-Dev-Int") {
    logRotator {
    numToKeep(10)
    artifactNumToKeep(10)
    }
    parameters {
    stringParam('USE_GIT_BRANCH', 'master')
    }
    throttleConcurrentBuilds {
    maxTotal(1)
    }

    triggers {
    scm('H/
    10 15 * * * *')
    }

    definition {
    cpsScm {
    scm {
    git{
    remote \{ url(giturl) }
    branches('master')
    extensions \{ }
    }
    scriptPath('pipeline/pipeline_dev_int.groovy')
    }
    }
    }
    }```
    step 2 : create pipeline_dev_int.groovy

    ```@Library('sharedlibrary@master')

    node()

    remaining groovy script```
     

    step 3:  !Screenshot from 2019-10-16 16-42-12.png|thumbnail!    configured shared library in manage jenkins
    even though there is no change in repo it is triggering jobs , we are  
     

     

    whenever a branch/ commit made to the shared library even though there is no change in testapp repo it triggering the job for every 15 min and found this in polling history


    Using strategy: Default
    [poll] Last Built Revision: Revision 6717866352d0d5a5e9b41da88a799993ab1d4191 (origin/master)
    No credentials specified
    > git --version # timeout=10
    > git ls-remote -h [g...@bitbucket.org|mailto:g...@bitbucket.org]:abc/testapp # timeout=10
    Found 3 remote heads on [g...@bitbucket.org|mailto:g...@bitbucket.org]:abc/testapp

    [poll] Latest remote head revision on refs/heads/master is: 6717866352d0d5a5e9b41da88a799993ab1d4191 - already built by 97
    Using strategy: Specific revision
    [poll] Last Built Revision: Revision a7cf4fd0c7484765c4a5166a36613c387aee8501 (surya/MCDCA-1412-ECR-NEW-ACCOUNT)
    No credentials specified
    > git --version # timeout=10
    > git ls-remote -h [g...@bitbucket.org|mailto:g...@bitbucket.org]:abc/sharedlibrary # timeout=10
    Found 3 remote heads on [g...@bitbucket.org|mailto:g...@bitbucket.org]:abc/sharedlibrary

    [poll] Latest remote head revision on refs/heads/surya/MCDCA-1412-ECR-NEW-ACCOUNT is: ab8eb071afb815bca04fd4e50a991ae54ea37e8c
    Using strategy: Default
    [poll] Last Built Revision: Revision 6717866352d0d5a5e9b41da88a799993ab1d4191 (origin/master)
    using ecs executors credential 6e83116e-4fb6-491a-a2c9-9ac9d51d4765
    > git --version # timeout=10
    using GIT_SSH to set credentials
    > git ls-remote -h   [g...@bitbucket.org|mailto:g...@bitbucket.org]:abc/testapp # timeout=10
    Found 3 remote heads on [g...@bitbucket.org|mailto:g...@bitbucket.org]:abc/testapp

    [poll] Latest remote head revision on refs/heads/master is: 6717866352d0d5a5e9b41da88a799993ab1d4191 - already built by 97
    Done. Took 8.6 sec
    Changes found
    h1. Polling Log

    This page captures the polling log that triggered this build.
    Started on Jul 30, 2018 7:15:00 PM Using strategy: Default [poll] Last Built Revision: Revision 80ae1a7997f138af5faa0e594eca7e88eb174026 (origin/master) > git --version # timeout=10 > git ls-remote -h g...@bitbucket.org:xxx/xxxxxxx # timeout=10 Found 1 remote heads on g...@bitbucket.org:xx/xxxxxx[poll] Latest remote head revision on refs/heads/master is: 80ae1a7997f138af5faa0e594eca7e88eb174026 - already built by 185 no polling baseline in /var/lib/jenkins/workspace/Sandbox/xxxx/xxxx/1.Build-Dev-Int@libs/xxx on Using strategy: Default > git --version # timeout=10 using GIT_SSH to set credentials Bitbucket SSH Key > git ls-remote -h g...@bitbucket.org:xxxxx.git # timeout=10 Found 1 remote heads on g...@bitbucket.org:xx/xxxx.git [poll] Latest remote head revision on refs/heads/master is: 80ae1a7997f138af5faa0e594eca7e88eb174026 Done. Took 2.7 sec Changes found

    syaramada-c@scrippsnetworks.com (JIRA)

    unread,
    Oct 17, 2019, 10:33:03 AM10/17/19
    to jenkinsc...@googlegroups.com
    suryatej yaramada commented on Bug JENKINS-52816
     
    Re: scm poll triggers even there is no change in repository(bitbucket)

    Mark Waite  updated description with the steps to reproduce , please let me know if need more details.

    syaramada-c@scrippsnetworks.com (JIRA)

    unread,
    Oct 17, 2019, 5:37:03 PM10/17/19
    to jenkinsc...@googlegroups.com

    Here is latest Polling change that we seeing rebuilds for every 10 min

     

    Git Polling Log

    Started on Oct 17, 2019 9:22:07 PM Using strategy: Default [poll] Last Built Revision: Revision 9af93c1a4cf6e2e8a625ee7898dcfdb2339acbc6 (origin/master) No credentials specified > git --version # timeout=10 > git ls-remote -h g...@bitbucket.org:abc/testapp # timeout=10 Found 3 remote heads on g...@bitbucket.org:abc/testapp [poll] Latest remote head revision on refs/heads/master is: 9af93c1a4cf6e2e8a625ee7898dcfdb2339acbc6 - already built by 161 Using strategy: Specific revision [poll] Last Built Revision: Revision a7cf4fd0c7484765c4a5166a36613c387aee8501 (master) No credentials specified > git --version # timeout=10 > git ls-remote -h g...@bitbucket.org:abc/shared # timeout=10 Found 3 remote heads on g...@bitbucket.org:abc/shared [poll] Latest remote head revision on refs/heads/master is: 019f70307c622c80ac33b168e7c5dc134aa5d02a Using strategy: Default [poll] Last Built Revision: Revision 9af93c1a4cf6e2e8a625ee7898dcfdb2339acbc6 (origin/master) using credential 6e83116e-4fb6-491a-a2c9-9ac9d51d4765 > git --version # timeout=10 using GIT_SSH to set credentials > git ls-remote -h g...@bitbucket.org:abc/testapp # timeout=10 Found 3 remote heads on g...@bitbucket.org:abc/testapp [poll] Latest remote head revision on refs/heads/master is: 9af93c1a4cf6e2e8a625ee7898dcfdb2339acbc6 - already built by 161 Done. Took 3.1 sec Changes found  

    we didn't have any commits to shared library just we had few open branches

    swtch3k@gmail.com (JIRA)

    unread,
    Oct 18, 2019, 4:52:03 PM10/18/19
    to jenkinsc...@googlegroups.com

    Hi suryatej yaramada you could exclude the shared library and check if this is really the reason for the rebuilds.         I would also advise you to add the remote name to the branch specifier instead of using only the branch name.

    If the cause is really the shared library, you could test the following:
    adjust the Global Pipeline Library definition and choose legancy scm instead of mordern scm. There you have the option where you can add the additional behavior, 'Polling ignore commits of certain path'. When selected enter "ignoreRepo" under Included Region and save.

     

    thomas.martitz@mailbox.org (JIRA)

    unread,
    Oct 25, 2019, 6:37:03 AM10/25/19
    to jenkinsc...@googlegroups.com
    Thomas M commented on Bug JENKINS-52816

    Cenk Tosun your workaround (changing to legacy scm and effectively ignoring all commits there) seems effective, thanks! It means that we cannot trigger on pipeline library changes but that's good enough for now.

    Now, does that point to a defect in the modern scm method? That ought to be fixed, right? I got the feeling that "legacy scm" is somewhat half-deprecated and might be removed in the future.

    Reply all
    Reply to author
    Forward
    0 new messages