[users at bb.net] ForceScheduler trouble converting from 0.8.12 to 0.9.0

Tristram, Falk falk.tristram at cognex.com
Tue Oct 18 08:35:48 UTC 2016

Hi Pierre,

it would be great if you could add an API warning, when someone tries to actually use this function.

Could you give me more details about the meaning of “purely static” in this context.
I would prefer a solution that circumvents this problem by updating the value on a time basis.
This could be done by a “Poller” that updates the list of tags every five minutes.

If I understand the implementation in 0.8.12 correctly, getChoices was invoked when someone opened the ForceScheduler site.
My requirement is simply that the list of tags is up-to-date, after a short amount of time.

Do you think, that time-based updates will work?


From: Pierre Tardy [mailto:tardyp at gmail.com]
Sent: Montag, 17. Oktober 2016 17:06
To: Tristram, Falk; users at buildbot.net
Subject: Re: [users at bb.net] ForceScheduler trouble converting from 0.8.12 to 0.9.0

Hi Falk,

Unfortunatly, getChoices do not work anymore with buildbot nine.

The configuration fo the forceschedulers is now purely static.

There is  a bug for that:

I can see from another email on this list that you are interrested in having a list of recently pushed tags.
I think this make sense, and buildbot_travis has some experimental implementation for similar stuff.

I think the best option is for yout is to create a custom parameter which would query the change api, and filter by category, and repository

for example this gives the list of pull requests of buildbot.

There is no tag changes yet in this bot, as the github hook wasn't configured to push tag events.

There is an example in the source code of a custom parameter.
The use case is slightly more complex, but it should be easily simplifyable.
I understand however that this method is much more work thant the previous getChoices method :-/


Le lun. 17 oct. 2016 à 16:21, Tristram, Falk <falk.tristram at cognex.com<mailto:falk.tristram at cognex.com>> a écrit :

I am currently in the process to convert an existing master.cfg from 0.8.12 to 0.9.0.
The guide “Upgrading to Nine” helped.

Now I am stuck at the point where the ChoiceStringParameters don’t work as before.
The corresponding selection forms on the website are empty.
I could track the problem down, that the function “getChoices” is not called any longer.

I post some code that worked with 0.8.12:

class GitChoiceParameter(ChoiceStringParameter):

    name = "gitchoice"

    def __init__(self,
                 repository, **kwargs):
        self.repository = repository
        log.msg("Initialized GitChoiceParameter for %s %s" % (name, label))
        ChoiceStringParameter.__init__(self, name=name, label=label, **kwargs)

    def getChoices(self, master, scheduler, buildername):
        # This never gets called
        log.msg("GitChoiceParameter getChoices %s " % self.label)

# As from the docu
codebase = util.CodebaseParameter(“”, “Repo”, branch=GitChoiceParameter(name=’branch’, label=’Branch:’, repository=’…’))

Once I add choices=[‘A’, ‘B’, ‘C’]
util.CodebaseParameter( …., repository=’…’, choices=[‘A’, ‘B’, ‘C’])
I can see ‘A’, ‘B’ and ‘C’ on the website.
BUT my getChoices function is still not called at all.

Best regards,
users mailing list
users at buildbot.net<mailto:users at buildbot.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20161018/14e3d17a/attachment.html>

More information about the users mailing list