Download: 3.5.2 | 3.5.1 |

Documentation: 3.5.2 | 3.5.1 |

Release highlights

Case-insensitive usernames

Users can login with mixed case usernames without the risk to create duplicate accounts.

The change affects the following external ids:

  • gerrit (LDAP)
  • username (login, authenticated REST and git endpoints)

For a new Gerrit setup, usernames are case insensitive by default, while for existing installations the Gerrit admin can switch the functionality on/off using the auth.userNameCaseInsensitive setting in gerrit.config.

NOTE: In the All-Users.git repository, the SHA-1 sum of the account is computed preserving the case of the external ID. See the full details in the Gerrit config accounts documentation. Existing accounts can be migrated to the new SHA-1 sum using the offline or online migration tool.

Request cancellation and execution deadlines

To limit the maximal execution time for requests, administrators can configure server-side deadlines. More details are available in the Gerrit documentation.

Any operation in Gerrit can now be subject to a configurable deadline, using the deadline section in gerrit.config.

NOTE: Deadlines are supported for REST, SSH and GIT_RECEIVE requests, but not for GIT_UPLOAD requests.

Gerrit commands can define an execution deadline, so that the processing triggered on the server would be able to end in a definite time, even in case of network interruption of the connection with the client.

Removal of external ids

Gerrit external ids, including the username, can now be removed using the SSH command or REST API.

NOTE: Users that have the Modify Account permission can delete external ids that belong to other accounts. External ids in the username scheme can only be deleted by users that have Administrate Server or both Maintain Server and Modify Account. See the documentation for further details.

Copy labels to new patch-sets

Gerrit matches patch set approvals against the provided query string and, if the query matches, the approval is copied from one patch set to the next.

The copy label feature is controlled by the label.Label-Name.copyCondition in project.config.

New change predicates

It is possible to search for changes by uploader, using the new uploader and uploaderin predicates.

Hashtags search is improved with the inhashtag predicate which returns all the changes where any hashtag contains a substring, using a full-text search.

It is now possible to use the new has:attention and is:attention predicates to search for changes having the attention of the current user.

Cherry-picked changes can now be searched using the is:cherrypick predicate.

The special “non_uploader” parameter is now available as parameter for change predicates and matches any user who’s not the uploader of the latest patchset.

Performance improvements on the change screen

The change screen has been improved by enabling extra caching and disabling some expensive computation.

A new approvals cache contains approvals for a given patch set.

The new change.conflictsPredicateEnabled setting in gerrit.config disables the computation of the conflicts section avoiding a computation of complexity of O(nˆ2), where n is the number of open changes for the project the change belongs to. When set to false the GUI will leave the conflict changes section on change screen empty.

Important notes

Support for Java 8 dropped

The Java language level is now set to Java 11 for Gerrit, the support for Java 8 is dropped.

Gerrit source code may not be compatible with Java 8 anymore.

Schema and index changes

This release doesn’t contain schema changes.

The changes index version has been increased to version 71. By default the index is automatically rebuilt upon the Gerrit startup after the upgrade.

To run offline reindexing of the changes (optional when upgrading from v3.3.x or later):

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

Zero-downtime upgrade

Gerrit v3.5.x supports zero-downtime upgrade from Gerrit v3.2.x or later when configured using a high-availability configuration, and the Git repositories are stored in a shared filesystem such as NFS or similar.

During the zero-downtime upgrade, Gerrit end-users would not notice any outage or service disruption. They will be able to perform any read/write Gerrit operation on the GUI or using using any API.

The zero-downtime upgrade consists of the following steps:

  1. Have Gerrit servers running v3.2.x or later, in high-availability configuration, healthy and able to handle the incoming traffic properly.
  2. Set the Gerrit server unhealthy.
  3. Shutdown the Gerrit server, update gerrit.war and plugins to v3.5.x and start Gerrit again.
  4. Verify that the Gerrit server is working properly (e.g. run automated smoke tests) and then make it healthy again.
  5. Wait for the Gerrit server to start serving traffic normally.
  6. Repeat steps 2. to 5. for all the other Gerrit servers.


Downgrade to any Gerrit v3.3.x or v3.4.x release is possible, but requires the following manual steps:

  1. Shutdown all migrated Gerrit v3.5.x servers
  2. Update the gerrit.war and plugins to the previous v3.3.x or v3.4.x version
  3. Run offline reindexing using the previous gerrit.war version
  4. Startup Gerrit server

NOTE: Downgrading is not always possible in Gerrit and is subject to specific restrictions on different releases. Always read the release notes carefully and look for the supported downgrade paths.

Breaking changes

  • The support for ElasticSearch index is removed from Gerrit core. Existing setups can still use ElasticSearch through external non-core libModules.

  • The “Reply” button label and tooltip cannot be customized anymore: the change.replyLabel and change.replyTooltip are ignored.

  • The repo_download download.scheme is renamed to repo.

  • The bower Bazel rules are removed: all front-end plugins would have to migrate to yarn.

  • REST APIs with incompatible changes

    • AccountExternalIdInfo email field is renamed to email_address.

    • The /accounts/{account-id}/stars.changes endpoint is removed. Looking for starred changes is still available through the use of is:starred or has:star predicates.

  • Change 323855 Change 324115: ProjectCache#evict no longer triggers a reindex.

    During offline project reindexing evict() was triggering a duplicate reindex on the project when we only wanted to evict the project cache entry. This same issue occurred with the HA plugin and could be/been present in other plugins.

    If you have relied on a reindex being done on evict() you need to use evictAndReindex() instead. This behavior is now consistent with other evict() methods in Gerrit.

Other changes

Plugin changes

  • codemirror-editor

    • Issue 14845: Improve performance in the editor

      Stop setting viewportMargin and instead use the default value. Add support for the inbuilt search support within codemirror.

  • delete-project

    • Use base url for return url after deleting a repo
  • gitiles

    • Change 305442: Test that Branch Redirect supports having short ref names in gitiles url.

    • Change 298802: Redirect gitiles url using Repo’s branch redirect config when format type is default (not provided in gitiles url).

    • Change 296662: Fix straggling FQN in template call.

    • Change 292082: Support branch redirect in Gitiles for helping users keep their old URLs working when migrating branch names.

    • Change 282376: Add support for rendering webp image files, supported for all browsers and Safari 14 or later.

    • Change 277999: Set correct target url for symlinks, which were calculated incorrectly.

    • Change 273661: Drop u-pre’s font-weight in CSS.

  • plugin-manager

    • Issue 13521: Use relative URL to access Gerrit base URL

      Plugin-manager now works for Gerrit setups with a reverse-proxy and a non-root base path.

  • replication

    • Issue 14819: Inherit remote replication events from a common parent.

    • Issue 14628: Register ProjectDeletion events for gson serialization.

      ProjectDeletion events were not registered event types. This caused failures when EventGson tried to serialize/deserialize objects having those events as field, Throwing the JsonParseException:

      Unknown event type: project-deletion-replication-scheduled
    • Issue 13216: Add possibility to split large pushes to remote into batches.

    • Add a cluster replication configuration section.

      Add a section describing how to setup more than one primary to cooperate for replication and how this can impact cluster scaling and service levels.

Gerrit UI changes

  • Issue 12268: Fix spacing between change status chip and change number when logged out.

  • Issue 13471: Change diff highlighting colors for dark theme.

  • Issue 13990: Fix Uploaded patch set message with votes.

  • Issue 14041: Show all comments in Comments Tab if no resolved comments.

  • Issue 14470: Remove attention set configuration option (frontend).

  • Issue 14521: Fix fully reloading the change view when the new patchset is unknown.

  • Issue 14522: Do not process keyboard shortcuts for invisible views.

  • Issue 14769: Show tooltip below for diff view options.

  • Issue 14820: Fix Normal text mistakenly shown with code block fixed-width formatting.

  • Issue 14828: Saving a comment incorrectly closes/discards other unsaved comments.

  • Issue 14854: Expand drafts in comment threads by default.

  • Issue 14872: Account name misaligned in chip when there is no user avatars enabled.

  • Issue 15105: Don’t automatically open suggestions dropdown in “Add reviewer” and “Add CC”.

Documentation changes

  • PolyGerrit UI screenshots and associated documentation have been updated.

  • Issue 11388: Extend the section associated with NoteDb format documentation.

JGit changes

Update JGit to 60b81c5a9280, which includes the following changes:

  • 60b81c5a9: Fix RevWalk.getMergedInto() ignores annotated tags.

  • c5b305473: Optimize RevWalk.getMergedInto().

  • 847077151: GitServlet: allow to override default error handlers.

  • 35eeab41b: RevWalk: getMergedInto’s result is wrong on the second call.

  • 24d6d6053: Retry loose object read upon “Stale file handle” exception.

  • 64b0dee98: Fix garbage collection failing to delete pack file.

  • 64d0aaa2b: Teach independent negotiation (no pack file) using an option “wait-for-done”.

  • 1788b72d1: Skip detecting content renames for binary files.

  • c59626ad7: RepoCommand: Retry commit on LockFailure.

  • 0667b8ec4: RepoCommand: Do not set ‘branch’ if the revision is a tag.

  • 8bc166b00: BatchRefUpdate: Skip saving conflicting ref names and prefixes in memory.

  • 303dd019d: Optimize RefDirectory.isNameConflicting().

  • 003862722: LockFile: create OutputStream only when needed.

  • e58bf0870: Add git config for conflict style merge/diff3.

Other dependency changes

  • Update auto-value-gson-* to 1.3.1

  • Update testcontainers to 1.15.3

  • Update flogger to 0.6

  • Update docker-java-* to 3.2.8

  • Update lucene-* to 6.6.5

  • Update polymer/decorators to 3.0.0

  • Update polymer to 3.4.1

  • Update typescript-api to 3.4.4

  • Update lit to 2.0.2

Other core changes

  • Issue 13563: Fallback to a single region for incorrect intra-line diffs.

    In some rare cases, intra-line diffs produce incorrect results, which confuse users since the light/dark colors of added and removed areas do not accurately represent what was added and deleted.

  • Issue 13965: commit-msg: simplify generation of a unique hash.

    Refactors the commit-msg hook, changing the random bits of data used to generate the value for the Change-Id trailer.

  • Issue 14362: Export PluginPushOption for use in plugins.

  • Issue 14556: Fix error handling in checks-service.

  • Issue 14772: Fix attention set modifications for users with no permissions.

  • Issue 15149: Add changeInfo to LabelsChangedCallback in ChangeReplyPluginApi.

Bugfix releases


  • Important Notes

This version is a mandatory update before migrating further to v3.6.0. The following two improvements are available to support the future upgrades:

  • Change 336883: Make the NoteDb parsing code accept the new label format that is introduced in Gerrit v3.6.0.

  • Change 337697: Introduce copy-approvals SSH command for copying votes to the latest patch-sets online

  • Change 337308: Introduce copy-approvals site program for copying votes to the latest patch-sets offline

NOTE: The execution of the copy-approvals SSH command (online) or the java -jar gerrit.war copy-approval site command (offline) may take a long time to complete due to the full scanning of all projects.

  • New Features

    • Change 337231: Expose proto package in plugin API, allowing to reuse the runtime libraries included in Gerrit
  • Bug Fixes

    • Change 335705: Fix bazel build on Mac M1 (aarch64)

    • Change 334762: Use original javax.servlet-api instead of tomcat’s copy

    • Change 334299: Reject invalid queries with status code 400 on POST /accounts/<account-identifier>/watched.projects

    • Issue 14109: Fix NPE with cherry pick REST-API onto an existing change in a different branch

    • Issue 15887: Fix the auto-complete on the Gerrit search box

    • Issue 15889: Remove spams of “Logging context is not empty” in Gerrit’s error_log

    • Issue 15531: Disable tracing.performanceLogging by default because of increase of memory footprint

    • Change 335194: Fix threading issue in diff cache which caused sporadic Zlib exception making it look like the pack file was currupted

  • Dependency Updates

    • Update rules_nodejs version to 5.1.0.

    • Update JGit to 78c9b9260a5287d09c87b407e396021590714513.


  • Security Fixes

    • Change 333304: Ignore --no-limit query changes option for anonymous users

      Prevent the use of no-limit option with query changes REST API. The option can result in excessive resources usage make Gerrit subject to DoS and DDoS by any remote endpoint without the need to have any Gerrit account or signing in.

  • Docker Images

    • Change 329639: CentOS 8 AppStream has disappeared: use AlmaLinux 8.5 as replacement for Gerrit image
  • Bug Fixes

    • Issue 14945: Account cache is not caching the access to the account data refs

      Account cache in Gerrit v3.5 does not cache the access to the All-Users.git repository because of the refactoring of the cache key, which requires lookup of the All-Users.git refs. Gerrit allows now the refs in-memory caching using the cached-refs libModule.

    • Issue 14912: Fix lost watch notifications when attention-set-only is configured

    • Issue 15407: MultiBaseLocalDiskRepositoryManager cannot be overloaded by libModules

      Allow the replacement of multi-base git repositories through libModules, which wasn’t possible before. Allow to use multi-base git repositories with the multi-site plugin and the cached-refs libModule

    • Issue 15500: Fix java.util.IllegalFormatArgumentIndexException on Java 17 in MergeUtil#mergeWithConflicts

    • Issue 15531: Disable performance metrics by default.

      Performance metrics were introduced in 3.5. This caused, for example when upgrading from 3.4 to 3.5, a 10X increase of metrics, from thousands to tens of thousands.

      Disabling it by default to avoid an unexpected 10X increase of metrics payload, which could lead to an increase of latency when returning it.

    • Issue 15589: Add SHA-1 hash variable to gitweb file links

    • Issue 15590: Fix SLF4J binding to Reload4J

      Use Reload4J-specific binding for SLF4J, fixing the broken MDC since the swap of Log4J with Reload4J done in Change 328081.

    • Change 330359: Fix gerrit ls-members –recursive

      Fix a regression introduced with Change 134334 that caused it to ignore the –recursive flag.

    • Change 327950: PrologRuleEvaluator: Fix endless loop on type error

    • Change 330579: Restore transition support for cache-automerge refs which point to a tree

      Versions of Gerrit older than v2.13 may have cache-automerge refs which point to a tree. These older refs are not considered valid by AutoMerger, but are not removed or invalidated.

    • Change 331379: Improve performance in ACL permissions evaluation by computing project state only when needed

    • Change 331639: Memoize compiled ref pattern in project cache, known to be expensive

    • Change 331762: Cache permission filtering for All-Projects

    • Change 331763: Move ordering of the project access section to the cached value creation for better performance

  • Documentation Fixes

    • Change 331361: Fixup old references to Database in documentation

    • Change 331360: Remove leftover receive.changeUpdateThreads references

    • Change 290603: Fix gerrit ls-groups flag -g in documentation

  • Other Fixes

    • Issue 15667: Fix Zuul build with obsolete Python 3.5.
  • Dependency Updates

    • Update SLF4J version to 1.7.36.

    • Replace Log4J with reload4j version 1.2.19.