<div dir="ltr">Hi Neil,<div><br></div><div>I'll indeed probably go for the yadda yadda :)</div><div>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.</div><div><br></div><div>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!</div><div><a href="http://docs.buildbot.net/current/developer/quickstart.html">http://docs.buildbot.net/current/developer/quickstart.html</a><br></div><div><br></div><div>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)</div><div><br></div><div>Regards,</div><div>Pierre</div><div> </div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 5, 2018 at 5:31 PM Neil Gilmore <<a href="mailto:ngilmore@grammatech.com">ngilmore@grammatech.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
We're (slowly) moving from subversion to git. Mostly, buildbot has been <br>
well behaved though this, though some of our VMs run out of disk space <br>
-- we change builder names to reflect branches, and we have different <br>
branches on git than subversion.<br>
<br>
But because of some other troubles, we have sometimes ended up with our <br>
local git repos in odd states. Recently, we had some troubles where <br>
fetch would fail and not get cleaned up (yes, we're using <br>
clobberOnFailure) . The next build would then fail on its git build step <br>
and on down the line.<br>
<br>
Here's our fix. We're a few versions back, not set up to ask you guys to <br>
pull, etc. (or yadda yadda if you prefer). The code looks the same, but <br>
you devs might have different ideas. This is down in the _fech function.<br>
<br>
Index: git.py<br>
===================================================================<br>
--- git.py      (revision 149088)<br>
+++ git.py      (revision 149089)<br>
@@ -400,6 +400,7 @@<br>
              if rc == RC_SUCCESS:<br>
                  fetch_required = False<br>
<br>
+        abandonOnFailure = not self.retryFetch and not <br>
self.clobberOnFailure<br>
          if fetch_required:<br>
              command = ['fetch', '-t', self.repourl, self.branch]<br>
              # If the 'progress' option is set, tell git fetch to output<br>
@@ -409,7 +410,12 @@<br>
              if self.prog:<br>
                  command.append('--progress')<br>
<br>
-            yield self._dovccmd(command)<br>
+            # GT: made clobberOnFailure work against fetch failures<br>
+            # and not just reset failures<br>
+            res = yield self._dovccmd(command, abandonOnFailure)<br>
+            if res != RC_SUCCESS:<br>
+                defer.returnValue(res)<br>
+                return<br>
<br>
          if self.revision:<br>
              rev = self.revision<br>
@@ -416,7 +422,6 @@<br>
          else:<br>
              rev = 'FETCH_HEAD'<br>
          command = ['reset', '--hard', rev, '--']<br>
-        abandonOnFailure = not self.retryFetch and not <br>
self.clobberOnFailure<br>
          res = yield self._dovccmd(command, abandonOnFailure)<br>
<br>
<br>
If you find it useful, great! If not, well, it's working for us.<br>
<br>
Neil Gilmore<br>
<a href="http://grammatech.com" rel="noreferrer" target="_blank">grammatech.com</a><br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@buildbot.net" target="_blank">devel@buildbot.net</a><br>
<a href="https://lists.buildbot.net/mailman/listinfo/devel" rel="noreferrer" target="_blank">https://lists.buildbot.net/mailman/listinfo/devel</a></blockquote></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><p dir="ltr"><br></p>
</div></div>