<div dir="ltr"><div dir="ltr" class="gmail_msg">Hi Falk,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Unfortunatly, getChoices do not work anymore with buildbot nine.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">The configuration fo the forceschedulers is now purely static.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">There is a bug for that:</div><div class="gmail_msg"><a href="http://trac.buildbot.net/ticket/3351" class="gmail_msg" target="_blank">http://trac.buildbot.net/ticket/3351</a><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I can see from another email on this list that you are interrested in having a list of recently pushed tags.</div><div class="gmail_msg">I think this make sense, and buildbot_travis has some experimental implementation for similar stuff.</div><div class="gmail_msg"><br></div><div class="gmail_msg">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</div><div class="gmail_msg"><br></div><div class="gmail_msg">for example this gives the list of pull requests of buildbot.</div><div class="gmail_msg"><a href="https://nine.buildbot.net/api/v2/changes?category=pull&project=buildbot/buildbot">https://nine.buildbot.net/api/v2/changes?category=pull&project=buildbot/buildbot</a><br></div><div class="gmail_msg"><br></div><div class="gmail_msg">There is no tag changes yet in this bot, as the github hook wasn't configured to push tag events.</div><div class="gmail_msg"><br></div><div class="gmail_msg">There is an example in the source code of a custom parameter.</div><div class="gmail_msg"><a href="https://github.com/buildbot/buildbot/tree/master/www/nestedexample">https://github.com/buildbot/buildbot/tree/master/www/nestedexample</a><br></div><div class="gmail_msg">The use case is slightly more complex, but it should be easily simplifyable.</div><div class="gmail_msg">I understand however that this method is much more work thant the previous getChoices method :-/</div><div class="gmail_msg"><br></div><div class="gmail_msg">Pierre</div></div><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">Le lun. 17 oct. 2016 à 16:21, Tristram, Falk <<a href="mailto:falk.tristram@cognex.com" class="gmail_msg" target="_blank">falk.tristram@cognex.com</a>> a écrit :<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="DE" link="blue" vlink="purple" class="gmail_msg">
<div class="m_7610053093187902383m_-2481477383916193124WordSection1 gmail_msg">
<p class="MsoNormal gmail_msg">Hi,<u class="gmail_msg"></u><u class="gmail_msg"></u></p>
<p class="MsoNormal gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">I am currently in the process to convert an existing master.cfg from 0.8.12 to 0.9.0.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">The guide “Upgrading to Nine” helped.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">Now I am stuck at the point where the ChoiceStringParameters don’t work as before.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">The corresponding selection forms on the website are empty.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">I could track the problem down, that the function “getChoices” is not called any longer.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">I post some code that worked with 0.8.12:<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">class GitChoiceParameter(ChoiceStringParameter):<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"> name = "gitchoice"<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"> def __init__(self,<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"> name,<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"> label,<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"> repository, **kwargs):<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"> self.repository = repository<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"> log.msg("Initialized GitChoiceParameter for %s %s" % (name, label))<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"> ChoiceStringParameter.__init__(self, name=name, label=label, **kwargs)<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"> def getChoices(self, master, scheduler, buildername):<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"> # This never gets called<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"> log.msg("GitChoiceParameter getChoices %s " % self.label)<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">master.cfg:<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"># As from the docu<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">codebase = util.CodebaseParameter(“”, “Repo”, branch=GitChoiceParameter(name=’branch’, label=’Branch:’, repository=’…’))<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">Once I add choices=[‘A’, ‘B’, ‘C’] <u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">util.CodebaseParameter( …., repository=’…’, choices=[‘A’, ‘B’, ‘C’])<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">I can see ‘A’, ‘B’ and ‘C’ on the website.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">BUT my getChoices function is still not called at all.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">Best regards,<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg">Falk<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
</div>
</div>
_______________________________________________<br class="gmail_msg">
users mailing list<br class="gmail_msg">
<a href="mailto:users@buildbot.net" class="gmail_msg" target="_blank">users@buildbot.net</a><br class="gmail_msg">
<a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.buildbot.net/mailman/listinfo/users</a></blockquote></div></div>