1

Buildbot 0.8.8

Configuration for the poller:

c['change_source'].append(GitPoller(
        repourl='git@git:chip_b',
        branches=['master','A7.0.0'],
        project='chip-b',
        pollinterval=100))
c['change_source'].append(GitPoller(
        repourl='git@git:chip_c',
        branches=['master','A7.0.0'],
        project='chip-b',
        pollinterval=100))

I expect this code to poll the two repositories every 100 seconds, both branches, and run some code using the scheduler:

c['schedulers'].append(SingleBranchScheduler(
                            name="sanity_chip-b",
                            change_filter=filter.ChangeFilter(project=['chip-b'], branch='master'),
                            treeStableTimer=300,
                            fileIsImportant=imp_files_for_sanity,
                            builderNames=["runsanity-top"]))

But I get this error:

2014-09-17 18:41:19-0700 [-] /home/buildbot/buildbot/local/lib/python2.7/site-packages/twisted/internet/utils.py:25: exceptions.DeprecationWarning: Argument strings and environment keys/values passed to reactor.spawnProcess should be str, not unicode.
2014-09-17 18:41:19-0700 [-] gitpoller: processing 0 changes: [] from "git@git:chip_c"

And no detected changes. However, I know that there were changes done.

Is the poller code correct? We just upgraded from 0.8.6 to 0.8.8 so there may be some upgrade changes. Can the poller do the poll for both branches into the same working directory?

Thanks so much.

ilya1725
  • 4,496
  • 7
  • 43
  • 68
  • There is a ticket on buildbot trac [2464](http://trac.buildbot.net/ticket/2464). Try running `git update-server-info` on the server (as suggested in the ticket) or wait for the next release ! – sk11 Sep 18 '14 at 09:02
  • @sk11, that's a different error than what the poster is seeing. And the "error" is not actually an error -- it's a deprecation warning. Different GitPollers should be using different directories; if they're sharing a directory that may explain what you're seeing. – djmitche Oct 04 '14 at 13:24

1 Answers1

1

The scheduler only sees changes in the master branch. In addition to using separate schedulers for the two GitPollers, try this:

def sanity_branch_fn(branch):
    return branch in ['master','A7.0.0']

c['schedulers'].append(SingleBranchScheduler(
                       name="sanity_chip-b",
                       change_filter=filter.ChangeFilter(project=['chip-b'], branch_fn=sanity_branch_fn),
                       treeStableTimer=300,
                       fileIsImportant=imp_files_for_sanity,
                       builderNames=["runsanity-top"]))
groeck
  • 11
  • 1