[Buildbot-devel] Git's retry doesn't work.
Chen Yingliu
chenyingliu at gmail.com
Tue Nov 20 05:51:24 UTC 2012
First time post here :)
I have used BuildStep's retry parameter, and it works fine with Repo, but
not for Git
I check the source code at
buildbot/slave/buildslave/commands/git.py
And I found the following line:
def _dovccmd(self, command, cb=None, stopOnFail=True, **kwargs):
git = self.getCommand("git")
c = runprocess.RunProcess(self.builder, [git] + command,
self._fullSrcdir(),
sendRC=False, timeout=self.timeout,
maxTime=self.maxTime, logEnviron=self.logEnviron,
usePTY=False, **kwargs)
self.command = c
d = c.start()
if cb:
if stopOnFail:
d.addCallback(self._abandonOnFailure)
d.addCallback(cb)
return d
It means if git failed it will always call _abandonOnFailure, which will:
def _abandonOnFailure(self, rc):
if type(rc) is not int:
log.msg("weird, _abandonOnFailure was given rc=%s (%s)" % \
(rc, type(rc)))
assert isinstance(rc, int)
if rc != 0:
raise AbandonChain(rc)
return rc
Is there any reason stopOnFail is set to True for Git build step? or just a
bug ...
--
Chen Yingliu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20121119/b3563c57/attachment.html>
More information about the devel
mailing list