Download: 2.16-rc3

Documentation: 2.16-rc3

Release Highlights

  • GWT UI is deprecated, and PolyGerrit is now the default UI.

  • Experimental Dark Mode in PolyGerrit.

  • Inline editing support in PolyGerrit UI.

  • Redesigned UI for PolyGerrit based on material design.

  • New configuration option to ignore self approval on labels.

  • New CommonMark/Markdown parser.

Important Notes

NoteDb is now required for accounts (since 2.15) and groups (since 2.16), and is the preferred storage for changes.

When upgrading to Gerrit v2.16, you are strongly advised to migrate fully (including changes) from ReviewDb to NoteDb.

Although ReviewDb is still technically available on Gerrit v2.16, the upgrade to NoteDb is strongly recommended, although not enforced.

Note that in the next version of Gerrit (v3.0), ReviewDb will not be available.

Schema Changes

This release contains schema changes. To upgrade:

  java -jar gerrit.war init -d ${site_path}

New logging framework

For logging Gerrit is now using Flogger instead of SLF4J. The logging backend is still LOG4J.

The Flogger LOG4J backend is configured by a system property (flogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance) that must be set for logging to work. There is an init step that automatically sets this system property in the gerrit.config file and in addition Gerrit tries to set this system property automatically on startup if it isn’t set yet. However for some setups you may need to do additional actions to make sure that this system property is set.

In addition there is a system property that needs to be set for request tracing (flogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance). Also this system property is automatically set in the gerrit.config file by an init step and in addition Gerrit tries to set this system property automatically on startup if it isn’t set yet. However for some setups you may need to do additional actions to make sure that this system property is set.

SLF4J can still be used by plugins, but using SLF4J in plugins is deprecated and with the next Gerrit release SLF4J will no longer be exported as part of the Gerrit plugin API jar. This means from the next release onwards, plugins must either migrate to Flogger or have an own dependency on SLF4J.

Reindex for new projects index and changed group index

Gerrit 2.16 introduces a new secondary index for projects. The initial version of this index must be created by running the offline reindex before starting Gerrit:

  java -jar gerrit.war reindex --index projects -d ${site_path}

The group index gained two new fields, which Gerrit 2.16 depends on. For this reason, the following command to offline reindex the group index must be executed as well:

  java -jar gerrit.war reindex --index groups -d ${site_path}

The offline reindex for groups should also be run on Gerrit slave hosts.

Note that if you are migrating from v2.15, it is not necessary to reindex the changes and accounts indexes offline. These will automatically be reindexed by the online reindexer after starting Gerrit.

Migration to NoteDb

You should review the documentation on NoteDb, including the information about the migration process to NoteDb:

In Gerrit 2.15:

  • Account data (with the exception of Group data) was moved to NoteDB (release notes).
  • Change data could be either moved to NoteDB (migration process), or left in ReviewDB.

In Gerrit 2.16:

  • Group data is always moved to NoteDB (it is migrated automatically during the upgrade process, when you run gerrit.war init).

Support for GWT UI is deprecated

From 2.16 GWT UI is deprecated and will be removed in a future version.

Support for Velocity templates removed

In version 2.14 support for Soy templates was added. For backwards compatibility, support for Velocity templates (VTL) was kept.

In version 2.16 support for VTL is completely removed. Site administrators must replace any Velocity templates (.vm files in $site/etc/mail/) with the equivalent Soy templates before upgrading to this version.

Push to refs/changes is deprecated

The possibility to push to refs/changes is now disabled by default. It is still possible to enable it in the gerrit config by setting receive.allowPushToRefsChanges to true.

Some proxies, which are not under client control, prohibit DELETE requests with bodies. DELETE requests with bodies could work on a first attempt, but could fail afterwards because a server they have no control over was updated. In this case, client users could be in trouble if they were not notified.

Therefore, we have decided to no longer recommend sending DELETE requests with bodies. They will continue to work in this release but should be considered as deprecated and will be removed in the next release.

Pegdown is replaced by Flexmark

flexmark-java is a Java implementation of CommonMark 0.28 spec parser using the blocks first, inlines after Markdown parsing architecture.

Its strengths are speed, flexibility, Markdown source element based AST with details of the source position down to individual characters of lexemes that make up the element and extensibility, compared to Pegdown speed that was, in general, less than ideal and for pathological input either hangs or practically hangs during parsing.

New Features

REST API

There are several new REST endpoints and additions to existing endpoints, as described in the REST API documentation.

New configuration option to ignore self approval on labels

A new option for Review Labels, [label..ignoreSelfApproval](https://gerrit-documentation.storage.googleapis.com/Documentation/2.16/config-labels.html#label_ignoreSelfApproval), is available.

If true, the label may be voted on by the uploader of the latest patch set, but their approval does not make a change submittable. Instead, a non-uploader who has the right to vote has to approve the change.

It defaults to false, but one possible use case is to set the value to true for the Code-Review label in the All-Projects project. That value will then be inherited by all projects that do not override the Code-Review label settings.

CodeMirror plugin for PolyGerrit

A new core plugin, codemirror-editor, is available, which uses CodeMirror to provide a rich code editing experience in PolyGerrit.

When you upgrade Gerrit using init -d, you are given the option to install the codemirror-editor plugin.

Request Tracing

Tracing can now be enabled for single requests. If a request is traced a unique trace ID is attached to all logs that are triggered by the request. In addition all logs are enforced regardless of the configured log level. Given the trace ID an administrator can find the trace in the error log and debug issues more easily. Detailed information about request tracing can be found in the request tracing documentation.

Dependency Updates

  • Update args4j to 2.33

  • Update Brics Automaton to 1.12-1

  • Update BouncyCastle to 1.60

  • Update commons-compress to 1.15

  • Update commons-lang3 and commons-net to 3.6

  • Update Dropwizard metrics-core to 3.2.5

  • Update elasticsearch to 2.4.6

  • Add dependency to flexmark-java 0.34.18

    Flexmark is a CommonMark/Markdown parser for java.

  • Add dependency to flogger 0.3.1

    Flogger is a fluent logging API for Java and Gerrit is using Flogger instead of SLF4J now.

  • Update greenmail to 1.5.5

  • Update gson to 2.8.5

  • Update guice-* to 4.2.1

  • Update JGit to 5.1.3.201810200350-r

  • Update Lucene to 6.6.5

  • Update mime4j to 0.8.1

  • Update OpenID4Java to 1.0.0

  • Update Ow2.asm to 6.2.1

  • Update javax.mail to 1.6.0

  • Update Jetty to 9.4.12.v20180830

  • Update protobuf-java to 3.4.0

  • Update soy to 2018-03-14

  • Update SSHD to 2.0.0 and Mina to 2.0.17

  • Update tomcat-servlet-api to 8.5.23

  • Update tukaani-xz to 1.6

  • Remove dependency on Velocity

  • Remove dependency on joda-time and joda-convert

    NOTE: joda-* dependencies are no longer exported in the Gerrit plugin API. Existing plugins that still rely on them need to be amended to include the explicit dependency on joda-* libraries.

Plugin API changes

  • The class com.google.gerrit.server.api.accounts.AccountExternalIdCreator was moved to com.google.gerrit.server.account.AccountExternalIdCreator.