[Buildbot-devel] BuildStep tangle

Ian Zimmerman itz at buug.org
Sat Feb 18 17:27:37 UTC 2012


Ian> It seems to me that underlying all the confusion and inelegance is
Ian> the use of the kwargs member as a kitchen sink.  Why do for example
Ian> parameters for RemoteShellCommand have to be flattened into the
Ian> ShellCommand's kwargs?  If they were passed as a separate
Ian> dictionary (ie. a _single_ argument for ShellCommand), there would
Ian> be no need for the params mechanism in this case.  Maybe something
Ian> similar is true for all step classes?

Dustin> This is annoying and awkward, but unique to the ShellCommand
Dustin> class and not specifically related to the self-factory pattern.

I disagree.  Step-as-factory can in principle be avoided already, by
passing the class instead of an instance.  It just turns out that this
doesn't make writing subclasses any cleaner because you still have to
deal with the kwargs mess.  So, cleaning up kwargs (and params) is a
prerequisite to cleaning up subclasses.

-- 
Ian Zimmerman
gpg public key: 1024D/C6FF61AD
fingerprint: 66DC D68F 5C1B 4D71 2EE5  BD03 8A00 786C C6FF 61AD
Rule 420: All persons more than eight miles high to leave the court.




More information about the devel mailing list