[devel at bb.net] [users at bb.net] Another anecdote from 0.9.2 scheduler modification.

Neil Gilmore ngilmore at grammatech.com
Wed Jan 4 15:54:15 UTC 2017


Hi Pierre,

On 1/4/2017 6:41 AM, Pierre Tardy wrote:
> Le mar. 3 janv. 2017 à 16:57, Neil Gilmore <ngilmore at grammatech.com 
> <mailto:ngilmore at grammatech.com>> a écrit :
>
>     Hi Pierre,
>
>     Thanks for the reply.
>
>     The current status of my code is that all the schedulers now
>     support checkConfig and reconfigService. I can also (after some
>     wrangling) start buildbot using any of the schedulers. I have yet
>     to test reconfiguration, and I have not run any of the current
>     buildbot unit tests. Nor have I done any of the github stuff. I
>     did subscribe to the dev list (it was really just a matter of time).
>
>
> I highly suggest to start with the unit tests, as once it is 
> understood help you to be much more productive than typing buildbot 
> reconfigure all the time.
>  Also, obviously creating an account of github and pushing your code 
> will help me to help you.
>

Well, I have the account. Now I have to learn how to use it. :)

    1. Regularize compare_attrs for schedulers. In 0.9.2, several
    schedulers appear to have a problem where they do not include their
    base classes' compare_attrs. This wasn't as important when there was
    no effective reconfiguration.

> There is indeed a need for cleanup, but not the way you might think of it.
> compare_attr uses reflect.accumulateClassList, which does take in 
> account all compare_attr of all the subclasses.
> https://github.com/buildbot/buildbot/blob/master/master/buildbot/util/__init__.py#L136
> Some classes are explicitly adding their parents compare_attr but this 
> is either a mistake or a legacy (I am not sure, this precedes my 
> involvment in this project)
>

I hadn't seen that, being focussed elsewhere. I can certainly change my 
code to remove the references to the parent in compare_attrs.

>
>     2. Add the checkConfig and reconfigService functions, but leave
>     them empty. This will at least ensure that I have those setup up
>     properly.
>
> + remove the __init__. We should always use the BuildbotService class 
> __init__ for correct use of checkConfig/reconfigService
>
>

Yes, I should have been more precise. My current code leaves them in, 
but all they do is print that they've been called, and with what 
arguments. It made following through things easier. It's essentially 
just stuff for my debugging.

> Some useful links for that:
> http://docs.buildbot.net/latest/developer/tests.html
> The basic step to run the tests is the command:
> trial buildbot
>

I did find that link, but it doesn't appear to mention how to run them. 
Just knowing what the command line is helps immensely. There's only one 
mention of trial on that page, and it's in an import statement.

Thanks!

Neil Gilmore
grammatech.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/devel/attachments/20170104/13b7252d/attachment.html>


More information about the devel mailing list