Jump to content

Jenkins build jobs often trigger twice


Mikael Kalms

Recommended Posts

Hi,

we have used Jenkins for about half a year with Plastic SCM now. We have our main project set up to check Plastic for changes every 2 minutes.

It detects when there are new changesets, but, after each such change it usually does an additional build even though there are no new changes in the Plastic repository. Sometimes it is zero, sometimes more than one, but one addtional is the typical count.

Here is an example of what our build history looked like for a while today:

image.thumb.png.c5eb61c8c722f0ffc04cb08c7c14b9d1.png

 

All those builds labelled "Started by an SCM change" are caused by either a bug in Jenkins or a problem in the Plastic SCM plugin.

 

Now when I have been reading up on it, I suspect the problem is within the Plastic SCM plugin. Here is a description of why a similar symptom for someone using Subversion is a problem specific to the Subversion plugin.

 

Does anyone know of a solution?

If not, is someone from Codice Software interested in debugging this together with me over the next few weeks? (If so, drop me a mail)

Link to comment
Share on other sites

Hi Mikael,

I will review the code in order to see why this can happen. The subversion issue could  be a nice clue.

I will let you know when I see something or if I need more help debugging the issue.

Thank you for the report.

Rubén.

Link to comment
Share on other sites

I reviewed the plastic plugin + jenkins poolling code and I didn't see how this extra build can be started.

Indeed, I forced some plastic exception during  the pool process but the build was not started.

I reviewed the code and performed the tests with the 2.111 version of jenkins.

Please, could you tell me which jenkins version are you using? Thus, I can try it with your exact version.

Link to comment
Share on other sites

Thanks for looking into this.

I am running Jenkins 2.109, with PlasticSCM plugin 2.10.

My test configuration is one machine that runs the Jenkins master (Ubuntu 16.04.4 LTS) with cm 7.0.16.1912, plus one Jenkins build agent (Windows Server 2016) with cm 6.0.16.1765. (I will upgrade it to 7.0.16.2047 shortly.)

The build jobs I run are Pipeline jobs that are set to "Pipeline script from SCM". The Jenkinsfile is written in Declarative Pipeline syntax. The Plastic workspace is ~4.5GB in size. Let me know if you need a smaller repro case, or want me to activate extra logging on our system, or anything else.

Link to comment
Share on other sites

Hi Mikael, 

Thank you for the detailed info you sent us.

As far as I could see, Git also has issues with the duplicated builds. There is an open issue that exactly matches your scenario:

https://issues.jenkins-ci.org/browse/JENKINS-30350

It seem it happens with other SCM's too.

However, after reviewing the Plastic plugin code, I think that we can reduce these duplicated builds. So, I will notify you when the change is ready in case you want to try it .

Does it sound good for you?

And thank you again for your superb feedback!!

Link to comment
Share on other sites

Hi Mikael,

It is available the version 2.11 of the plastic plugin.

Please, tell us if you see reduced the number of these duplicated builds after upgrading the plastic plugin.

We continue improving the jenkins plugin based on your feedback :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...