[Buildbot-devel] contrib/git_buildbot.py reports connection lost handling multiple revisions

Daniel THOMPSON daniel.thompson at st.com
Mon Mar 1 09:47:33 UTC 2010


On 28/02/10 19:16, Dustin J. Mitchell wrote:
> On Fri, Feb 26, 2010 at 9:48 AM, Daniel THOMPSON <daniel.thompson at st.com> wrote:
>>> Can you send along the "inverse patch" you applied, just so I know
>>> we're talking about the same thing?
>>
>> Sure. See attached.
> 
> Ah, I see what the problem was -- the replacement for the tail
> recursion was not executing under the same deferred, so addChange went
> on interating after the PB connection was dropped, which obviously
> doesn't work :)
> 
> How's this look:
>   http://github.com/djmitche/buildbot/blob/git_buildbot/contrib/git_buildbot.py

Doesn't work as is but was enough for me to take it the rest of the way.
See attached patch.

Three changes:

1. fixed a trivial typo (addChange -> addChanges)
2. make addChange() properly return the deferred from callRemote()
3. hoiked most of iter() into the try: clause so we don't execute it
   on the final iteration

With these in place my trivial test (two changes) works in the same
manner as the code from December.

I also put together a quick script to generate 400 commits. This test
case shows the December code failing (hang after exception) and the new
code working. Naturally I remain perplexed about a use case that
requires the notification of >300 changes in one go but I guess having
no limit is always best.

-- 
Daniel Thompson (STMicroelectronics) <daniel.thompson at st.com>
1000 Aztec West, Almondsbury, Bristol, BS32 4SQ. 01454 462659

If a car is a horseless carriage then is a motorcycle a horseless horse?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: git_buildbot_three_fixes.patch
URL: <http://buildbot.net/pipermail/devel/attachments/20100301/8095c0cc/attachment.ksh>


More information about the devel mailing list