Release Highlights

  • Polymer 3

  • File Uploads in frontend

  • Support for Java 11

Important Notes

Mergeability behavior and performance

This release introduces a configuration setting change.mergeabilityComputationBehavior that defines when Gerrit computes the mergability of a change .

Computing the mergability of changes is an expensive operation that can be become a bottleneck for large Gerrit installations. The new setting allows administrators to control this expense. Please refer to the Gerrit documentation for more details about this setting.

Support for Java 11

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.

Schema Changes

This release contains schema changes. To upgrade:

  java -jar gerrit.war init -d site_path

The changes index version has been increased. To run off-line reindexing of the changes (optional):

  java -jar gerrit.war reindex --index-name changes -d site_path

By default the changes index is automatically rebuilt upon the Gerrit startup after the upgrade.

PERFORMANCE WARNING: The migration process performs the cleanup of the zombie draft comments in the All-Users.git repository that have been left behind since the introduction of NoteDb. It is highly recommended to perform a git gc --aggressive of the All-Users.git repository BEFORE running the migration. Also the reindex of all the changes can take a significant amount of time for large-scale installations.

Also, make sure that the All-Users.git resides on a fast access local filesystem for minimizing the migration time.

Breaking Changes

  • Issue 12527: Elasticsearch: Support for EOL versions v5.6 and v6.0 to v6.5 is discontinued

New Features

File Uploads

File Uploads are now supported in the User Interface or through the REST API.

New Revert permission

Introduce a new permission to allow/deny the ability to revert a change through the Gerrit UI.

The permission is automatically added to the Registered Users as part of the schema upgrade. To deny reverts, Gerrit administrators should remove this permission from All-Projects ACL.

New is:merge merge operator for searching changes

Introduce the new is:merge operator for allowing to find changes that are merge commits. This change requires a full reindex of the changes, which may take quite a long time to compute for large-sized installations.

When choosing the on-line reindexing option (default) Gerrit can still operate with the old index version, disabling the is:merge operator until the new index has been successfully rebuilt.

PolyGerrit UI

The Gerrit frontend has been migrated from Polymer 2 to Polymer 3.

  • Users can now cherry pick entire topics.

  • Gerrit supports adding display names. Hosts can configure first name or username as default.

  • The reply dialog now shows the entire comment thread instead of the comment list.

  • Issue 6293: More self-evident transitions from WIP state. “Start Review” button added to change view.

  • Issue 10444: UI for deleting change messages for Gerrit Administrators.

  • Issue 10890: Repository list: Move “Repository Browser” column left of “Description” column.

  • Issue 11441: Add in-product reminder to keep discussions respectful.

    Some code review discussions can become a bit rough and some people perceived discussions as not always respectful. Add an in-product reminder to keep discussions respectful when a reply is typed, optionally with linking to the code of conduct.

  • Issue 11521: Display trace ID in error popup if request failed and server did a trace.

  • Issue 11522: REST API for review labels in the project configuration.

  • Issue 11705: Show count of changes in User Dashboard.

  • Issue 11706: Allow editing the commit message as part of a change edit.

Download commands plugin

  • Issue 11594 Merge the repo-vs-git logic into GitDownloadCommand directly.

    Created separate “getRepoCommand” and “getCommand” methods for downstream classes to extend with the default “getRepoCommand” defaulting to null.

  • Issue 11609 “Download patch” UI includes an option for also creating a local branch.

    A very standard workflow is to download a change from Gerrit then want to make edits and then repo upload the changes back to Gerrit. Allow developers who are not familiar with the idiosyncrasies of repo, to easily create a local branch when checking out changes.

End-to-end tests

  • Allow end-to-end tests to proportionally scale on their expected execution times.

    A power_factor environment property was added to the end-to-end tests core framework. Using that optional property, scenario steps can take some more (or less) time prior to expecting proper completion.

    The way to set that property locally then depends on the target runtime environment, or SUT latency. The property may be used for either core or plugin scenarios.

  • FlushProjectsCache related scenarios added to core (and the high-availability plugin).

  • Support for relative runtime weights in scenarios.

    Each scenario can now either weight like any other by default, or override that default with a greater weight value, compared to siblings that are lighter on execution times.

    Beside core, make the high-availability and multi-site plugin scenarios reuse this.

  • Allow scenarios to create and delete Gerrit changes alongside projects.

    Add the corresponding core support for an optional http request body to every such GerritSimulation. Either automate or allow environment properties to feed the related input test data.

    Beside core, make the high-availability and multi-site plugin scenarios test changes that way. The latter currently has Issue 12693 as a known limitation.

Bug Fixes

  • Replication plugin fixes

    • Issue 11672: Change the storage structure of the persisted replication tasks to avoid losing events.
  • PolyGerrit fixes

    • Issue 11515: Fix Ctrl-Enter on Move Change

    • Issue 11552: Fix prev/next on diff screen with unchanged files containing only comments.

    • Issue 11725: Fix diff view file name shown even when the file wasn’t changed, but only included because contains a comment.

    • Issue 11727: Fix blue underline missing from active tabs.

Dependency Updates

  • Upgrade flogger to 0.5.1

  • Upgrade guava to 29.0

  • Upgrade guice to 4.2.3

  • Upgrade jgit to

  • Upgrade mina-sshd to 2.4.0

  • Upgrade ow2 to 7.2

  • Upgrade truth to 1.0.1

Native packaging

  • Upgrade the Docker/Ubuntu image to Ubuntu 20.04

  • Upgrade the Docker/CentOS image to CentOS 8.1.1911

  • Move to OpenJDK 11

    Gerrit v3.2 supports both Java 8 and 11. However, Java 11 is the best choice for large production servers thanks to the introduction of more advanced Garbage Collection strategies and associated tuning for large heaps.