[Buildbot-devel] Problems installing buildbot from arch

Dobes Vandermeer dobesv at gmail.com
Wed Sep 28 01:33:43 UTC 2005


On 9/27/05, Brian Warner <warner-buildbot at lothar.com> wrote:
> Let me know which you think would be better: continuing with names or
> switching to actual references. Using references would force the config file
> to be written in a certain order (slaves first, then BuildFactories, then
> Builders, then Schedulers), but that might actually be a good thing, what
> with the whole "there should only be one way to do it" philosophy that Python
> gives us..

I like names because it makes it easier to load from an xml
configuration file or sql database somewhere.  They also have a
pleasing relational quality to them, and as you've mentioned you can
refer to them before their related components are defined, allow you
to build graphs that might span functions or modules without worrying
about scoping and stuff.

I like instances because you don't really have to name them, so you
could just have for n in range(1 .. slaves) or somesuch without having
to worry about generating and remembering unique names; also, you'll
get support from the language in ensuring that all the names are
defined, instead of having to check and report missing names as part
of the setup stage.

I suppose instances have an advantage in the API; you could have
master.cfg return a configuration object instead of a dictionary, with
a syntax like:

masterCfg = Configuration()
bot1 = masterCfg.addBot(name='slave1', password='password')
builder1 = masterCfg.addBuilder(fileNameFilter=lambda x: ..., steps=[
... ], builddir=..., slave=bot1)

each step would then have some level of verification - I think in the
long term this might be the best approach since is has the highest
level of error detection.

Currently, you don't have any verification of the dictionary keys
until later (e.g. when schedulers was deprecated the stacktrace didn't
take me right to the right line of code in master.cfg).

Plus, for the xml loaders and so forth, its fairly easy to convert
them into instances.




More information about the devel mailing list