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? Falk From: Pierre Tardy [mailto:[email protected]] Sent: Montag, 17. Oktober 2016 17:06 To: Tristram, Falk; [email protected] Subject: Re: [[email protected]] 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: http://trac.buildbot.net/ticket/3351<https://urldefense.proofpoint.com/v2/url?u=http-3A__trac.buildbot.net_ticket_3351&d=DQMFaQ&c=VCWpAYkS3z1bOCIxc-BPGZarCq9MRCAVxZJE051VqH8&r=Ee2S2RR_IcVA2riuzsDuYo9W0-YuR65ZmnX9oJ70u5c&m=zlf_NcU5ZlyM-X6jXOOzY68-OV5Ml-5EFiAEYPhAlzA&s=XqT-OjWzIyr1-itZxdyNVSjqn8L06_mlxJTQAbvIchs&e=> 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. https://nine.buildbot.net/api/v2/changes?category=pull&project=buildbot/buildbot<https://urldefense.proofpoint.com/v2/url?u=https-3A__nine.buildbot.net_api_v2_changes-3Fcategory-3Dpull-26project-3Dbuildbot_buildbot&d=DQMFaQ&c=VCWpAYkS3z1bOCIxc-BPGZarCq9MRCAVxZJE051VqH8&r=Ee2S2RR_IcVA2riuzsDuYo9W0-YuR65ZmnX9oJ70u5c&m=zlf_NcU5ZlyM-X6jXOOzY68-OV5Ml-5EFiAEYPhAlzA&s=1CfFxPK_CQmn_yKDjGb9CWnG7YuTwMuE6I5ZRJrokqM&e=> 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. https://github.com/buildbot/buildbot/tree/master/www/nestedexample<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_buildbot_buildbot_tree_master_www_nestedexample&d=DQMFaQ&c=VCWpAYkS3z1bOCIxc-BPGZarCq9MRCAVxZJE051VqH8&r=Ee2S2RR_IcVA2riuzsDuYo9W0-YuR65ZmnX9oJ70u5c&m=zlf_NcU5ZlyM-X6jXOOzY68-OV5Ml-5EFiAEYPhAlzA&s=Xuwvdg6X19YlZ2MlLeY-TPgquQM8chfJF4ezfHQfqGk&e=> 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 :-/ Pierre Le lun. 17 oct. 2016 à 16:21, Tristram, Falk <[email protected]<mailto:[email protected]>> a écrit : Hi, 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, name, label, 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) master.cfg: # 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, Falk _______________________________________________ users mailing list [email protected]<mailto:[email protected]> https://lists.buildbot.net/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.buildbot.net_mailman_listinfo_users&d=DQMFaQ&c=VCWpAYkS3z1bOCIxc-BPGZarCq9MRCAVxZJE051VqH8&r=Ee2S2RR_IcVA2riuzsDuYo9W0-YuR65ZmnX9oJ70u5c&m=zlf_NcU5ZlyM-X6jXOOzY68-OV5Ml-5EFiAEYPhAlzA&s=hwHeL24MarkE2hotZS3F68k0WUrFj4qCJmeUNGW5BUY&e=>
_______________________________________________ users mailing list [email protected] https://lists.buildbot.net/mailman/listinfo/users
