[Buildbot-commits] buildbot/buildbot/process step.py,1.65,1.66

Brian Warner warner at users.sourceforge.net
Tue May 17 04:40:59 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/process
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10352/buildbot/process

Modified Files:
	step.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-185
Creator:  Brian Warner <warner at monolith.lothar.com>

add retry-VC-checkout control (SF#1200395)

Patches applied:

 * warner at monolith.lothar.com--2005/buildbot--dev--0--patch-29
   Merged from arch at buildbot.sf.net--2004 (patch 175-184)

 * warner at monolith.lothar.com--2005/buildbot--dev--0--patch-30
   add retry-VC-checkout control (SF#1200395)


Index: step.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step.py,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- step.py	10 May 2005 08:10:36 -0000	1.65
+++ step.py	17 May 2005 04:40:55 -0000	1.66
@@ -850,7 +850,7 @@
     notReally = False
 
     def __init__(self, workdir, mode='update', alwaysUseLatest=False,
-                 timeout=20*60, **kwargs):
+                 timeout=20*60, retry=None, **kwargs):
         """
         @type  workdir: string
         @param workdir: local directory (relative to the Builder's root)
@@ -918,13 +918,29 @@
         buildmaster thinks it has (possibly resulting in the wrong
         person taking the blame for any problems that result), at worst
         is can result in an incoherent set of sources (splitting a
-        non-atomic commit) which may not build at all.  """
+        non-atomic commit) which may not build at all.
+
+        @type  retry: tuple of ints (delay, repeats) (or None)
+        @param retry: if provided, VC update failures are re-attempted up
+                      to REPEATS times, with DELAY seconds between each
+                      attempt. Some users have slaves with poor connectivity
+                      to their VC repository, and they say that up to 80% of
+                      their build failures are due to transient network
+                      failures that could be handled by simply retrying a
+                      couple times.
+
+        """
 
         BuildStep.__init__(self, **kwargs)
         assert mode in ("update", "copy", "clobber", "export")
+        if retry:
+            delay, repeats = retry
+            assert type(repeats) is int
+            assert repeats > 0
         self.args = {'mode': mode,
                      'workdir': workdir,
                      'timeout': timeout,
+                     'retry': retry,
                      'patch': None, # set during .start
                      }
         self.alwaysUseLatest = alwaysUseLatest





More information about the Commits mailing list