[Buildbot-devel] SVNPoller patch to make it survive sf outages
dustin at zmanda.com
dustin at zmanda.com
Thu Apr 26 16:23:33 UTC 2007
I know, I know, SourceForge *never* has outages.
When there's a problem with SVN in the poller, it raises a failure (via
self.finished) to the LoopingCall, which stops. Everything looks fine
until a few commits later, when you notice, "hey, nothing's happening".
Then you have to restart the buildmaster, and the poller doesn't notice
the last few changes committed, so you have to manually start runs.
Anyway, the attached patch should fix this. Thoughts?
Dustin
--
Dustin J. Mitchell
Storage Software Engineer, Zmanda, Inc.
http://www.zmanda.com/
-------------- next part --------------
--- svnpoller.py1 2007-04-19 16:24:40.000000000 -0500
+++ svnpoller.py 2007-04-26 11:20:39.000000000 -0500
@@ -257,7 +257,7 @@
d.addCallback(self.get_new_logentries)
d.addCallback(self.create_changes)
d.addCallback(self.submit_changes)
- d.addBoth(self.finished)
+ d.addCallbacks(self.finished_ok, self.finished_failure)
return d
def getProcessOutput(self, args):
@@ -438,9 +438,16 @@
for c in changes:
self.parent.addChange(c)
- def finished(self, res):
+ def finished_ok(self, res):
log.msg("SVNPoller finished polling")
dbgMsg('_finished : %s' % res)
assert self.working
self.working = False
- return res
+ return res
+
+ def finished_failure(self, f):
+ log.msg("SVNPoller failed")
+ dbgMsg('_finished : %s' % res)
+ assert self.working
+ self.working = False
+ return None # eat the failure
More information about the devel
mailing list