[MacPorts] #52446: Buildbot failure emails go to too many recipients

MacPorts noreply at macports.org
Thu Sep 29 22:52:33 CEST 2016


#52446: Buildbot failure emails go to too many recipients
---------------------------+--------------------------------
  Reporter:  ryandesign@…  |      Owner:  macports-tickets@…
      Type:  defect        |     Status:  closed
  Priority:  High          |  Milestone:
 Component:  contrib       |    Version:
Resolution:  fixed         |   Keywords:
      Port:                |
---------------------------+--------------------------------

Comment (by mojca@…):

 Replying to [comment:8 larryv@…]:
 > Replying to [comment:7 ryandesign@…]:
 > > I don't understand how it works. `buildMessageDict` clears
 > > `interested_users`, passes `interested_users` to
 > > `portMessageFormatter`, which does not appear to use it in any way,
 > > and then somehow by the time `useLookup` is called, it's been filled
 > > with the right data?

 You can look at what `MailNotifier` does in the buildbot sources. The
 `PortsMailNotifier` only overrides some functions. The `useLookup` is
 called by one of the class functions.

 `buildMessageDict()` initializes a field that was added by us. Then it
 "forwards" that field to `portMessageFormatter()`. Not that
 `self.interested_users` is an output of `portMessageFormatter()`, not
 input. Now that I look at it again I see that I could probably do it
 differently, for example return it from `portWatcherMessageFormatter()` as
 part of `msgdict`.

 So `portWatcherMessageFormatter()` fills in the list of interested users.
 And then `useLookup()` (called by another function) uses that list to add
 actual recipients.

 > `portMessageFormatter` populates `interested_users` in line 750 or
 thereabouts. I don’t really understand why it happens in that function.

 Because that's a place where we know them already. We could of course
 duplicate the code that calculates the recipients (we could recalculate
 the recipients inside `useLookup()`) or we could write another class to do
 it. You can check how that was done in the old setup. It's not nearly
 ideal to do it that way, I know, but I had to do something ...

 Does the committer also get a message about broken build?

-- 
Ticket URL: <https://trac.macports.org/ticket/52446#comment:10>
MacPorts <https://www.macports.org/>
Ports system for the Mac operating system



More information about the macports-tickets mailing list