Ticket #554 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

Add a way to pass Properties dicts Trigger buildsteps to Triggerable schedulers

Reported by: dlatornell Owned by: dustin
Priority: major Milestone: 0.7.11
Version: 0.7.10 Keywords:
Cc: dustin

Description

The long version of what I want to do and why is in this thread:  http://sourceforge.net/mailarchive/forum.php?thread_name=6279c0a40904161544s395c4c7bx621b7eacc2813fef%40mail.gmail.com&forum_name=buildbot-devel

Basically, I have several schedulers that have a boolean property. The builds that those schedulers launch need to check the value of the property and act accordingly in some of their custom ShellCommand buildsteps. Some of those builds have Trigger buildsteps that launch other builds via Triggerable schedulers. Presently the only way to pass the property from the original scheduler to the Triggerable is to use WithProperties and the set_properties argument of the Trigger step. But WithProperties renders property values to strings, and that is incompatible with the boolean property I want to pass along.

To facilitate what I need to do, I'm thinking of implementing a CopyProperties class that is similar to WithProperties but returns a dict of properties that the Trigger step's set_properties argument can consume. This would allow something like:

f.addStep(Trigger(schedulerNames=[triggerable_name],
                  set_properties=CopyProperties('make_refs')))

Attachments

544.patch Download (5.9 KB) - added by dustin 4 years ago.
544.patch

Change History

comment:1 Changed 4 years ago by dustin

  • Cc dustin added

Changed 4 years ago by dustin

544.patch

comment:2 follow-up: ↓ 3 Changed 4 years ago by dustin

  • Owner set to dustin
  • Status changed from new to accepted

dlatornell -- how's this? It adds a copy_properties to the parameters for Trigger()

comment:3 in reply to: ↑ 2 Changed 4 years ago by dlatornell

Replying to dustin:

dlatornell -- how's this? It adds a copy_properties to the parameters for Trigger()

Thanks, Dustin. It looks like that patch will work well. It's cleaner than the CopyProperties() analog to WithProperties() that I've hacked up. It works, but I was holding off submitting the patch until I could figure out a good functional test for CopyProperties().

I will apply this patch to my installation and get back to you. It will probably take a few days though.

comment:4 Changed 4 years ago by dustin

Cool! This is committed already, so if it works for you, please close this ticket.

comment:5 Changed 4 years ago by dustin

  • Milestone changed from undecided to 0.7.11

comment:6 Changed 4 years ago by dlatornell

  • Status changed from accepted to closed
  • Resolution set to fixed

Works like a charm! Thanks again Dustin.

Note: See TracTickets for help on using tickets.