voting in gerrit: merge at +3? (+2+1 / +1+1+1)

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Oliver Smith osmith at sysmocom.de
Fri Dec 7 15:36:27 UTC 2018


On 11/28/18 12:04 AM, Neels Hofmeyr wrote:
> Looking at the dudle, I now see that clearly this is your favorite:
> 
> "merge at three votes, by enforcing from gerrit: we install a plugin to add up
> voting, +3 allows to merge, at first no-one has +3 permissions"
> 
> So, we need a volunteer to try out that prolog snippet Max pointed out:
> https://gerrit-review.googlesource.com/Documentation/prolog-cookbook.html#_example_13_1_1_2_code_review

I took a shot at this. Reading up on the docs, I was surprised that the
prolog code does not go into the gerrit installation. But instead into
the git repository along with the code. From the top of that docs site:

  $ git fetch origin refs/meta/config:config
  $ git checkout config
  ... edit or create the rules.pl file
  $ git add rules.pl
  $ git commit -m "My submit rules"
  $ git push origin HEAD:refs/meta/config

Obviously not everybody is allowed to do this. I get (after making sure
that the remote url points to gerrit, not git.osmocom.org):

  fatal: Couldn't find remote ref refs/meta/config

So my suggestion is, that somebody who has the permissions, tries to
push the rules.pl file to one not-so-important Osomocom repository for
test purposes. And then we simply try it out.

Regarding the contents of the rules.pl file, it seems we only need to
change "2" to "3" in the following line of the given example. Counting
to three is supposed to be easy after all.

    add_category_min_score(NoCR,'Code-Review', 2, Labels),

The docs also say (on top) that these rules may be disabled with
"rules.enable=false" in the gerrit config. It does not sound like that
is the default, but in case it is, we would need to provide a
'$site_path'/etc/gerrit.config file that overrides this.

My understanding is, that gerrit.osmocom.org runs the docker container
from docker-playground.git/gerrit. I've patched it to build again, and I
can add the config file there if necessary.

https://gerrit.osmocom.org/#/q/topic:docker-gerrit-fixes

Regards,
Oliver

-- 
- Oliver Smith <osmith at sysmocom.de>            https://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschaeftsfuehrer / Managing Director: Harald Welte



More information about the OpenBSC mailing list