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 
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 

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:tar...@gmail.com]
Sent: Montag, 17. Oktober 2016 17:06
To: Tristram, Falk; users@buildbot.net
Subject: Re: [us...@bb.net] ForceScheduler trouble converting from 0.8.12 to 

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.trist...@cognex.com<mailto:falk.trist...@cognex.com>> a écrit :

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

Now I am stuck at the point where the ChoiceStringParameters don’t work as 
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 mailing list

Reply via email to