steps: Reduce duplication by reintroducing ShellCommandNewStyle#5488
steps: Reduce duplication by reintroducing ShellCommandNewStyle#5488p12tic merged 1 commit intobuildbot:masterfrom
Conversation
| descriptionDone = "configure" | ||
| command = ["./configure"] | ||
|
|
||
| class ShellCommandNewStyle(buildstep.ShellMixin, buildstep.BuildStep): |
There was a problem hiding this comment.
Why not just calling it Shell and start advising people to transition there custom steps to it?
There was a problem hiding this comment.
I think it makes sense to keep ShellCommand name, as there's probably plenty of direct uses of ShellCommand within end user build configurations. Forcing a rename would just make a lot of work to them.
Additionally, based on my experience converting all other steps, users of ShellCommand will either need to migrate to ShellMixin or not need to do anything. This is because any customizations require a custom run method, which means inheriting ShellMixin becomes simplier. If there are no customizations, then no migration is necessary whatsoever (just like in this Configure step).
So basically, all users will either keep using ShellCommand as is, or convert to ShellMixin. A rename would just be extra work to them.
To support the users who will need to migrate to ShellMixin, the following should be a reasonable migration plan. Once all our ShellCommands subclasses have been migrated, we can add deprecation warnings to everything that users could potentially override, informing them that they should use ShellMixin. In v3.0 we would replace ShellCommand with ShellCommandNewStyle and that's it.
It looks like for simple commands it's worth keeping ShellCommand. This PR reintroduces a shell command, but in new style. The original ShellCommand will be replaced by ShellCommandNewStyle in Buildbot v3.0.