title: “Gerrit 3.5.0 release” permalink: 3.5.html hide_sidebar: true hide_navtoggle: true toc: true

Download: 3.5.0-rc4

Documentation: 3.5.0-rc4

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]((https://gerrit-documentation.storage.googleapis.com/Documentation/3.5.0/externalid-case-insensitivity.html#online-migration) 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.3.x or v3.4.x 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.3.x or v3.4.x 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

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/link:#account-id[\{account-id\}]/stars.changes endpoint is removed. Looking for starred changes is still available through the use of is:starred or has:star predicates.

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 LogDetails.soy 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.