Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GerritStatusPush: Add per-buildset status updates
Currently GerritStatusPush will submit an update/review to gerrit immediately when each builder in a buildset finishes building. It is usually more useful to just get one update, containing information about all of the builds in that buildset. So, allow GerritStatusPush to do that, configurable via the new summaryCB constructor argument. A default summaryCB is also provided: defaultSummaryCB. If neither reviewCB nor summaryCB are explicitly provided in the configuration, default to sending out the new "summary" reviews. However, if reviewCB was explicitly provided, default to sending out the old-style per-build reviews, and not sending out the new "summary" reviews. This allows for older configurations to not see an unexpected change in behavior, but completely new configurations are likely to see the probably more useful "summary" reviews. Since much of this functionality is already implemented in MailNotifier, extract the relevant code into the new BuildSetSummaryNotifierMixin, and make both MailNotifier and GerritStatusPush use it. Document the new mixin class. Also add tests for GerritStatusPush, to test the new behavior, and for BuildSetSummaryNotifierMixin, to test that the mixin itself works properly. Modify the unit tests for MailNotifier to accomodate the refactoring.
- Loading branch information
Showing
10 changed files
with
536 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.