[devel at bb.net] Problem as a possible fix for git.py.

Pierre Tardy tardyp at gmail.com
Sun Oct 7 08:59:25 UTC 2018


Hi Neil,

I'll indeed probably go for the yadda yadda :)
Would be nice to see a real pull request from Grammatech. I guess Buildbot
has given you a bit of value over time, while you did bring back well in
term of bug reports, it is always refreshing to see big users give back in
term of code contribution.

Setting up yourself for a more formal contribution should not take you more
than a day (incl learning about unit testing), and will open up the path to
more and cheaper contribution!
http://docs.buildbot.net/current/developer/quickstart.html

Your patch looks doing good thing. We have been struggling in our
metabuildbot with github randomly closing the connection, and Buildbot not
retrying. Not sure if this is related (probably not)

Regards,
Pierre


On Fri, Oct 5, 2018 at 5:31 PM Neil Gilmore <ngilmore at grammatech.com> wrote:

> Hi all,
>
> We're (slowly) moving from subversion to git. Mostly, buildbot has been
> well behaved though this, though some of our VMs run out of disk space
> -- we change builder names to reflect branches, and we have different
> branches on git than subversion.
>
> But because of some other troubles, we have sometimes ended up with our
> local git repos in odd states. Recently, we had some troubles where
> fetch would fail and not get cleaned up (yes, we're using
> clobberOnFailure) . The next build would then fail on its git build step
> and on down the line.
>
> Here's our fix. We're a few versions back, not set up to ask you guys to
> pull, etc. (or yadda yadda if you prefer). The code looks the same, but
> you devs might have different ideas. This is down in the _fech function.
>
> Index: git.py
> ===================================================================
> --- git.py      (revision 149088)
> +++ git.py      (revision 149089)
> @@ -400,6 +400,7 @@
>               if rc == RC_SUCCESS:
>                   fetch_required = False
>
> +        abandonOnFailure = not self.retryFetch and not
> self.clobberOnFailure
>           if fetch_required:
>               command = ['fetch', '-t', self.repourl, self.branch]
>               # If the 'progress' option is set, tell git fetch to output
> @@ -409,7 +410,12 @@
>               if self.prog:
>                   command.append('--progress')
>
> -            yield self._dovccmd(command)
> +            # GT: made clobberOnFailure work against fetch failures
> +            # and not just reset failures
> +            res = yield self._dovccmd(command, abandonOnFailure)
> +            if res != RC_SUCCESS:
> +                defer.returnValue(res)
> +                return
>
>           if self.revision:
>               rev = self.revision
> @@ -416,7 +422,6 @@
>           else:
>               rev = 'FETCH_HEAD'
>           command = ['reset', '--hard', rev, '--']
> -        abandonOnFailure = not self.retryFetch and not
> self.clobberOnFailure
>           res = yield self._dovccmd(command, abandonOnFailure)
>
>
> If you find it useful, great! If not, well, it's working for us.
>
> Neil Gilmore
> grammatech.com
> _______________________________________________
> devel mailing list
> devel at buildbot.net
> https://lists.buildbot.net/mailman/listinfo/devel

--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/devel/attachments/20181007/0b35091c/attachment.html>


More information about the devel mailing list