AssertionError in collective.buildbot-0.4.1

10 views
Skip to first unread message

nutjob

unread,
Jun 17, 2010, 10:41:51 AM6/17/10
to collective.buildbot
My Buildbot setup with collective.buildbot-0.4.1 is failing assertions
when using dependent schedules. The failed assertion is in line 342 of
collecitve/buildbot/__init__.py::

if self.svnurl:
if branch:
assert self.svnurl.endswith(branch)

The svnurl points to a dependent project, while the branch points to
the project that got updated.

To Reproduce
------------

1. Create two projects::

svn mkdir http://my.repo/test.proj http://my.repo/test.proj/{tags,trunk,branches}
svn mkdir http://my.repo/dep.proj http://my.repo/dep.proj/{tags,trunk,branches}

2. Create a Buildbot Buildout environment::

curl -LO 'http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/
bootstrap.py'
cat >buildout.cfg <<EOF
[buildout]
parts =
buildmaster
buildpoller
buildslave
test.proj
dep.proj
[buildmaster]
recipe = collective.buildbot:master
slaves = buildslave password
[buildpoller]
recipe = collective.buildbot:poller
poll-interval = 60
repositories = http://my.repo/
[buildslave]
recipe = collective.buildbot:slave
password = password
[test.proj]
recipe = collective.buildbot:project
dependent-scheduler = dep.proj
slave-names = buildslave
repositories = http://my.repo/test.proj/trunk
test-sequence = /bin/true
build-sequence = /bin/true
[dep.proj]
recipe = collective.buildbot:project
slave-names = buildslave
repositories = http://my.repo/dep.proj/trunk
test-sequence = /bin/true
build-sequence = /bin/true
EOF
python bootstrap.py -d
bin/buildout
bin/buildmaster start
bin/buildslave start

3. Create an update in dep.proj::

touch source.c
svn ci -m 'tickle buildbot' source.c

4. Assertion fails in buildmaster's parts/buildmaster/twistd.log; also
visible in web interface. No build occurs due to 'svn error' in web
interface::

2010-06-17 07:01:13-0700 [Broker,0,127.0.0.1] Unhandled Error
Traceback (most recent call last):
File "/usr/local/buildbot/eggs/buildbot-0.7.12-py2.5.egg/
buildbot/process/buildstep.py", line 715, in startStep
d.addCallback(self._startStep_2)
File "/usr/local/buildbot/eggs/Twisted-10.0.0-py2.5-linux-
x86_64.egg/twisted/internet/defer.py", line 224, in addCallback
callbackKeywords=kw)
File "/usr/local/buildbot/eggs/Twisted-10.0.0-py2.5-linux-
x86_64.egg/twisted/internet/defer.py", line 213, in addCallbacks
self._runCallbacks()
File "/usr/local/buildbot/eggs/Twisted-10.0.0-py2.5-linux-
x86_64.egg/twisted/internet/defer.py", line 371, in _runCallbacks
self.result = callback(self.result, *args, **kw)
--- <exception caught here> ---
File "/usr/local/buildbot/eggs/buildbot-0.7.12-py2.5.egg/
buildbot/process/buildstep.py", line 746, in _startStep_2
skip = self.start()
File "/usr/local/buildbot/eggs/buildbot-0.7.12-py2.5.egg/
buildbot/steps/source.py", line 190, in start
self.startVC(branch, revision, patch)
File "/usr/local/buildbot/eggs/collective.buildbot-0.4.1-
py2.5.egg/collective/buildbot/__init__.py", line 344, in SVNStep_
startVC
assert self.svnurl.endswith(branch)
exceptions.AssertionError

In this example, self.svnurl = 'http://my.repo/test.proj/trunk', while
branch = 'dep.proj/trunk'.

Workaround
----------

In buildout.cfg, pin collective.buildbot to 0.3.5 and buildbot to
0.7.11. (That reminds me, collective.buildbot should declare a version
number for its buildbot dependency in setup.py; as of this writing,
0.4.1 is most decidedly *not* compatible with the latest
buildbot-0.8.0.)

Otherwise, thanks for providing collective.buildbot!
Reply all
Reply to author
Forward
0 new messages