Just for fun

Why are we hiding from the police dad? They use vi son, we use emacs.

Gerrit User Summit 2016, Mountain View, CA

As you may know i was participating in this year Gerrit User Summit, 12th-13th November 2016, followed by Developer Hackathon in Mountain View, CA.

There were plenty of great talks, including EMail ingestion, Atomicity with change-sets, Gerrit analytics, Update on new and shiny UI, called PolyGerrit, based on Google’s own Polymer project, Zero-downtime Gerrit upgrades and what’s new and in Gerrit 2.12, 2.13 and coming next 2.14 releases.

I gave a talk about the status of my work on implementation of Bazel build for Gerrit.

After the user conference we had couple of days of Gerrit developer hackathon, where I continued to work on Bazel build implementation for Gerrit, approaching the feature parity with Buck build implementation. During the hackathon I uploaded a CL for removing Buck build, so that the new Gerrit version is going to be built and released with Bazel only.

I would like to thank Firma Frobese GmbH for sponsoring travel cost for my participation.

Gerrit Hackathon at SAP, Walldorf

In September 2016, I attended 5 days Gerrit developer hackathon, in Walldorf, SAP.
As always it was a big pleasure to meet SAP Git/Gerrit hackers in person:
Sasa, Matthias, Michael and Chris.

I finalized my work on extending labels in secondary index to be change owner votes aware. Now it’s possible to use these gerrit queries:

Skip WIP changes, rejected by change owner:

is:open NOT label:Code-Review-2,owner

Skip non reviewable changes, approval by change owner:

is:open NOT label:Code-Review+2,owner

Detect changes, that violates “non-self approval policy”:


Suggest changes for auto merge: approval by change owner + verify by the bot (assuming default label set: CRVW + VRFY):

NOT label:Code-Review-2
NOT label:Verified-1

Continue reading

Adding OAuth authentication scheme for Gerrit

I gave a talk on last FOSDEM about Gerrit User Authentication. Here are the slides. It was a long and interesting journey to add OAuth authentication scheme support in Gerrit Code Review. Luca spent a lot of time trying to get GitHub OAuth support in Gerrit core. After almost 1 year work on this change and countless reviews and addressed comments (57 patch set) it was abandoned. But the work wasn’t in vane. The lessons learned form this attempt was:

  • There must be support for multiple authentication providers
  • Because of the nature of the OAuth providers, the support cannot be done in Gerrit core, and must be done as a plugin
  • To write a plugin extension point must be exposed first (tja, keine Arme, keine Kekse!)

However, in the past there were quite some attempts to implement generic pluggable auth scheme extension point, but they all were abandoned. So it was more or less clear if we would revamp the attempt to introduce something totally generic it would require a lot of efforts and would take another couple of years of work. Instead we should try to add KISS extension point, just for OAuth. Sure, some folks in the wild were disappointed, because they would prefer to see a big generic pluggable auth extension point in Gerrit, but we just wanted to get the job done for this specific use case.

Another thing to solve, after the extension point was extracted and plugin support for the following OAuth providers Google, GitHub, CAS and BitBucket was introduced, was OpenID providers. That why I also added Hybrid OAuth+OpenID auth scheme support.

I would like to thank Norbert Thiebaud from The Document Foundation for invaluable help in many discussions we had during my work on Hybrid OAuth+OpenID authentication.

Gerrit User Summit/Conference in Mountain View, CA

As you may know i was participating in this year Gerrit User Summit, 21-26 March, followed by Developer Hackathon in Mountain View, CA.

I had three presentations: Gerrit@LibreOffice with detailed explanation of Gerrit Buildbot plugin and two feature requests:

Among other presentations Edwin summarized new features in upcoming Gerrit 2.9 release, that was later converted to regular documentation page in Gerrit. Shawn presented plans for future Gerrit/Git development:

  • Moving from database to Git to store meta data
  • Provide alternative Git storage backend(s) to file system backend.
  • Improving Git submodule feature set

During the Hackathon i continued the work on inline edit feature: to allow to change code during review directly in browser. It should also have support to create a new empty isolated change and a follow-up change from a given change directly in browser and allow to populate it with code changes.

On Sunday we had mountain bike tour in Santa Cruz national park. Thanks Edwin for these great pictures:

Big thank to The Document Foundation for funding my participation.

Gerrit Code Review 2.8 is released

Last week Gerrit Code Review version 2.8 GA was released. It is a major release and devs have spent 8 months and two Hackathons in London and Boulder to release it. The highlights are:

  • Secondary index support
  • New change screen
  • New plugin API

While each of this features can fill out the whole release for itself, all three combined explain why Gerrit users, developers and early adopters are so excited about the availability of Gerrit 2.8 GA.

Continue reading

Main reason to use open source software: customizability

Why are we using open source software? Well that’s a rhetoric question and i am sure you come up with many reasons for that, just to name few:

  • Freedom
  • Quality
  • Security
  • Try it first
  • Community

And many others. How about customizability? Have you already realized that some feature is missing in product “foo”? Fine, what now? Well try to bring the vendor to extend it. But wait, we are using open source software, right? Let’s patch it then ;-) Let’s see how easy it is … but the problem first:


usage: git [--version] [--exec-path[= ]] ...

The most commonly used git commands are:

add      Add file contents to the index
branch   List, create, or delete branches
clone    Clone a repository into a new directory

So now let’s compare that output with our another favorite tool that we all so love: Gerrit:

$>ssh gerrit gerrit --help

gerrit COMMAND [ARG ...] [--] [--help (-h)]
Available commands of gerrit are:


Continue reading

How Gerrit fits in LibreOffice CI Infrastructure

As you may know, LibreOffice undergoes currently migration to code review system gerrit. In his post to dev ML Why Gerrit and other consideration Norbert Thiebaud explained the objectives which the initiators of that move are trying to achieve. As though by chance, the first reason behind that move was cit.

a/ Allow dev to pre-build commit on a variety of platform _before_
pushing them to master. iow check and push rather than the current
push and fix. [...]

To see how gerrit fits in current LibreOffice CI picture or what should be done for it let us first take a look at the situation prior to gerrit migration. At the moment there are 23 Tinderboxes (TB), that independently running on donated machines and asynchronously verify different git branches. They upload the build results to the master TB per mail. Master TB extracts the log from the mail and puts it to the web site for that specific branch, i.e. for master you can find it here. Continue reading

Setting IRC gerrit bot for LibreOffice project

LibreOffice project is migrating currently to gerrit code review system. While gerrit provides mail channel out of the box, to install IRC gerrit bot to get notified on all or some gerrit events you are on your own. Thankfully OpenStack project comes to rescue, they have created and extracted simple yet very powerful multi project and multi channel gerritbot. It has 3 prerequisites:

  • python-daemon
  • python-yaml
  • irc

To be configured it needs two files: one for gerrit and IRC configuration and one for mapping of multiple IRC channels to gerrit events. Sample for gerritbot.cfg file:



Continue reading