[Buildbot-devel] BuildStep tangle [Was: Easy question]
Dustin J. Mitchell
djmitche at gmail.com
Sat Feb 18 15:14:56 UTC 2012
On Feb 15, 2012 3:21 AM, "Ian Zimmerman" <itz at buug.org> wrote:
> I had a look and, as a complete surprise to me, this way of specifying
> steps seems to be still supported.
Indeed, we try to maintain configuration compatibility as much as possible.
But this thread is about writing subclasses, not specifying steps.
> It seems to me that underlying all the confusion and inelegance is the
> use of the kwargs member as a kitchen sink. Why do for example
> parameters for RemoteShellCommand have to be flattened into the
> ShellCommand's kwargs? If they were passed as a separate dictionary
> (ie. a _single_ argument for ShellCommand), there would be no need for
> the params mechanism in this case. Maybe something similar is true for
> all step classes?
This is annoying and awkward, but unique to the ShellCommand class and not
specifically related to the self-factory pattern.
I wonder if some metaclasses could help here? This could capture the
initial constructor args to be re-applied when instantiating a step for a
build.
Alternately, if steps were simply deepcopied when instantiated for a build,
and the constructor skipped, that might be even easier!
I'd love to see a proof of concept..
Dustin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20120218/fdd5b8df/attachment.html>
More information about the devel
mailing list