[users at bb.net] Branch and revision flow

Linus Arver linusarver at gmail.com
Fri Jul 14 18:54:56 UTC 2017


On Fri, Jul 14, 2017 at 10:38:43AM +0200, Paulo Matos wrote:
> Hi,
> 
> In 0.9.9post2 (which might work in this respect as previous versions)
> there's still something I don't quite get...
> 
> Assume I have a very popular project to test, with regular commits to
> several branches. A change source is triggered for branch master because
> of new revision abc. This triggers the scheduler which schedules a build
> and starts a series of steps, one of which is a steps.Git.

For some background, the change sources (e.g., changes.GitPoller)
determine what revisions get saved in buildbot's database of all
changes. It is now up to the scheduler to say whether or not to start a
build from these detected changes. For myself I have

    changes.GitPoller(..., branches=True, ...)

so that my buildbot detects all changes on _all_ branches for my repo.
But my scheduler (AnyBranchScheduler) is limited with a
util.ChangeFilter like this:

    util.ChangeFilter(branch_re=re.compile("foo|bar"))

. So only the branches that match "foo" or "bar" get built.

> At this point, how does steps.Git know which branch/revision to
> checkout? I want to checkout the exact revision which caused change
> source to trigger the scheduler, not the latest one. Is the
> branch/revision somehow passed down the chain behind the scenes or do I
> have to same it somehow as a property?

The decision to build the latest commit (or rather, the method in which
buildbot decides _which_ revision to build) is determined by the
treeStableTimer [1]. You might also want to grep "collapseRequests"
field [2]. Since the first "point of entry" for builds is the change
source, the rate at which you poll your git repo ("pollinterval" key for
GitPoller) also plays a role.

HTH,
Linus

[1]: http://docs.buildbot.net/current/manual/cfg-schedulers.html#anybranchscheduler
[2]: http://docs.buildbot.net/latest/manual/cfg-builders.html#collapsing-build-requests

> 
> Thanks,
> 
> -- 
> Paulo Matos
> _______________________________________________
> users mailing list
> users at buildbot.net
> https://lists.buildbot.net/mailman/listinfo/users


More information about the users mailing list