#2539: setting branch to a property in a Git step causes a TypeError
--------------------+-----------------------
Reporter: dickon | Owner:
Type: defect | Status: new
Priority: major | Milestone: undecided
Version: 0.8.7p1 | Keywords:
--------------------+-----------------------
I got a TypeError exception out of buildbot/steps/source/git.py since I
was specifying a Property instance for the branch constructor parameter.
The relevant part of my config was:
fbuild.addStep(Git(name='checkout build-scripts',workdir='build/build-
scripts',
repourl=Interpolate('%(prop:git_base)s/xenclient/build-
scripts.git'),
branch=Property('tag'), alwaysUseLatest=True,
progress=True))
I worked around this by subclassing Git and setting
renderables=['repourl', 'branch']. The Git class only has
renderables=['repourl']. At the time of writing:
https://github.com/buildbot/buildbot/blob/master/master/buildbot/steps/source/git.py:
renderables = [ "repourl", "reference"]
The backtrace is below:
<type 'exceptions.TypeError'>: sequence item 2: expected string, list
found
/usr/lib/python2.6/dist-packages/twisted/internet/defer.py, line 893 in
_inlineCallbacks
891 result = result.throwExceptionIntoGenerator(g)
892 else:
893 result = g.send(result)
894 except StopIteration:
Locals
result False
g <generator object incremental at 0x31be410>
/usr/local/lib/python2.6/dist-packages/buildbot/steps/source/git.py, line
171 in incremental
169 # if not updateable, do a full checkout
170 if not updatable:
171 yield self._doFull()
172 return
Locals
self <buildbot.steps.source.git.Git object at 0x31c5a90>
updatable False
/usr/local/lib/python2.6/dist-packages/buildbot/steps/source/git.py, line
393 in _doFull
391
392 def _doFull(self):
393 d = self._full()
394 def clobber(res):
Locals
self <buildbot.steps.source.git.Git object at 0x31c5a90>
/usr/local/lib/python2.6/dist-packages/buildbot/steps/source/git.py, line
378 in _full
376 command.append('--progress')
377
378 d = self._dovccmd(command, not self.clobberOnFailure)
379 # If revision specified checkout that revision
Self
clobberOnFailure False
Locals
self <buildbot.steps.source.git.Git object at 0x31c5a90>
command List instance @ 0x31c42d8
'clone'
'--branch'
List instance @ 0x308ac68
buildbot.process.properties.Property instance @ 0x308d170
<buildbot.process.properties.Property instance at 0x308d170>
'git://git.xci-test.com/xenclient/build-scripts.git'
'.'
'--progress'
/usr/local/lib/python2.6/dist-packages/buildbot/steps/source/git.py, line
301 in _dovccmd
299 initialStdin=initialStdin)
300 cmd.useLog(self.stdio_log, False)
301 log.msg("Starting git command : git %s" % (" ".join(command), ))
302 d = self.runCommand(cmd)
Self
stdio_log
buildbot.status.logfile.LogFile instance @ 0x31d09e0
<buildbot.status.logfile.LogFile instance at 0x31d09e0>
Locals
command List instance @ 0x31c42d8
'clone'
'--branch'
List instance @ 0x308ac68
buildbot.process.properties.Property instance @ 0x308d170
<buildbot.process.properties.Property instance at 0x308d170>
'git://git.xci-test.com/xenclient/build-scripts.git'
'.'
'--progress'
initialStdin None
self <buildbot.steps.source.git.Git object at 0x31c5a90>
cmd
buildbot.process.buildstep.RemoteShellCommand instance @ 0x31cb7e8
<RemoteShellCommand '['git', 'clone', '--branch',
[<buildbot.process.properties.Property instance at 0x308d170>], 'git://git
.xci-test.com/xenclient/build-scripts.git', '.', '--progress']'>
Globals
log <module 'twisted.python.log' from '/usr/lib/python2.6/dist-
packages/twisted/python/log.pyc'>
<type 'exceptions.TypeError'>: sequence item 2: expected string, list
found
--
Ticket URL: <http://trac.buildbot.net/ticket/2539>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Buildbot-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/buildbot-commits