Summary of the 2016 Berlin Gerrit Hackathon

Between 14th and 18th of March 2016, the second Berlin based Gerrit Hackathon took place. It was a joined effort of CollabNet and Elego to host it.

Our event attracted 17 people from various companies, including five Gerrit maintainers. Here is the full list of participants:

  • Dave Borowitz (maintainer) (Google),
  • Saša Živkov (maintainer) (SAP),
  • Edwin Kempin (maintainer) (Google),
  • David Ostrovsky (maintainer) (Individual),
  • Hugo Arès (maintainer) (Ericsson),
  • Han-Wen Nienhuys (Google),
  • Khai Do (OpenStack / IBM),
  • Alan Tokaev (Individual),
  • Sebastian Schuberth (Here),
  • Martin Waitz (AREVA GmbH),
  • Oswald Buddenhagen (Qt),
  • Patrick Hobusch (Elego),
  • Patrick Steinhardt (Elego),
  • Eryk Szymanski (CollabNet),
  • Jacek Centkowski (CollabNet),
  • Johannes Nicolai (CollabNet),
  • Dariusz Luksza (CollabNet).


The hackathon started with the announcement of new Gerrit maintainers. Three members of the community:

  • David Ostrovsky,
  • Hugo Arès,
  • Andrew Bonventre

were granted +2 and submit permissions, this extends the number of maintainers to 9 persons. With more maintainers, the Gerrit project should gain in the speed in which patches can be reviewed and merged. Did I mention that two of those new maintainers were participating our hackathon?

Hackathons are always about getting things done. This time 129 patches were merged into various projects hosted on the gerrit-review. Here is the list of some of the topics that were developed and merged during the hackathon. Let me now elaborate bit more on some of them.

Git-lfs (Large Files Support)

Having whole repository history on your local hard drive is one of the advantages of Git. This removes network latency from the picture when one would like to analyze history eg. finding the author of a particular piece of code using the `git blame` command or finding commits that introduced regressions using `git bisect`. But with this approach also come a price to pay. Any file that was checked in to the repository is always present in its history. This is a pain point especially when dealing with binary files. Those are usually big (like couple hundreds of megabytes or even gigabytes). Cloning repository with such files can take ages.

Git-lfs is an attempt to offload “large files” from the git repository. It will store those in a separate location and only fetch when they are needed.
During the Hackathon Gerrit learned to speak the git-lfs protocol! Gerrit core understands now git-lfs requests and will forward them to the git-lfs-storage plugin which is responsible for retrieving and storing large files. Currently there are two plugins:

  • lfs-storage-fs – uses local hard drive to keep files,
  • lfs-storage-s3 – uses Amazon S3 instance to keep files.


gerrit-hackathon-2016-2Further improvements to NoteDB

Gerrit is on its way to removing its dependency to an external relational database by storing all necessary data (like reivew comments, votes, user account data) in the git repositories themselves. There are two main drivers behind this move:

  • Ease of back-up and restore,
  • Gerrit Multimaster.

The current Gerrit master can store user account related data in NoteDB, for more details you can see account-index-gh16 review topic.

Tagging review comments

This is one of the long outstanding feature request for organizations with lots of verification jobs (like LibreOffice or OpenStack). The main idea is to hide and show comments and votes from CI systems or any kind of automation/verification bots.

This idea was generalized so that it can also fit others needs.

Current implementation adds new property to the ReviewInput data structure called “tag”, it accepts a single string value, that will be populated on the all comments and votes send as a part of ReviewInput. Later the value of “tag” property will be also included in ChangeMessageInfo, ApprovalInfo and CommentInfo allowing the Web UI (or any kind of user interface) to filter data based on particular value of “tag” property.

Diffing merge commits

Yet another long outstanding feature request for Gerrit, with many approaches to implement it in the core. The latest attempt is really close to be merged in.

With this approach, merge commits will have entries for each parent in the “Diff against” drop down. This way one can see (and comment on) the changes that are brought in by this merge commit. This would enable pull-request-like workflows with Gerrit.

Later on we would teach Gerrit to preselect the parent commit which is part of the target branch already. I’m really looking forward for this feature in Gerrit!

Gerrit Android application

Just before the Hackathon, Edwin Kempin announced the birth of the Gerrit Android application. This app should help you with filtering out interesting review requests while you commute or have some spare time but don’t have a laptop with you. From the app you can briefly scan opened reviews and mark those your are interested in reviewing later. This should make life simpler especially for large project with multiple review request opened every hour.

Once again I want to thank all participants for theirs effort in making Gerrit better and our sponsors CollabNet and Elego for giving us opportunity and place to hack Gerrit!

Dariusz Luksza

Committer at EGit project, OpenSource and Linux enthusiast.

Tagged with: , , , , , ,
Posted in Enterprise Git, Git, Jenkins, SCM

Leave a Reply

Your email address will not be published. Required fields are marked *