[Buildbot-commits] [buildbot/buildbot] 3b6731: Git: Fix initial clone with gerrit changes

GitHub noreply at github.com
Sun Apr 6 21:33:01 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/buildbot/buildbot
  Commit: 3b673109a9466f25f01bd3eb160253cfe5eccaff
      https://github.com/buildbot/buildbot/commit/3b673109a9466f25f01bd3eb160253cfe5eccaff
  Author: Andrew Deason <adeason at sinenomine.net>
  Date:   2014-01-23 (Thu, 23 Jan 2014)

  Changed paths:
    M master/buildbot/steps/source/git.py

  Log Message:
  -----------
  Git: Fix initial clone with gerrit changes

git clone --branch only works with refs under refs/heads/* and
refs/tags/*, not arbitrary refs. But the Gerrit step will give us a
ref of the form refs/changes/*, since that is where gerrit stores the
submitted changes for us to build.

There appears to be no way to get an arbitrary ref with 'git clone',
as you can with --branch; at least, none I can see. So instead, just
do a regular clone, and run the normal _fetch routine afterwards,
which will fetch the relevant ref and check it out for us.

This bug is mentioned in bug #2485, though #2485 itself is a different
bug.


  Commit: 2d7f24c13129494b3c540bbd2c15a8733e12fce6
      https://github.com/buildbot/buildbot/commit/2d7f24c13129494b3c540bbd2c15a8733e12fce6
  Author: Andrew Deason <adeason at sinenomine.net>
  Date:   2014-01-23 (Thu, 23 Jan 2014)

  Changed paths:
    M master/buildbot/status/status_gerrit.py
    M master/docs/relnotes/index.rst

  Log Message:
  -----------
  GerritStatusPush: Fix labels with gerrit >=2.6

Fixes #2550. Gerrit versions 2.6 and newer do not accept the
--verified option if the Verified label does not exist in All-Projects
in the gerrit configuration. Instead, we must give the --label option.
So, use --label for --verified and --code-review so we can work with
all gerrit installations.

While the --code-review option does still work, so does the --label
approach. It seems more likely that --label is more likely to work in
the future than --code-review, so we'll just go with the safer route.

In order to still support older gerrit installations (which do not
support the --label option), query the gerrit installation version
whenever we submit a review. Cache this version query for 10 minutes,
so we do not ask the gerrit server every single time for its version.


  Commit: 3d6609a6079a23ef5d730eaf731f7b0f116222e2
      https://github.com/buildbot/buildbot/commit/3d6609a6079a23ef5d730eaf731f7b0f116222e2
  Author: Andrew Deason <adeason at sinenomine.net>
  Date:   2014-01-23 (Thu, 23 Jan 2014)

  Changed paths:
    M master/buildbot/status/buildset.py
    M master/buildbot/status/mail.py
    M master/buildbot/status/status_gerrit.py
    A master/buildbot/test/unit/test_status_buildset.py
    A master/buildbot/test/unit/test_status_gerrit.py
    M master/buildbot/test/unit/test_status_mail.py
    M master/docs/developer/classes.rst
    A master/docs/developer/cls-buildsetsummarynotifiermixin.rst
    M master/docs/manual/cfg-statustargets.rst
    M master/docs/relnotes/index.rst

  Log Message:
  -----------
  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.


  Commit: a429c715e69f4401c884bc8cf36810db8e210dff
      https://github.com/buildbot/buildbot/commit/a429c715e69f4401c884bc8cf36810db8e210dff
  Author: Dustin J. Mitchell <dustin at buildbot.net>
  Date:   2014-04-06 (Sun, 06 Apr 2014)

  Changed paths:
    M master/buildbot/status/buildset.py
    M master/buildbot/status/mail.py
    M master/buildbot/status/status_gerrit.py
    M master/buildbot/steps/source/git.py
    A master/buildbot/test/unit/test_status_buildset.py
    A master/buildbot/test/unit/test_status_gerrit.py
    M master/buildbot/test/unit/test_status_mail.py
    M master/docs/developer/classes.rst
    A master/docs/developer/cls-buildsetsummarynotifiermixin.rst
    M master/docs/manual/cfg-statustargets.rst
    M master/docs/relnotes/index.rst

  Log Message:
  -----------
  Merge adeason/buildbot:gerrit-fixes (PR #899)

Conflicts:
	master/docs/relnotes/index.rst

+autopep8


Compare: https://github.com/buildbot/buildbot/compare/2f9c8b8ef0f7...a429c715e69f


More information about the Commits mailing list