About Git and Gerrit Code Review for the Enterprise

Official blog for GerritForge

Gerrit v3.4.0-rc5: weekly update

Merged Changes

From Luca Milanesio:

    Allow GerritAccount Cookie authentication for Git/HTTP
    Bug: Issue 14508
    Change-Id: I2a56197ee0dad479f0973192157e5970d9deac25

    Avoid multiple auth requests for Git/HTTP access
    Bug: Issue 14497
    Change-Id: Ibe41df0357b6be10bcdf0bd1f5a1b6160c34d4a4

    Introduce LDAP metrics
    Bug: Issue 14490
    Change-Id: I18e5d5b797b272ca11a6745bc39dcd73cab68c34

    Add unit-tests for ProjectBasicAuthFilter
    Change-Id: Ib9abf133d2128b6a29751ecbeda26b0b43115bb3

From Han-Wen Nienhuys:

    Documentation/user-review-ui: remove intraline diff mention
    Change-Id: I15faa971d5cfe80ab82295f1af4e307da1d17f10

    Documentation/user-review-ui: show just a single shortcut help screenshot
    Change-Id: I2ad396a20767221f293d2ec59e6ac61a85e12629

    Documentation/user-review-ui: remove mention of old UI
    Change-Id: I88adb24c5883410bc62b9e290e4077e6b845474a

    Documentation: rename all images for user-review.txt to gwt-*.png
    Change-Id: I42735800679736ef277a053e042908677c4db5ef

    Documentation: remove unused GWT image files
    Change-Id: Ie470c983509310b4a6eb35eedbc03ffa5e8028cd

From Matthias Sohn:

    Update jgit to a9579ba60cd2fd72179dfd8c2c37d389db5ec402
    [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=552173
    [2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=573328
    Change-Id: Id3a4adc0faf27e7bcd2017ab439aa2230cf92b33

    Add new command convert-ref-storage to index
    Change-Id: If3a93e65333d1a5f299273711162d81e1b653e1b

From Antoine Musso:

    download_file: download to GERRIT_CACHE_HOME when set
    Change-Id: Ie4fac83928527e0e71b159b9500983234c2261ac

From Prudhvi Akhil Alahari:

    Fix EqualsLabelPredicate to not fail when calling match() from a plugin
    Change-Id: Icd2541fe26c18a8e61ce855862e0c9814a91f5ef

From Thomas Dräbing:

    Respect auth.userNameToLowerCase when creating accounts via REST or SSH
    Bug: Issue 14246
    Change-Id: If0f120f188e9f5bdf8008c4e66a55568180e7351

Issues Fixed

  • Issue 14246: Creation of internal account does not respect auth.userNameToLowerCase
  • Issue 14490: Missing LDAP metrics for authentication
  • Issue 14497: Git/HTTP traffic overloads LDAP with duplicate authentication requests
  • Issue 14508: Issue 14508: Gerrit authenticates more than once for a Git/HTTP high-level operation

Issues Raised

  • Issue 14388: Mobile diff context buttons do not work properly

Gatling E2E results

Git protocol simulation:

Gatling full results:
https://gerrit-ci.gerritforge.com/job/gatling-gerrit-test/360/gatling/report/gerritgitsimulation-20210511183716601/source/index.html

Gatling simulation class:
https://github.com/GerritForge/gatling-sbt-gerrit-test/blob/master/src/test/scala/gerritforge/GerritGitSimulation.scala

Gerrit UI REST simulation:

Gatling full results:
https://gerrit-ci.gerritforge.com/job/gatling-gerrit-test/360/gatling/report/gerritrestsimulation-20210511184140917/source/index.html

Gatling simulation class:
https://github.com/GerritForge/gatling-sbt-gerrit-test/blob/master/src/test/scala/gerritforge/GerritRestSimulation.scala

Gatling 10-days trend

Gerrit v3.4.0-rc4: weekly update

Merged Changes

From David Ostrovsky:

    Tidy up dev-plugins.txt documentation
    Change-Id: Ia3b09d5febcfe9ab1805bd2e55963aa6c6624f6a

    Reftable: Add convert-ref-storage ssh command
    Bug: Issue 14138
    Change-Id: I0ddd2370619de287ec757597ba57e8b757611808

    Bazel: Tidy up gerrit_js_bundle rule
    Change-Id: I9b3e757717a64e8538d5d05bdb86b3b26c9f363d

    Make srcs in gerrit_js_bundle optional
    Change-Id: Ifaca618836098798dfbad10c2f5c2aee10f6097f

    Fix link for change.enableAssignee configuration option
    Change-Id: I2faef25ea62119184e1a837b647b9cccdc246354

    ErrorJsonLogEntry: Use IP address as host value in logging event
    Change-Id: Ie3a246ff277a0b8646dbe11acdb2b53aa659800e

    Bazel: Add gerrit_js_bundle rule
    Change-Id: Ia8421a9ef6f1ad91808bb698769da84022f63973

From Edwin Kempin:

    Allow tests to check how much Counter0 metrics are increased by a call
    Change-Id: I79da799c86325eb64922a92caec8a476e4e6a4ae

From Ben Rohlfs:

    Improved and more sophisticated handling of check action results
    Change-Id: I4f139bbe913c60fbdcea27dd9ea1e3f605bb19cb

    Add documentation for the new Checks JavaScript Plugin API
    Change-Id: I82cd3c9af9c918b1c26ea1cb8a70e3283138ac31

    Add links to frontend plugin examples
    Bug: Issue 14421
    Change-Id: I123f1717ac691eda20709c20764db457c58b42e2

    Remove draft warning from Checks API
    Change-Id: I267b2792efee3baa27ebbe6915b0c7813efab566

    Update all the plugin examples
    Change-Id: Idc6473377bb5966f0bc199bfc68977297df4f802

    Tiny documentation fix
    Change-Id: I505419cdf03bfe5dd3a1dd28eeb84def36a3669a

    Update the JavaScript Plugin API documentation
    Bug: Issue 14421
    Change-Id: I5869c8168fe27bea81226b0b8f1dc40b271c2454

From Youssef Elghareeb:

    Rename SubmitRequirement to LegacySubmitRequirement
    Change-Id: Ib55038627c95ece82a7eddd64e317183f1752487

From Patrick Hiesel:

    SubmitRecord.Status: Reserve RULE_ERROR for user-caused errors
    Change-Id: I018ce9e13fa40f2f24546df49ecf7fc3fbb72b1b

Issues Fixed

  • Issue 14138: expose JGit reftable conversion as Gerrit SSH command
  • Issue 14421: Update the Frontend Plugin Documentation

Issues Raised

None

Gatling E2E results

Git protocol simulation:

Gatling full results:
https://gerrit-ci.gerritforge.com/job/gatling-gerrit-test/348/gatling/report/gerritgitsimulation-20210504002334245/source/index.html

Gatling simulation class:
https://github.com/GerritForge/gatling-sbt-gerrit-test/blob/master/src/test/scala/gerritforge/GerritGitSimulation.scala

Gerrit UI REST simulation:

Gatling full results:
https://gerrit-ci.gerritforge.com/job/gatling-gerrit-test/315/gatling/report/gerritrestsimulation-20210426212355447/source/index.html

Gatling simulation class:
https://github.com/GerritForge/gatling-sbt-gerrit-test/blob/master/src/test/scala/gerritforge/GerritRestSimulation.scala

Gatling 10-days trend

Gerrit v3.4.0-rc3: weekly update

Merged Changes

From David Ostrovsky:

    Bazel: Remove assets parameter in polygerrit_plugin rule
    Change-Id: I86b996a4e98c7ea8ea35bfda097ff60092078028

    EventGsonProvider: Register generic event serializer adapter
    Change-Id: I7dc6e6a859152ee3e30a90075ddd34814720eba1

    EventJsonTest: Add test for custom event serialization
    Change-Id: I7e45f77aa980c03896e3891c2d48680e31d2e0a6

    Disable peer IP in reflog record per default
    Bug: Issue 10810
    Change-Id: Ia7a04cdce0425989059b92131afd8c2f6030d10b

    Allow to suppress peer IP in reflog records
    Bug: Issue 10810
    Change-Id: I5645a4e68fb48ad155609573aea2518480074697

    Remove enableReverseDnsLookup configuration option
    Change-Id: If33c6e1901b70ca64d9b32b0ebb310f3a9daf017

    Revert "Respect enableReverseDnsLookup option in ErrorLogJsonLayout"
    Change-Id: I8f74ca039246753f775b7bfc96596e3f5159af01

    Clean up polygerrit_plugin rule
    Change-Id: Ie46a8f02a2b485a856916fe14002dc6d0e710c20

From Paladox:

    Remove KnownExperimentId from gr-comment-thread
    Change-Id: Ib13d07e6dc71e3133fdc249c72809082c0fa915b

    Cleanup undefined check for access in getRepoAccess
    Change-Id: Ieefab7e709a4124409ced7cb86ecdde37748d906

From Frank Borden:

    Upgrade package.json dependencies
    Change-Id: Ifb400606b6c420f732bb36e87bf43018253757ee

From Ben Rohlfs:

    Add a SHOW ALL button to check result sections    
    Change-Id: I6be8585c285db6255e25060f61008cb57232f154

    Add support for top-level links in the Checks Tab
    Change-Id: Icca6e93b44b28d33607032e2a4d74327a684c2a8

    Remove experiments for comment context and checks
    Change-Id: I130b7846414e281062906def588151da71d72d96

    Implement a detailed check run hovercard
    Screenshot https://imgur.com/a/9grF5sm
    Change-Id: I185264d0ce02726487facda19c116b9351fc9a7f

    Fix target area for expanding/collapsing check result rows
    Change-Id: Ibdd08e8732e047c62a453b02324408466817305a

    Fix counting of selected and filtered check results
    Change-Id: Iea4c1816dd23272678bcd5aa0f3ff549257606ed

    Do not always show the checks error message
    Change-Id: I61656729770322bb1795c44fd297fda4d1a0256d

    Refined UI for checks error responses
    https://imgur.com/a/baILcJl
    Change-Id: I63f1cc5f128681f46cae3ab875744946b8537ea4

    Add handling of not-logged-in and error states
    Change-Id: I701a2fbdebca8d5b4adc437554b49597c8cc166a

    Fix checks utility for link icons
    https://imgur.com/a/ZMFEuGr
    Change-Id: Ie242e578ff91def52c559a10124d82b836077b90

    Change check tag/label font color from deemphasized to primary
    Change-Id: Ie2de29d019d7ccab8075d212600a3da0267fc8e1

    Add actions and links to check result rows    
    Change-Id: I2ff5a594bcc927910855d89c52484a5aef4581e0

    Fix the color of the attention and status icons
    Change-Id: I2a32e1f22848e122c0fd3016d8b91fbc16d029a6

    Only render expanded checks row once the user has clicked the row
    Change-Id: I4039953a63a84995577f309dcb2fbfee5680be86

From Milutin Kristofic:

    Remove new-change-summary feature flag from gr-change-view
    Change-Id: I971bc62bacc61b1985adb5de8d4fd36da68f2f46

    Remove old implementation of gr-related-changes-list
    Change-Id: Ic42f9af760042cd0e080a29b09c3d21d20bd161c

    Move tests from old to new gr-related-changes-list
    Change-Id: I631cde95d00a1e54b1820232733424b28f74bff4

    Remove new-change-summary feature flag from gr-change-summary
    Change-Id: Id27fb05cd42186cea5de068da791a73c7f0064cb

    Remove new-change-summary feature flag from gr-change-metadata    
    Change-Id: Ie2116e83e258b46c546056b6a9b6867e1dadcd35

    Remove new-change-summary feature flag from gr-thread-list   
    Change-Id: I8eaf790199c80956cf3c32e70d7e6fde133cabbd

    Remove new-change-summary feature flag from gr-thread-list    
    Change-Id: I8eaf790199c80956cf3c32e70d7e6fde133cabbd

    Remove new-change-summary feature flag from gr-editable-content    
    Change-Id: Ic324b6f210fc37ee5e52253dc0658c89e395c0ef

    Remove new-change-summary feature flag from gr-reviewer-list
    Change-Id: I6675f9e57244fd70b940d6a659e0dcd8d1533388

    Remove 'shared-styles' from most frequent gr-elements
    Change-Id: I7ab764397fb0bda92e7c784e5c0aac2d17c2e63d

    Remove new-change-summary feature flag from gr-change-requirements
    Change-Id: I77e6f174a73979b8c6e52f67953909e97964ae9e

    New change summary UI - fix small A11y issues
    Change-Id: I29310115583b7c5ac349923d6014dd49f66aaa1a

    Always show add topic row in metadata
    Change-Id: I794c028c8f9c81b43918511fac193b702c20f147

    Pressing enter on focused button supress keyboard shortcuts
    Change-Id: I6d28ebd022041a617be645fcd7f89ecb68d9cc54

From Dhruv Srivastava:

    Only show Merged As info if change has been merged
    Change-Id: I2405bf98dbb6542cb36cc0767dc79d61061bf3c8

    Remove patchset level comments from patchset dropdown count
    Change-Id: Ib4fc43e0c3797834b72a765ae2afce6f70871e9d

    Show user first in list of reviewers in change view
    Screenshot: https://imgur.com/a/FW60KC2
    Issue: Bug 14366
    Change-Id: I5ae9fc2e1b90f2dbbb7040d81be0e69f44ce9e3a

    Clean up Add Patchset Description from File List header
    Change-Id: Ia1ce16f776f81f734c0b03acce60a02e46190465

    Move Merged as info from change header to change summary
    Screenshot: https://imgur.com/a/MgZNe7G
    Change-Id: Ie2a5715dc65a20447f296f5246962b6445836490

    Show Code Review quick approve button with missing labels
    Change-Id: I3f9179177d92a7b7932353da1a36c5decad599ec
    (cherry picked from commit 25ca8ea4e9b9abb65ec6cc05af767a7e03b479da)

From Dmitrii Filippov:
    Fixes for Typescript 4.2
    Change-Id: I2387d5664c6748a1194ca52a0560d1d961ca64e4

    Fix and update license generator
    Bug: Issue 14175
    Change-Id: Ifd38a8e3ae7f06354e00aee420f282773b64583a

From Edwin Kempin:

    Export PluginPushOption for use in plugins
    Bug: Issue 14362
    Change-Id: Ie64c22bc4fed65950844dd4cd9a3e5328fe4eb8f

From Matthias Sohn:

    Welcome administrator of freshly installed Gerrit site
    Bug: Issue 12209
    Change-Id: Ib26372a610ab2e9c8266a71c9b2c41cfda9a051a

From Luca Milanesio:

    Avoid NPE when logging incoming HTTP request
    Bug: Issue 14410
    Change-Id: I4bdbe7418ccc4b223fa57b7fb49c2aa46f5d3982

    Add initial stream-events acceptance tests
    Bug: Issue 13799
    Change-Id: I6987d413ba911039e56950425b501573b4555204

Issues Fixed

  • Issue 10810 : Gerrit leaks user IP address to project owners
  • Issue 12209: Remind users that install Gerrit newly to join the Gerrit community and register on repo-discuss
  • Issue 13799: No tests for stream-events
  • Issue 14175: //Documentation:check_licenses target fails with python 3 on stable-3.3 branch
  • Issue 14362: uploadvalidator check should be bypassable
  • Issue 14410: NPE when tracking Gerrit HTTP logs
  • Issue 14366: Always show self first in list of reviewers on change page

Issues Raised

  • Issue 14336: PolyGerrit: no way to configure checkers using UI provided by checks plugin

Gatling E2E tests results

Git Protocol Simulation:

Gatling full results:
https://gerrit-ci.gerritforge.com/job/gatling-gerrit-test/315/gatling/report/gerritgitsimulation-20210426212117440/source/index.html

Gatling simulation class:
https://github.com/GerritForge/gatling-sbt-gerrit-test/blob/master/src/test/scala/gerritforge/GerritGitSimulation.scala

Gerrit UI REST Simulation:

Gatling full results:
https://gerrit-ci.gerritforge.com/job/gatling-gerrit-test/315/gatling/report/gerritrestsimulation-20210426212355447/source/index.html

Gatling simulation class:
https://github.com/GerritForge/gatling-sbt-gerrit-test/blob/master/src/test/scala/gerritforge/GerritRestSimulation.scala

Gatling 10-days trend

Gerrit v3.4.0-rc2: weekly update

Merged Changes

From Milutin Kristofic:

    Fix underlining on hover for subject column in dashboard
    Change-Id: Ie0c55bbe550f1714f1f9f630ac81f6c686184221

    Revert "A11y - show outline when focused on tab title in change view"    
    Change-Id: I6d8f74c4d01004a88b0dbf207d9d9741a6965755

From Mike Frysinger:

    Fix typo in hashtags docs
    Change-Id: Idabd8994651451183472eb3b777064e891e8a765

From Dmitrii Filippov:

    Do not reload page after clicking Cancel in apply-fix dialog    
    Change-Id: I5830caac655df9d3dc7058dc9674ba727685012b

From Paladox:

    Add undefined check for access[repo] in getRepoAccess
    Change-Id: I16f3344c9f11cb230adafa7fdc8457ac37b4ae70

    Add web links to project:<project>
    Change-Id: Iefda4bb5571d917d5fa9f24c02c8e4a3be2c6c52

From Dhruv Srivastava:

    Turn off syntax highlighting in comment context if disabled
    Change-Id: I89625a9b15678c1a63543d36f9f7d835bb39b359

    Allow comment context to take up remaining width 
    Change-Id: I1dab57df26b0fed98efead1a18083d9a504ed40f

    Make the line length indicator color clearer
    Issue: Bug 13648
    Change-Id: I523d971f39db477d67e212d1175ec6f5be8be24d

    Remove Add/No Patchset description label for merged changes
    Change-Id: I18643bcf01e10177a28411089ac1b312222d3e23

From David Ostrovsky:

    Bazel: Disable worker multiplexer to avoid sporadic build failures
    Change-Id: I2265c4ed7128a4b6ed259f44c5594ab717de58b0

From Ben Rohlfs:

    Allow line wrapping in check result messages
    Change-Id: Icedc05bbc28fbe513c60a5eb9853dadde636381b

Issues Fixed

  • Issue 13648: Make the line width guide in commit description to be darker

Issues Raised

Gatling E2E tests results

Git Protocol Simulation:

Gatling full results:
https://gerrit-ci.gerritforge.com/job/gatling-gerrit-test/305/gatling/report/gerritgitsimulation-20210419190719877/source/index.html

Gatling simulation class:
https://github.com/GerritForge/gatling-sbt-gerrit-test/blob/master/src/test/scala/gerritforge/GerritGitSimulation.scala

Gerrit UI REST Simulation

Gatling full results:
https://gerrit-ci.gerritforge.com/job/gatling-gerrit-test/305/gatling/report/gerritrestsimulation-20210419190957647/source/index.html

Gatling simulation class:
https://github.com/GerritForge/gatling-sbt-gerrit-test/blob/master/src/test/scala/gerritforge/GerritRestSimulation.scala

Gatling 10-days trend

Gerrit v3.4.0-rc1: weekly update

Starting from this week, GerritForge provides a weekly status update of how the Gerrit v3.4.0 release plan is progressing:

  1. List of merged changes since the previous RC
  2. List of issues fixed
  3. Result of the Gatling E2E tests on AWS

We hope that having these regular updates would help you focus on what is changing during the release plan execution and do more research, learning or specific investigation on the areas that are more pertinent to your use case.

Also, because the Gerrit release candidates do not come with an associated set of release notes, the list below would help people understand the new functionalities or fixes coming through every week.

Both Gatling-Git and the AWS-Gerrit project with a complete production-ready setup are projects started by GerritForge and contributed as OpenSource to the Gerrit community.

Merged changes

From Matthias Sohn:

    Log memory allocated per command in httpd_log 
    Change-Id: Ie0ce1382a8515e6dfb7d0d3fe10b3e64c0cf9aee

    Log cpu usage per http request   
    Change-Id: I9e78bed5219f9baf57a2b76f0f947efff334ffe5

    Log memory allocated per command in sshd_log
    Change-Id: Ifc1d274bf42eb3cb9b2cf46271b6be0117aa8b18

    Add metrics for monitoring Java memory pools
    Change-Id: I60e5960899c0cff8c05983d299b414d7a646bb07

    Log cpu usage in sshd_log
    Change-Id: I1c53f64caf982c2f85195e6bda4c6d790f79a810

    Encapsulate fields of SshScope.Context
    Change-Id: If989630425ad40922aaf8958c4335aab0bb5c2c9

    Log "-" for missing log fields in sshd_log
    Change-Id: I90adc7618864f702b42029ab596c6014bd4c6cfe

From Ben Rohlfs:

    Remove backend support for HTML UI plugins
    Change-Id: I44cc0d15910937de7e1f9b9780a799d4b85b0673

    Stop producing html version of plugins
    Change-Id: I1036f06e385f2997f7bea849755729df2789acaa

From Milutin Kristofic:

    A11y - show outline when focused on tab title in change view
    Change-Id: Ie9456a5d886e70a77dae8f055a54a3a1a0045daf

    A11y - show outline when focused on change subject in dashboard
    Change-Id: I9c73e49de661a17928c6f96a290c2069503bdfb4

    A11y - fix and improve label when navigating dashboard
    Change-Id: Id01302aea38c783687443401290995bdd0764126

From Hermann Loose:

    Allow setting image viewer max-width and max-weight externally
    Change-Id: Ie151a85d8ede5cb7fa0899d9367ca0dccd887538

From Han-Wen Nienhuys:

    Fix meta_diff documentation
    Change-Id: I9c59a4857724cdfd59b995a6dc255f77d29b017e

From Paladox:

    Update plugins/codemirror-editor and plugins/delete-project
    Change-Id: Ieca7d2e36b9eefffe5c830962109e1fa62134b5c

    gr-confirm-move-dialog: Fix _getProjectBranchesSuggestions
    Change-Id: I8d4ead0bf3a8c30d0ecefdc190e4ba4ea7ede29d

    Remove unused _handleDropdownTap
    Change-Id: Ie4a8effd6d814985cafa6dea9239903f503dae33

    Remove unused _handleDropdownTap
    Change-Id: Ie4a8effd6d814985cafa6dea9239903f503dae33

From Dhruv Srivastava:

    Clean up upload change help dialog
    Change-Id: I0c72450c37326ec2c2922b74928e0b059df0043e

From Saša Živkov:

    Fix binding of DELETE REST calls from plugins
    Change-Id: I9b9632e8f719937e5f7c61466996be79e6f29c14

Issues fixed

  • Issue 14335: CodeMirror plugin broken
  • Issue 14127: REST API DELETE query for delete-project plugin doesn’t work

Gatling E2E tests results

Git Protocol Simulation

Gatling full results:
https://gerrit-ci.gerritforge.com/job/gatling-gerrit-test/287/gatling/report/gerritgitsimulation-20210412213548212/source/index.html

Gatling simulation class:
https://github.com/GerritForge/gatling-sbt-gerrit-test/blob/master/src/test/scala/gerritforge/GerritGitSimulation.scala

Gerrit UI REST Simulation

Gatling full results:
https://gerrit-ci.gerritforge.com/job/gatling-gerrit-test/287/gatling/report/gerritrestsimulation-20210412213912089/source/index.html

Gatling simulation class:
https://github.com/GerritForge/gatling-sbt-gerrit-test/blob/master/src/test/scala/gerritforge/GerritRestSimulation.scala

2021: What’s cooking in GerritForge

Our mission is to improve the Gerrit Code Review platform, with the Open-Source community and in full transparency. Everything we do is published, is open, can be analysed and scrutinised by any member of the community at any time.

In this article, we are publishing what GerritForge is planning to do in the forthcoming 2021, a pivotal year that will see the entire world bouncing back and looking at the future of Technology with a different light.

Goal: cloud-native Gerrit Code Review

Since our initial post in 2019 about our plans for the future, we have been making steady progress toward a unified global Gerrit platform, highly available and distributed across the globe. Since then, a lot of steps have been made, many of them happened in 2020.

Thanks to SAP and GerritForge, we have now two Open-Source standard deployments on the Cloud:

  1. K8s-Gerrit – Helm-charts for deploying Gerrit Code Review to a Kubernetes Cluster (beta)
  2. AWS-Gerrit – CloudFormation templates for creating a production-like setup of Gerrit HA and Multi-Site to ECS on the AWS platform.

Even if Gerrit can deployed now into a Cloud environment, that does not mean that Gerrit is cloud-native. The main requirements for making an application cloud-native is captured by the 12-factor principles. We will be tackling some of them in our 2021 roadmap.

Cloud-native backing services

Thanks to the advances in the Gerrit Multi-Site plugin in 2020, it is today possible to have a geographically distributed cluster of Gerrit servers around the globe. The services that are needed for coordinating the events across Gerrit nodes and ensuring global consistency are:

  1. Event-broker (Kafka)
  2. Global ref-db (Zookeeper)

The price to pay for a global Gerrit Multi-Site is currently quite high, because one may argue that actually managing a cluster of Kafka brokers or Zookeeper nodes can be even more challenging that managing Gerrit itself.

A cloud-native application should be fully independent from its backing services and be opened to swapping one specific implementation (e.g. Kafka) with a serviced off-the-shelf solution (e.g. AWS Kinesis, GCP PubSub).

As GerritForge we are joining the forces with the Gerrit Code Review community in 2021 for refactoring the Gerrit Event system and making it more Cloud-native, using open-standards for representing and publishing events across the network.

The immediate actions are:

  1. Build a new protobuf-based events representation in Gerrit v3.4
  2. Abstract the serialisation of events from their transport
  3. Implement different events brokers and listeners, other than the Kafka. (e.g. NATS)
  4. Provide a AWS Kinesis-stream event broker connector
  5. Provide a GCP PubSub broker connector in cooperation with Google

Gerrit performance across sites

Making a stateful application like Gerrit Code Review a truly cloud-native and distributed platform brings some challenges in terms of latency and performance.

The current Gerrit Multi-Site architecture still relies heavily on the traditional (push) replication plugin, which has been working nicely for over a decade for a Gerrit primary/replica setup. When the repository size increases and the need for global consistency becomes more stringent, relying on a traditional async git push is not enough anymore: you need a lot more tools at your service.

GerritForge has introduced in 2020 the pull-replication plugin, which enables to invert the replication logic: instead of having one Gerrit server to push everything to everyone else, you just tell the other nodes of what’s new in the repository, and it will be their responsibility to fetch only the stuff that has changed.

In 2021 we are going to improve the plugin with native JGit client protocol v2 support and features that will go well beyond the limits of the git protocol:

  1. BLOB and ref-update on remote git pulls. The remote Gerrit node can receive directly the content of what has changed, directly in its payload. That allows to avoid the expensive git pull operation especially for NoteDb related updates.
  2. Event broker integration for git pulls. Instead of relying on REST-API, the pull replication plugin can produce pull replication events in the event broker.

The implementation of those improvements will allow to drastically reduce the incidence of the traditional (push) replication activity and make the Gerrit user experience more seamless across sites.

CI integration

Integrate Gerrit in more seamlessly with other cloud-native services, such as CI/CD. Gerrit v3.4 is planning to introduce a brand-new style of integration which would not require anymore any 3rd party adaptation or API support.

GerritForge is committed to endorse this new module and allow Gerrit v3.4 to be fully connected with Jenkins on day-1 and potentially other cloud-based CI/CD systems.

Git reftable: provide more performance for mono-repos

GerritForge will experiment and test at scale the introduction of Google’s Git reftable, already included from Gerrit v3.2 onwards, to assess its performance impact on large mono-repos, with hundreds of thousands of refs.

Have your say on Gerrit future

This is our GerritForge shopping list for 2021, wide open for discussion, contributions, amendments, and voting.

Why should you care about what we do? Simply because the union of intents and cross-pollination of ideas make the Open-Source products and community stronger: if we join forces in building a solution that is a common interest for all of us, we will all benefit from it.

Your feedback is welcome and precious, feel free to have your say and comment this post with your ideas, likes and suggestions on how to make them even better.

The GerritForge Team.

GerritForge 2020 year in Review

Dear Gerrit Code Review fellow,

It has been a challenging year, a strange year, for everyone. Most of us confined in our homes and working remotely, finding new ways of dealing with old problems.

Still, we believe the Gerrit Community as a whole has demonstrated an outstanding level of resilience in the face of exceptional difficulties. As far as we are concerned, we have seen no lesser activity, interest, new projects, compared to the previous years. For this, we are thankful to the community we are so strongly proud of being a part of.

In sharing our most sincere vows for happy festivities and a fruitful new year, we wanted to take the opportunity to share with you some of the achievements that made this 2020 worth getting through.

Top-Ten achievements in 2020

1. GerritForge has confirmed to be the world’s largest non-Google contributor to the Gerrit Code Review project.

GerritForge contributed almost a thousand changes merged, over 47 different components in the past 12 months. That is an outstanding achievement confirming the commitment and dedication of the company to the Gerrit Code Review platform and community.

2. Improved Gerrit DevOps Analytics with the ability to process Changes hashtags

The Gerrit DevOps Analytics platform continued to expand its possibilities, with the full support of the parsing of the NoteDb changes and the extractions of precious meta-data, such as the changes hashtags.

3. Driven two major releases of Gerrit Code Review

GerritForge helped driving the release of two major Gerrit Code Review version: Gerrit v3.2 – 1st June and with Ericsson making the Gerrit v3.3 – 1st December. GerritForge is also providing the CI/CD pipeline for the build and validation of the releases and helped the migration to Java 11.

4. Released major security fixes for the whole Gerrit Community, of all Gerrit versions dating back to v2.14

GerritForge coordinated together with Ericsson the release of critical security fixes across 6 different versions of the Gerrit Code Review platform, showing a continued commitment to a secure and scalable adoption of Gerrit in the enterprise.

5. Brand-new Gerrit module cache-chroniclemap, a new high-performance persistent cache in Gerrit v3.3

GerritForge continued its efforts in improving Gerrit’s scalability and performance with the development of a brand-new persistent cache backend powered by ChronicleMap, showing unprecedented low latency and performance on Gerrit v3.3.

6. Introduced the world-first official Open-Source AWS-based Gerrit Code Review Deployment

In a year of remote working and flexible environments, GerritForge provided its contribution to the whole community to help adopting Gerrit in the cloud. The aws-gerrit project is a brand-new production-ready AWS deployment now available for everyone and fully Open-Source. The new project is based on the GitOps best-practices and has been successfully adopted for the testing and validation of Gerrit v3.3.

7. New read-write scalability for Gerrit in High-Availability

GerritForge’s mission to scalability and high-availability (HA) plugin continued with the ability to scale horizontally with multiple R/W Gerrit Servers behind the same load balancer.

8. Improved reliability and flexibility of Gerrit Multi-Site

The Gerrit Multi-Site (MS) plugin has received exciting improvements with the support for geographically distributed R/W Gerrit servers across the globe.

9. Brand-new pull-replication plugin for improving latency and performance of large mono-repos replication.

The need to have Gerrit multi-site brought the request to have faster replication, especially for large mono-repos. GerritForge introduced a new pull-replication plugin project that, used in conjunction with Git Protocol v2, assure top-notch performance in replicating repositories with large number of refs.

10. Helped large-scale OpenSource Community migrating to Gerrit v3

The Eclipse Foundation and the OpenDev platform (by OpenStack), upgraded to the latest version of Gerrit Code Review, thanks to the continuous help and support from GerritForge and the rest of the Gerrit Code Review community.


All the best, Stay Safe, and we will shake hands again soon!

The GerritForge Team

What’s new in Gerrit Code Review v3.2

gerrit-code-review-3.2-intro

Gerrit Code Review is unstoppable: despite the recent COVID-19 pandemic and the cancellation of the Spring Hackathon 2020, the community has made an extraordinary effort to deliver remotely and on-time the Gerrit v3.2 release on the 1st of June.

GerritForge has already migrated GerritHub.io on the day-1 of the release and is happy to share with you the highlights of this new release. If you need help to assess your current setup and migrating, please get in touch with us at https://gerritforge.com/contact.

Get ready to migrate: get rid of zombie comments

The migration process performs the cleanup of the zombie draft comments in the All-Users.git repository that has been left behind since the introduction of NoteDb back in v2.16.
Every user commenting on any change was creating a series of commits on the All-Users.git repository, where the draft comments are stored. Once the comments were finalised and applied to the change, they were not fully removed from the All-Users.git. That created a backlog of zombie comments on All-Users.git that are now being completely removed during the Gerrit v3.2 migration process.

Since Gerrit v2.16.16, there is a standalone utility to remove the zombie draft comments. You may want to do that operation upfront to make sure that the migration to v3.2 does not have a lot of processing during the init step. Also, make sure that the All-Users.git resides on a fast access local filesystem for minimizing the migration time.

If you do nothing, the cleanup utility will be automatically executed when migrating to Gerrit v3.2, bearing in mind that it may take quite a long time to complete. In our tests, it took around 10 minutes for 10k zombie comments.

WARNING: the execution time is not linear and it may take up to 48h of processing time for a staggering number of 1M zombie comments.

Migrate with zero-downtime

If you have on Gerrit v3.1.x in a high-availability configuration, you can upgrade seamlessly to Gerrit v3.2, without having to suspend or degrading the service in any way. GerritForge has a record number of installations done in high-availability and multi-site: if you are running a single Gerrit master today, you should get in touch with the GerritForge Team to help moving to high-availability.

For the very first time, the whole Gerrit Community can benefit from the ability to perform a rolling upgrade without any downtime.

The zero-downtime upgrade consists of the following steps:

  1. Have Gerrit masters upgraded to v3.1.6 (or later) in a high-availability configuration, healthy and able to handle the incoming traffic properly.
  2. Set gerrit.experimentalRollingUpgrade to true in gerrit.config on both Gerrit masters.
  3. Set the first Gerrit master unhealthy.
  4. Shutdown the first Gerrit master and then upgrade to v3.2.
  5. Startup the first Gerrit master and wait for the on-line reindex to complete.
  6. Please verify that the first Gerrit master is working correctly and then make it healthy again.
  7. Wait for the first Gerrit master to start serving traffic regularly.
  8. Repeat steps 3. to 7. for the second Gerrit master.
  9. Remove gerrit.experimentalRollingUpgrade from gerrit.config on both Gerrit masters.

NOTE: Gerrit v3.1.6 has not been released yet. However, if you want to perform a rolling upgrade today, you can download the latest build on the stable-3.1 branch from the GerritForge’s CI at https://gerrit-ci.gerritforge.com/job/Gerrit-bazel-stable-3.1/

GerritHub.io has been successfully upgraded on the 1st of June without any interruption of any kind using the above procedure.

Java 11 official support

Gerrit is now officially supported on Java 11, in addition to Java 8. Running on Java 11 was already possible from v2.16.13, v3.0.4 and v3.1.0, but not officially supported because of the lack of a CI validation on Java 11 for stable-2.16, stable-3.0 and stable-3.1 branches.

Gerrit v3.2 has been validated with Java 11, with the following known issues:

  • Issue 11567: Java 11 runtime & startTLS LDAP broken: ‘error code 8 – BindSimple: Transport encryption’.
  • Issue 12639: WARNING: An illegal reflective access operation has occurred, when starting Gerrit.

After 24h of adoption of Gerrit v3.2 on GerritHub.io, we have seen two major benefits from the migration to Java 11: overall reduction of the “old generation” build up in the JVM heap and massive reduction of GC cycles times and full-GCs.

screenshot-2020-06-02-at-11.48.30

Before the 29th of May, all GerritHub.io nodes were on Gerrit v3.1 / Java8. The old-generation JVM heap keeps on building up constantly until it reaches the 60GB and triggers a full GC cycle. After the upgrade to Gerrit v3.2 / Java11, memory consumption is very much under control. There are still possibilities of peaks with associated full GCs (see the one on the 30th of May around 12:00 BST) but there isn’t build up of old-generation objects anymore.

screenshot-2020-06-02-at-11.52.43

Java11 brings a lot of benefits also in reducing the latency of the individual GC cycles, showing much better performance with large heaps.
After the migration on the 29th of May, the GC graph is pretty much flat. The only full GC peak that is noticeable on the 30th of May lasted for just 5 msecs while the normal GC cycles are well below 1 msec, barely noticeable.

Performance is a feature

Shawn Pearce, the Gerrit Code Review project founder, used to say “performance is a feature”, which is very true. Any software nowadays can provide some basic out of the box features, thanks to the plethora of open-source components available out of the box. However, designing architecture and making it scale and perform to the levels that an Enterprise Code Review system needs, it is not easy.

Gerrit v3.2 is yet another significant milestone in the continued effort of the Gerrit maintainers and contributors in making Gerrit Code Review faster, more stable and available than ever before.

Performance tuning isn’t a “one-off task” but is a continuous improvement on thousands of little details ranging from the front-end javascript tuning down to the backend of the platform.

New accounts cache

From the data collected on googlesource.com Patrick Hiesel (Google) has identified the accounts loading from NoteDb as a significant cause of the delay of backend calls. That is true for all Gerrit installations, but especially for distributed setups or setups that restart often.

Gerrit v3.2 introduces a brand-new AccountCache decomposed into smaller chunks that can be cached individually:

  1. External IDs + user name (cached in ExternalIdCache)
  2. CachedAccountDetails (newly cached)
  3. Gerrit’s default settings CachedAccountDetails – a new class representing all information stored under the user’s ref (refs/users/<sharded-id>).

The new structure is cleverly designed to require a lot less I/O when an entry needs to be reloaded and lowering the ratio of cache-miss in case of user’s details updates.

The new structure has the following advantages:

  1. CachedAccountDetails contains only details from refs/users/<sharded-id>. By that, we can use the SHA1 of that ref as cache key and start serializing the cache to eliminate cold start penalty as well as router assignment change penalty (for distributed setups). It also means that we don’t have to do invalidation ourselves anymore.
  2. When the server’s default preferences change, we don’t have to invalidate all accounts anymore.
  3. The projected speed improvements that come from persisting the cache makes it so that we can remove the logic to load accounts in parallel.

Migration to Polymer 3

PolyGerrit UX roadmap continues with yet another important milestone: the migration to Polymer 3. The result is visible with an improved polishing of the GUI and significant speedup of rendering and reduction of page loading times.
There are a significant amount of small refinements to the GUI as well, coming from a meticulous work of fixes included in this release.
Not by surprise, the number of issues fixed in v3.2 on the PolyGerrit UX outnumbers by far the overall changes in the release notes.

gerrit-3.2-findings

PolyGerrit is giving special attention to the classification of the feedback coming from robots rather than humans.
Most of the efforts made in the past 12 months target the improvement the support for robot-comments and giving some extra dedicated space for them.
In Gerrit v3.2 there is a special place for them in a brand-new “Findings” tab. It is currently empty on GerritHub.io as people did not start using them much. However, I do see a lot of space of adoption of this new feature, giving the ability for more integration of linters and automatic validation feedback in this tab.

A flooding of fixes and small improvements

The list of fixes and improvements in Gerrit v3.2 is really huge. Please check the release notes on the Gerrit Code Review release page for all the details.

There are a lot of reasons to migrate to Gerrit v3.2, the fastest, more stable and scalable release of Gerrit Code Review ever.


Thanks a lot to the whole Gerrit Code Review Community of maintainers and contributors for making this release happen. Thanks to Patrick Hiesel for the technical description of the account cache improvements and the replication clustering.

Luca Milanesio (GerritForge)
Gerrit Code Review Maintainer, Release Manager, ESC Member

 

Summary of the Gerrit User Summit & Hackathon in Sunnyvale

sunnyvale-gerritforge-live.jpg

After months of reviews and contributions by different speakers and attendees, the summary of the last Gerrit User Summit & Hackathon in Sunnyvale CA has been published on the Gerrit Code Review News page.

High-performance Summit in numbers

The Gerrit User Summit 2019 has ended, with highest score of achievements
in the history of the 11 years of the entire Gerrit open-source project:

  • Two dates and locations in a 12-months period: Gothenburg (Sweden) and
    Sunnyvale (California).
  • Four Gerrit releases delivered: v2.15.16, v2.16.11, v3.0.2, v3.1.0
  • 127 people registered across the two locations,
    87 people attended on-site (70% turnout) and 38 people followed the event
    remotely at different times using the live streaming coverage
    provided by GerritForge.
  • 373 changes merged (204 in Gothenburg, 169 in Sunnyvale).
  • 32 developers attended the Hackathons, 8 of them have never contributed or
    attended an event before.
  • The highest performing version of Gerrit v3.1.0 released, with over
    2x git and REST-API performance compared to v3.0.x.
  • 22 talks presented across Gothenburg and Sunnyvale, with 6 new speakers
    that have never presented before at the Summit.

The performance of the Summit is yet again another evidence of the continuous
growth of the community and the increased synergies with the JGit, OpenStack/Zuul
and the Tuleap open-source projects.

Read the full Summit and Hackathon summary on the Gerrit Code Review web-site.

Happy New Year, Gerrit Code Review

It has been a hectic and productive year for ourselves at GerritForge and the Gerrit Code Review Community.
We want to take this opportunity to recap some of the milestones of the 2019 and the exciting perspectives for 2020 and beyond.

Gerrit Code Review, 2019 in numbers

gerrit-2019-commits.png

Gerrit had over 120+ contributors from all around the world coming from 33 different companies and organisations, which is excellent. There is a robust 6% increase in the number of commits (+231 commits) but a reduction in the number of contributors (-7 authors).

With regards to the overall trend of commits during the year, the success of the Gerrit User Summit 2019 in Sunnyvale is visible, with an increase of the rate of commits around October/November.

Top-three projects of the 2019

  1. Gerrit (1,626 commits) is, of course, the most active project. However, it is visibly down in terms of number of commits from 2018 (-19%). That is a consequence of the shift of focus to the other two key components listed below, which are available as plugins and then not accounted for the overall gerrit core repository statistics.
  2. Checks (315 commits) is the brand-new 1st class CI integration API for external build systems, such as Jenkins and Zuul. It is incredible how in just 12 months it has become robust and fully mature. It is currently used for the validation of all changes on the Gerrit project.
  3. Multi-site (234 commits) is the long-awaited support for Gerrit that everyone has been waiting for years. It is finally available for all active and supported versions (from 2.16+ onwards).

Top-three companies contributing to Gerrit

gerrit-contributors-2019.png

  1. Google is, with no surprise, still the top contributor of the Gerrit project overall. It is basically stable from 2018 (around 43%) as a confirmation of the continued commitment to the project.
  2. GerritForge is growing significantly in the contribution to the project, with exactly half of the contributions of Google. This is a significant result from 2018 with a 7% growth of involvement.
  3. CollabNet is sliding to the 3rd position (it was 2nd in 2018) with a 3% decrease of contributions. As noticeable mention, however, David Pursehouse from CollabNet is still the number #1 maintainer in terms of number of commits.

Even if it is outside the top#3 contributors companies, SAP deserves a special mention for its continuous involvement in the JGit project, which is at the basis of Gerrit engine, and its fantastic engagement in improving the Gerrit CI system and integrating it with the checks plugin.

Top-three achievements from GerritForge

The outstanding results of contributions of GerritForge in 2019 have been focused on three major topics.

Gerrit multi-site, released and production ready

We released the Gerrit Multi-Site plugin, allowing seamless balancing in a distributed environment, a technologically highly advanced development, crucial for very distributed companies. See https://gerrit.googlesource.com/plugins/multi-site for more information.

Gerrit User Summits in Europe, USA and streaming

We successfully organised and executed the Gerrit User Group in Europe and the US. The event was very well received by the community with an overall attendance of some 87 on-site and 38 in streaming. Have a look at https://gitenterprise.me/2019/12/23/gerrit-user-summit-survey/ for interesting feedback on those from the attendees.
We opened our own local office in Sunnyvale, in the heart of Silicon Valley. A crucial move to better serve our ever-expanding US customer base.

Gerrit Analytics for the Android Open-Source Project

We kickstarted the Gerrit Analytics for the Android open-source project initiative: after the successful adoption of the automatic collection of code metrics on the Gerrit project (see https://analytics.gerrithub.io) the Android team asked GerritForge to start working on extracting the same metrics from their code.

What’s coming in 2020

Gerrit v3.2 is currently under development and it is planned to be released around April/May 2020. It represents a major milestone for the Gerrit project with the support for Java 11 and large JVM heaps, up to hundreds of GBytes. Gerrit v3.2 is definitely the release that everyone that has a big repository (mono-repos) should target as next upgrade. See the Gerrit .roadmap at https://www.gerritcodereview.com/roadmap.html for more details about the planned features.

More work and improvements on the checks plugin, with the aim of fully integrating it into everyone’s user-journey and their CI/CD pipeline. Our first blog-post of 2020 will be how to use Jenkins and Checks plugin together with GerritHub.io.

Multi-site and HA will become more integrated with Gerrit, with the aim of moving parts of their technologies (e.g. global ref-db) into JGit and thus used in Gerrit core.

The Gerrit User Summit 2020 will continue the experiment of cross-pollination with other communities, after the success of the interactions with the JGit and OpenStack communities in 2019. Bazel is the next target, as it is used as the de-facto standard build system for Gerrit and its plugins.


 

Again, Best wishes from your friends at GerritForge and looking forward to a continuing successful partnership in the coming years.

Luca Milanesio
Gerrit Maintainer, Release Manager and member of the ESC.