On Fri, Aug 8, 2014 at 6:00 AM, Vincent Latombe
<[email protected]> wrote:
> I think the setting 'Block build when upstream project is building' should
> be taken into consideration when evaluating this trigger.

Interesting point, but not so simple. That setting
(AbstractProject.blockBuildWhenUpstreamBuilding) is not normally used
to prevent the downstream build from being triggered, i.e., added to
the queue. Rather, it adds a cause of blockage
(BecauseOfUpstreamBuildInProgress) which stops the queue item from
getting scheduled until the upstream finishes.

In the case of MavenModuleDependency.shouldTriggerBuild, if
areUpstreamsBuilding is true (*), the downstream build is not even
triggered. So the downstream job will not be scheduled until
intermediate upstreams are quiet for a while, which is the problem.
Perhaps the effect is the same as blockBuildWhenUpstreamBuilding for a
freestyle project, except that the downstream is not even shown in the
queue, much less scheduled.

Should areUpstreamsBuilding simply be removed, and
blockBuildWhenUpstreamBuilding used to control this behavior instead?
Note that blockBuildWhenUpstreamBuilding is off by default, so this
would be a behavioral change during upgrade.

Or should Nicolas’ more complex condition be used, that the upstream
builds are checked to see if they actually align somehow with this
build? I am not sure what the exact logic should be here, since there
could be arbitrarily complex (though one would hope acyclic!)
dependency graphs in use.


(*) This has logic similar to, but not identical to,
AbstractProject.getBuildingUpstream.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to