[Buildbot-devel] some slave-side enhancements for git

Dustin Sallings dustin at spy.net
Mon Sep 7 07:58:42 UTC 2009


	I've done a few slave-side enhancements for git that are at least  
beneficial to me.  Let me know if anyone has any reservations about  
them:

	1) Some basic refactoring for reuse (there was a ton of copy and  
paste in there)
	2) Submodule init/update is more backwards compatible and has a clean  
step.
	3) A reset is attempted *before* a fetch, and will bypass the fetch  
if it succeeds.

	#1 is pretty basic stuff:

	http://github.com/dustin/buildbot/commit/379941c0be48805896be5ea79fe3b59e05263a54

	Also, I noticed many systems uses a vcexe and git didn't.  I fixed  
that as well:

	http://github.com/dustin/buildbot/commit/be6ba5f4cd5e40c101fba9616da88c084a6eb58b

	#2 is very little code after the above is in place:

	http://github.com/dustin/buildbot/commit/1ae02d7bee7cbae2933a980961087439a4ae8da7

	Note that I did change the language here to specify the intention of  
the function as opposed to the event that fires it (goto as opposed to  
comefrom).  This was mostly important for the next change:

	#3

	http://github.com/dustin/buildbot/commit/ddedd578836f7c254c5407e082731e19aba1bbc4

	In almost every case in my buildbot installs, a build is referencing  
code that is already on the slave (we use a ton of buildbot try,  
though this is also useful in the case of forced builds or alternate  
branch builds).  In those cases, this makes builds faster and more  
reliable by not requiring unnecessary communication with a centralized  
resource.

	Basically, instead of doing a clean, fetch, reset, etc... we skip the  
fetch step *unless* it fails, then we add back in a fetch followed by  
another reset.


	If nobody sees anything terribly wrong with this, I'd like to push it  
through.

	Also, I'm curious as to why the use of submodules requires the user  
to configure submodule support explicitly.  Is there any reason  
buildbot shouldn't just do the right thing when it sees that the repo  
that was fetched has submodules?

-- 
Dustin Sallings





More information about the devel mailing list