Two jobs that never shall build if the other one builds

34 views
Skip to first unread message

tps800

unread,
May 19, 2015, 1:58:01 PM5/19/15
to jenkins...@googlegroups.com
Hi!

I'm having two jobs each one depends on the other and shall never build while the other one builds. Both are independend of each other except they are using the result of each:

- cmake blocks building of llvm
- llvm blocks building of cmake

I've entered cmake as blocker in llvm, and llvm as blocker in cmake. Worked fine, until I managed to set jenkins up to compile FreeBSD_{8,9,10,current} -- really long lasting jobs taking from 3 to 7 hours to finish. Now I ended up with cmake *and* llvm in the job queue. No problem so far I thought, but: both do not run, because cmake is annotated as being blocked by llvm and llvm is being blocked by cmake.

Is this a bug with "Build Blocker Plugin" (https://wiki.jenkins-ci.org/display/JENKINS/Build+Blocker+Plugin) or is this intentional. I interpreted "[...] blocking jobs by their names in the list of currently running builds [...]" as only considering running builds, not builds which are in the queue to be run. In this case this would be a bug within this plugin.

-- 
Thomas

Baptiste Mathus

unread,
May 19, 2015, 3:58:12 PM5/19/15
to jenkins...@googlegroups.com

Better use the throttle concurrent build plugin IMO. Works fine for us:

Define a central token. Then configure both job to "acquire" it when starting. Done. Both jobs won't run at the same time.

Cheers

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/36f5d31e-2800-42f7-ae71-97ccd274331d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

tps800

unread,
May 21, 2015, 6:57:17 AM5/21/15
to jenkins...@googlegroups.com
Yes, this is a bug within "Build Blocker Plugin". It takes the queue and running jobs into account, fastly leading to a deadlock if all slots are occupied. "Build Blocker Plugin" would only have to take RUNNING jobs into account, ignoring queued jobs.

Any idea where to put this bug report for "Build Blocker Plugin"?

-- 
Thomas

tps800

unread,
May 21, 2015, 6:59:19 AM5/21/15
to jenkins...@googlegroups.com, m...@batmat.net


On Tuesday, May 19, 2015 at 5:58:12 PM UTC+2, Baptiste Mathus wrote:

Better use the throttle concurrent build plugin IMO. Works fine for us:

Define a central token. Then configure both job to "acquire" it when starting. Done. Both jobs won't run at the same time.

This plugin isn't as easy to handle (you've to create a central token) but works as expected, not creating a deadlock if both jobs are queued, but not running, because of all slots occupied.

-- 
Thomas

Baptiste Mathus

unread,
May 21, 2015, 3:56:40 PM5/21/15
to jenkins...@googlegroups.com


Le 21 mai 2015 8:59 AM, "tps800" <t...@vr-web.de> a écrit :
>
> On Tuesday, May 19, 2015 at 5:58:12 PM UTC+2, Baptiste Mathus wrote:
>>
>> Better use the throttle concurrent build plugin IMO. Works fine for us:
>>
>> Define a central token. Then configure both job to "acquire" it when starting. Done. Both jobs won't run at the same time.
>
> This plugin isn't as easy to handle (you've to create a central token)

Yes that's indeed the only impediment we have identified with this plugin: requiring to be admin to create a token is overkill.

We (software factory admins) would like to propose an improvement PR about this, but not top priority at the moment...

Cheers
-- Baptiste

Marcus Semblano

unread,
May 21, 2015, 4:52:55 PM5/21/15
to jenkins...@googlegroups.com
Would Locks and Latches (https://wiki.jenkins-ci.org/display/JENKINS/Locks+and+Latches+plugin) work for you?

Marcus Semblano


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

Baptiste Mathus

unread,
May 21, 2015, 8:21:27 PM5/21/15
to jenkins...@googlegroups.com
The thing is: Locks & Latches is subject to deprecation, and Throttle Concurrent Builds is recommended as an alternative.

Cheers


For more options, visit https://groups.google.com/d/optout.



--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !
Reply all
Reply to author
Forward
0 new messages