[Buildbot-devel] tips for creating new P4-based source buildStep ?

William Deegan bill at baddogconsulting.com
Tue Mar 5 22:18:41 UTC 2013


On Mar 5, 2013, at 8:42 AM, Stephan Koledin <skoledin at gmail.com> wrote:

> I think I finally found your new master step. Apparently I hadn't looked very hard the first time around. Is this it?
> https://github.com/bdbaddog/buildbot/blob/p4_master_step_2012/master/buildbot/steps/source/p4.py

Also here's the pull request:
It's in production use at a client currently.

> Does this step depend on any other mods in your branch, or is it pretty standalone vs 0.8.7? I guess I'm wondering if I can give it a quick test run by just patching it into my existing setup.

It should work fine against 0.8.7.
If not let me know and I'll help address any issues.
There's also docs for this.
One of the changes I made was to allow specifying the p4 client spec pretty flexibly.
Take a look at _createClientSpec  (line 313).

I'm guessing from your original description that you want to have "-" lines in your client spec?
Or did you want to pull from several different depots?
or other?

If you can explain a bit, I can let you know if the code will just handle it and/or perhaps help you make the necessary changes.


> Thanks.
> -Stephan
> On 3/5/2013 8:28 AM, Stephan Koledin wrote:
>> Bill, Dustin-
>> Thanks for the great info/feedback. Agree that it makes a lot more sense
>> to contribute to a p4 master step and of course, I'd feed back any work
>> I do that's not just a local "customization".
>> At the moment, I've got some pressure to get something out the door on
>> this project fairlty quickly, so I've got a bit of a catch-22 on whether
>> to do things "right" or just get something working. Of course, having
>> something up and running will give me some flexibility to then help get
>> a solid p4 master step up and working, so I guess my direction depends
>> on how far along and stable Bill's p4 master step is.
>> I won't be at PyCon, but might be able to take something small and run
>> with it in parallel during that time.
>> Bill, is your P4 master source step available somewhere? I didn't spot
>> it in github, but I could just be not looking in the right place. Also,
>> is this step something that can just be patched into an existing/working
>> 0.8.7 buildbot setup, or do I need to be running on nine or some other
>> dev tree?
>> Also, just a point/question of interest, keep in mind I'm a relative
>> buildbot newbie... If I wanted to override a particular buildStep
>> method, it seems to me that if it's a master step, a simple change or
>> derivative class could just be done via the master.cfg without having to
>> directly patch/change the source. Is that correct, or am I being naive?
>> Thanks again.
>> -Stephan
>> On 3/4/2013 10:16 PM, Bill Deegan wrote:
>>> Stephan,
>>> On Mon, Mar 4, 2013 at 7:19 PM, Dustin J. Mitchell <dustin at v.igoro.us
>>> <mailto:dustin at v.igoro.us>> wrote:
>>>    On Mon, Mar 4, 2013 at 7:45 PM, Stephan Koledin <skoledin at gmail.com
>>>    <mailto:skoledin at gmail.com>> wrote:
>>>     > Thanks in advance for any advice on this. I really just want to
>>> make
>>>     > sure I'm headed in the right direction before committing to this
>>>    approach.
>>>    It sounds like you're on the right track - at least, your
>>>    implementation will be nicely independent of any changes to the
>>>    existing P4 support.
>>>    That said, the P4 support hasn't seen much love recently:
>>>      * last modification was in May 2012, and that was removing
>>>    functionality; before that, August 2011
>>>      * http://trac.buildbot.net/wiki/p4 lists the open bugs.
>>>      * MAINTAINERS.txt indicates Bill (copied) as the maintainer, but
>>> he's
>>>    busy and we've been in short supply of P4 hackers
>>>    If you're willing, it would make the world a better place to have a
>>>    master-side P4 step that has the flexibility you need, plus full unit
>>>    tests (so those of us who are not P4 gurus can maintain it).
>>>    What do you think?
>>> I have a functional master side P4 source step.
>>> Lacking some tests at this point.
>>> If you'd like to contribute to that branch rather than reinvent the
>>> wheel.
>>> I was hoping to wrap this up at post pycon sprints coming up shortly.
>>> -Bill

More information about the devel mailing list