The proposal to merge lp:~cjwatson/launchpad/consistent-bmp-events into 
lp:launchpad has been updated.

Description changed to:

I'd like to hook merge proposal webhooks into the Zope events that are already 
generated for several kinds of changes to merge proposals, but this is 
complicated by unnecessarily-chaotic conditions for when those events are 
generated.  This removes the special-purpose 
BranchMergeProposalStatusChangeEvent, and instead simply consistently generates 
ObjectModifiedEvent for all changes to merge proposal attributes.

To get this right, I exhaustively checked all the possible calling paths to 
BranchMergeProposal._transitionToState.  A couple of them 
(BranchMergeProposal:+resubmit and CodeHandler) failed to be consistent with 
other paths in terms of whether they generated ObjectModifiedEvent, which 
wasn't a practical problem before but would be now; and most of the rest were 
untested.  I fixed all this up.  The one relevant webservice entry point 
(BranchMergeProposal.setStatus) of course gets this right automatically thanks 
to lazr.restful.

BranchMergeProposalNeedsReviewEvent continues to exist even though it's 
sometimes accompanied by an almost equivalent ObjectModifiedEvent, because it 
can also be generated when a merge proposal is created.

This also has the useful side-effect of sending mail notifications for 
transitions to SUPERSEDED, per bug 716169.  I made this consistent and added 
tests for it.

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/consistent-bmp-events/+merge/273325
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~cjwatson/launchpad/consistent-bmp-events into lp:launchpad.

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to