Download: 3.0.4 | 3.0.3 | 3.0.2 | 3.0.1 | 3.0.0

Documentation: 3.0.4 | 3.0.3 | 3.0.2 | 3.0.1 | 3.0.0

Release Highlights

  • Removal of GWT UI

    The GWT UI is removed and PolyGerrit is now the only UI.

  • Removal of ReviewDb

    The database backend for changes, accounts, groups and projects (“ReviewDb”) is removed and this metadata is now stored in git (“NoteDb”).

    A database is still needed for account patch reviews, which stores the ‘reviewed’ flag for files in a review per user. The default backend is H2, but MySQL, PostgreSQL and MariaDb are also supported. See the documentation for details.

    It is also possible for plugins to provide another backend by implementing the AccountPatchReviewStore interface.

  • New quota enforcer extension point.

  • Issue 4040: Support for signed push with GPG subkeys.

  • New core plugins: delete-project, gitiles, plugin-manager, and webhooks.

Important Notes

Schema Changes

This release contains schema changes. To upgrade:

  java -jar gerrit.war init -d site_path

Breaking Changes

  • Reverse DNS lookup is now disabled by default.

    The gerrit.disableReverseDnsLookup option with default value false is replaced by gerrit.enableReverseDnsLookp also with default value false. This means that reverse DNS lookup is now disabled by default.

  • Private changes will be published (unmarked private) once merged.

    A warning dialog will be displayed to the user to confirm this on submission using the UI. When submitted via push, this warning will not be shown. Already merged changes cannot be marked private any longer.

  • Issue 8054: Removal of the urlAlias configuration settings.

    The URL rewriting feature introduced in 2.12 via the urlAlias configuration was only supported in GWT, and thus removed with the 3.0 release.

New Features

  • New quota enforcer extension point.

    Plugins may implement the QuotaEnforcer interface to enforce quotas.

  • Issue 4040: Support for signed push with GPG subkeys.

    It is now possible to use a GPG subkey when pusing commits with signed push.

  • Issue 6053: Support for searching on mobile devices.

  • Issue 8535: Support for plugin config entries in the PolyGerrit UI.

    Configuration entries defined by server-side plugins are now displayed in the UI.

  • New method to get UI top menus in the config API.

  • New configuration option change.api.excludeMergeableInChangeInfo.

    Computing mergeability of open changes becomes very expensive for hosts that have fast-moving branches and a lot of open changes. Setting this option to true disables it.

  • New configuration option change.move.

    The change.move option allows to disable the “Move Change” REST API.

    Note that the option was included in 3.0.0 but only documented since 3.0.3.

  • New core plugins.

    The delete-project, gitiles, plugin-manager, and webhooks plugins are now core plugins bundled with the release, and can be installed during site initialization.

Dependency Updates

  • Add dependency on resemblejs

  • Remove dependency on apache derby

  • Remove dependency on gwtjsonrpc

  • Remove dependency on gwtorm

  • Remove dependency on postgresql

  • Upgrade asm to 7.0

  • Upgrade auto-value to 1.6.5

  • Upgrade codemirror-minified to 5.43.0

  • Upgrade commons-lang3 to 3.8.1

  • Upgrade gitiles-blame-cache and gitiles-servlet to 0.2-8

  • Upgrade guava to 27.0.1-jre

  • Upgrade guice to 4.2.2

  • Upgrade prolog-cafe to 1.4.4

  • Upgrade soy to 2019-03-11

  • Upgrade truth to 0.43

Native packaging

  • Upgrade the Docker/Ubuntu image to Ubuntu 18.04

  • Upgrade the Docker/CentOS image to CentOS 7.6.1810

  • RPM/Deb: Remove Gerrit service start upon package setup.

    Gerrit service is no longer started automatically after the package installation, but requires manual invocation of the /etc/init.d/gerrit start command, or the configuration of the service for auto-start and the reboot of the machine.

  • Docker: auto-init the Gerrit site during first start of the container.

    Simplify the configuration and management of Docker setups by automatically detecting if a $GERRIT_SITE/git/All-Projects.git exists and, if it doesn’t, invoke the Gerrit init step in batch mode.

Bugfix Releases

3.0.4

  • New features:

    • Add a method on ProjectConfig to read from the repository.

      Add a method that allows to read the config from the repository without having to provide a MetaDataUpdate instance.

    • New syntax highlighting files format supported.

      Highlight handlebars, Jinja2, Jenkinsfile, Soy and VHDL formats; associate cproj, xaml and svg as xml.

    • New getConfig() method in the PolyGerrit Plugin RestApi interface.

      Make the PolyGerrit RestApi interface to retrieve the server config and to cache it, accessible to plugins.

    • Add “readOnly” endpoint parameter to repo-config endpoint in PolyGerrit Plugin RestApi.

  • PolyGerrit UI Fixes:

    • Hide “HTTP Credentials” if auth is not HTTP or HTTP_LDAP.

    • Issue 11782: Fix assignment of CSS style for CodeReview -1 labels within comments.

    • Issue 7083: Stop query from executing if predicate is empty.

    • Issue 8513: Add the SHA hash of each patchset in dropdown menu as it was in the old GWT UI.

    • Issue 11715: Fix total additions/deletions counters when viewing diff against parent 1 on merge commit.

    • Issue 11682: Fix some corner-cases in the diff view where the download file feature did not work for added, renamed and deleted files.

    • Issue 10047: Add shortcut to copy ssh-rsa public key.

    • Issue 7867: Allow downloading a regular file from the patch set, from both base version and specific patch set version. It is implemented as a dropdown.

  • Elasticsearch Updates:

    • Add support for Elasticsearch 7.4.

    • Update elasticsearch-rest-client to 7.4.2.

  • JGit Updates:

    • Upgrade JGit to 5.3.6.201910020505-r.

      This JGit version brings significant performance improvement in the case when Gerrit loads all external-ids from NoteDb. This happens whenever the external_ids_map cache gets invalidated or expires.

  • Other fixes:

    • Fix internal server error when non-existing base revision is given in input to Cherry Pick Change REST API.

    • Remove error log when user tried to delete current branch with the Delete Branch REST API endpoint.

    • Fix the response status code when an error occurred in the Delete Branch/Tag REST API endpoint.

      The endpoint returned “409 Conflict” but should return “500 Internal Server Error”.

    • Fix the response status code then an error occurred in the Update/Delete GPG Keys REST API endpoint.

      The endpoint returned “409 Conflict” but should return “500 Internal Server Error”.

    • Issue 9001: Fix external-id consistency checker e-mail validation.

      Do not enforce emails on external IDs to be globally unique but allow the same e-mail repeated multiple times as long as it associated to the same account id.

    • Fix change message when automatically abandoning a change for a project that has been deleted.

      The change message and the message tag were inverted.

    • Fix commit message subject when updating project description by REST API.

      The tense of the commit message subject was inconsistent with other similar messages.

    • Fix commit timestamp when updating project configurations.

      For some REST API operations that update the project configuration, the commit that does the update on refs/meta/config had the wrong timestamp. Rather than being the time of the actual commit, it was always the time of the server startup.

      This was the case for the following operations:

      • Updating the description.
      • Setting the parent project.
      • Updating group names while getting access settings.
    • Upgrade jackson-core to 2.10.0.

      This version includes a fix for CVE-2019-12384.

    • Add more detailed debug logging when not sending an outgoing email.

      There are several conditions that could cause sending of an outgoing email to be skipped. These are now logged at debug level.

    • Increase severity to error for logging of exceptions during site initialization.

    • Issue 4824: Handle multiple httpd.listenUrl values.

      Per the documentation, multiple values are supported, but if multiple values were specified Gerrit would fail to start.

    • Do not overwrite httpd.listenUrl during init, until the input has been checked as valid.

      Fix a bug where during the Gerrit init in interactive mode the input was invalid for the HTTP daemon settings, but still written to the configuration file.

    • Add adder in the reviewer-added event.

3.0.3

  • Breaking Changes

    • The weblinksOnly option is removed from the Get Diff REST API endpoint.

      This option was only used by the GWT UI which has been removed. This is a breaking change for any other clients that are using it.

  • New Features

    • Issue 6029: Add support for downloading binary files.

    • Issue 11205: Allow Gerrit admins to reindex a change even when Read access is not allowed on its target branch.

    • Extend the addMenuLink method in the PolyGerrit plugin API to allow plugins to specify a capability that users must have in order to view a top menu item provided by the plugin.

    • Utility script remove-notedb-refs.sh which can be used to remove all refs created for NoteDb in case of rollback to ReviewDb.

    • Issue 11356: Allow to override autodetected Lucene index configuration.

      The new settings index.name.maxMergeCount, index.name.maxThreadCount and index.name.enableAutoIOThrottle allow to manually configure the Lucene index, rather than using autodetected values, to improve performance.

  • PolyGerrit UI Fixes

    • Issue 10166: Add shortcuts for dashboard and watched changes in PolyGerrit.

    • Issue 11592: Replace ${project} in a foreach query for project dashboards.

    • Issue 10047: Add missing copy buttons for SSH and GPG keys.

    • Issue 11623: Remove leftover handling of GWT’s change edit identifiers.

    • Issue 11562: Fix handling of the “Send feedback” conditional display.

    • Fix regular expression in link text parsing.

    • Issue 11682: Fix edge cases in the download dropdown.

      • Fix support for file addition, deletion and rename.

      • Fix left side content URL when diffing against non base revision, e.g. 2..3.

    • Various improvements of the UX with colors in dark theme.

      See issue 11224, issue 11213, and issue 11004.

    • Upgrade highlight.js to get various syntax highlighting improvements.

      • Issue 11666: Improved support for dart keywords.

      • SVG is added as an alias to xml.js and highlighted as XML.

      • JavaScript supports big number syntax now.

      • cpp syntax highlighting improved.

      • JSON gains support for highlighting comments.

      • C++ gains more keywords.

      • YAML improves matching keys.

  • Elasticsearch Updates

    • Add support for Elasticsearch 7.4.

    • Update elasticsearch-rest-client to 7.4.0.

  • Other Fixes

    • Various fixes in the ‘Create Change’ REST API endpoint:

      • Fix internal server error when creating a merge commit fails with NoMergeBaseException.

      • Reject creation of a merge commit on a non-existing branch.

      • Fail with the correct error message when destination branch does not exist.

      • Fix internal server error when target branch does not exist and the parent option is given.

      • Fix internal server error when base commit does not exist.

    • Issue 11644: Fix setting project description when creating a project by REST API and setting plugin configs at the same time.

    • Issue 11374: Fix handling of plugin capabilities on modification of child collections.

    • Fix init to not overwrite httpd.listenUrl until the input has been validated.

    • Issue 11246: Allow duplicate email addresses to be associated to the same user account.

    • Issue 11367: Fix querying inactive user changes.

    • Issue 11491: Fix git clone/fetch/pull over SSH in high-latency network ending with SSH_MSG_CHANNEL_WINDOW_ADJUST error.

    • Issue 11442: Fix push failing with internal server error sporadically when notedb.changes.read=True is configured.

    • Issue 11444: Fix the wrong progress output during online migration in error_log and use the correct charset conversion.

    • Fix change message when automatically abandoning a change for a project that has been deleted.

      The change message and the message tag were inverted.

    • Issue 11137: Remove the gerrit.reportBugText configuration option.

      This option was only used in GWT, which has been removed.

    • Upgrade JGit to 5.3.5.201909031855-r.

      This version includes a fix for racy atomic ref updates.

  • Replication Plugin Fixes

    • Issue 11145: Drain replication queue before stopping the plugin.

    • Issue 11424: Fix ReplicationTasksStorage exceptions in error_log when triggering replication of all refs.

    • Issue 11573: Fix dropping events during plugin restart.

  • Singleusergroup Plugin Fixes

    • Issue 11498: Fix group resolution for all numeric usernames.

3.0.2

  • Breaking Changes

    • Increase default number of SSHD threads to at least 4.

      The default value of the sshd.threads setting is changed to be either two times the number of available CPU cores, or 4, whichever is greater.

    • Issue 11216: Remove hard-coded bug tracker URL and use configured value if present.

  • New Features

    • Issue 11201: Add ability to have custom label with a missing text value in PolyGerrit

    • Add a PolyGerrit extension point to show a small banner next to the search bar.

      A plugin or a site theme (gerrit-theme.html) may register a custom Element to be inserted into this endpoint.

    • Expose Gerrit’s GWT client library in the plugin API

    • Issue 5791: Add an extension point to allow setting a site banner.

    • Add an extension point to allow custom site footers.

    • Extend QuotaBackend and QuotaEnforcer extension points.

    • Introduce repository size quota enforcer.

      Introduce “/repository:size” quota group that gets examined when commits get pushed to the repository.

    • Issue 11028: Add support for “Link Another Identity” screen in PolyGerrit

    • CommitApi: Add method to get commit info

    • Allow to set content type in the PolyGerrit plugin REST API interface

    • Add changeCleanup.cleanupAccountPatchReview configuration parameter to wipe out AccountPatchReview data when change gets auto-abandoned.

  • Elasticsearch Updates

    • Issue 11266: Add support for Elasticsearch 6.8.

    • Issue 11267: Add support for Elasticsearch 7.3.

    • Update elasticsearch-rest-client to 7.3.1.

  • PolyGerrit UI Fixes

    • Issue 11350: Upgrade highlight.js to latest master revision.

    • Issue 11096: Fix page not opening after a couple of times switching between GWT and PolyGerrit UI.

    • Fix dialog popup when going to /admin/create-project.

    • Add support for /groups

    • Redirect /groups/self to /settings/#Groups

    • Issue 10733: Fix anchors not working at page load on settings page

    • Issue 10062: Fix Polygerrit converting plus (+) to space when calling email.confirm API, and then failing with “invalid token”

    • Issue 11344: Fix commentlink URL and HTML links when canonical URL includes a base link.

  • Other Fixes

    • Issue 11348: Display on error_log the progress of the online migration from ReviewDb to NoteDb.

    • Issue 11235:

      Fix ls-user-refs reporting wrong results because it was not using the identity of the username given as parameter.

    • Issue 11222: Skip receive.maxBatchCommits when skip-validation option is passed and a commit validator implements shouldValidateAllCommits

    • Issue 11083: Set the correct new revision on change-merged events when submitting by push.

      When multiple changes are submitted at the same time by push, the new revision in all the change-merged events should be the revision of the head of the destination branch after all changes are submitted.

    • Adapt gerrit.sh script to work on Alpine Linux.

    • Issue 10855: Fix standalone GWT plugin builds failing because of a broken transitive load of GWT_PLUGIN_DEPS for in-tree plugin builds

    • Issue 11148: Speedup online reindex migration by skipping evaluation of submit rules for closed changes.

    • Issue 11016: Fix Gerrit slave site init leads to update failure on system_config caused by read-only transaction

    • Issue 11106: Fix missing comment context for left side in email notifications.

    • Issue 11110: Do not swallow the exceptions that caused REST-API to return with a status >= 400.

    • Issue 11086: When a WIP change is implicitly merged by direct push to the branch, its WIP state is unset.

    • Issue 11082: Close changes oldest first when submitting on push.

    • Submit: Fix wrong conflict resolution

    • Add methods on the change API to get comments and draft comments as lists.

    • Make DefaultChangeReportFormatter extendible by plugins.

    • Add back the oneByExternalId method on InternalAccountQuery.

      This was removed in 2.16 but is added back so it can be used by plugins and extensions.

    • Fix and expand documentation of REST API to get revision files

    • Fix detecting changes of parent trees when computing change kind for merge commit.

      A new patch set of a merge change is considered as NO_CHANGE if the commits have the same delta and trees. For merge commits this includes comparing the trees of the parent commits.

    • Reduce log spam of “setting reductionLimit” debug messages of the Prolog engine.

    • Issue 11325: Do not update change set modified date on ReviewDb when a user delete all its draft changes.

    • Fix rebase change REST API returned status code.

      The rebase change REST API return 422 Unprocessable Entity, instead of 500 Internal Server Error, If the specified base change is missing

    • Catch all exceptions for reporting on Schema_130 migration and display the name of the project that failed the migration.

    • Issue 11271 Update rules_go to 0.18.6 for compatibility with Bazel 0.27.0

    • Issue 11248: Ensures that a newly added label in a parent project is available in the ACL configuration of a child project.

  • Replication Plugin Fixes

    • Issue 10852: Fix stale replications caused by in-flight pushes not properly removed when failed.

    • Issue 11204: Fix creation of missing repository when replicating to a Gerrit server over HTTP.

    • Issue 11175: Introduce new ref-filtering extension point for preventing replication of outdated SHA1s, mostly useful in a multi-site scenario to prevent split-brain.

    • Issue 11055: Fix failure to start when re-triggering persisted events

    • Issue 11172: Fix persisted event is removed before all replications to all nodes are completed.

    • When replication plugin is stopped or reloaded, mark all the currently pending replications as cancelled.

    • Allow to configure timeout for SSH connections and SSH commands.

      The timeouts can be configured with gerrit.sshConnectionTimeout and gerrit.sshCommandTimeout, respectively.

    • Make more classes and fields public/protected to ease extensibility.

    • Improve handling of remote repository creation failures.

    • Reintroduce boolean return value of methods in AdminApi.

    • Refactor AdminApiFactory to an interface with a default implementation that gets bound as a dynamic item, which can be replaced by derived implementations.

    • When rescheduling due to in-flight push also log the in-flight task ID.

  • Hooks Plugin Fixes

    • Issue 10823: Allow to configure the number of hook execution workers.

      By setting hooks.executorThreads the number of workers can be configured. If not set, it defaults to 1 which was the previously fixed value.

3.0.1

  • Upgrade JGit to 5.3.1.201904271842-r.

  • Issue 10858: Fix starting Gerrit under Tomcat 8.

  • Issue 10664: Fix duplicate key detection in MySQL patch review database.

  • Issue 11016: Fix failure to initialize on slave.

  • Issue 10763: Fix ACLs to allow regexes for tag and ref permissions.

    The documentation states that reference names can also be described with a regular expression by prefixing the reference name with ^, but the UI only showed the creation field when a non-regex name was used.

  • Issue 11082: Close changes oldest first when submitting on push.

  • Issue 11059: Fix setting BLOCK on partial label range in permissions.

  • Issue 10790: Avoid evaluating submit rules twice for open changes.

    Prolog submit rules were evaluated twice per page view for an open change, which caused performance degradation on projects defining complex rules.

  • Issue 10943: Set References: header on new change notification mail.

    GMail changed the way emails are grouped in conversation view, which, combined with the fact that Amazon SES changes the Message-ID header, resulted in the new change notification email not being grouped with subsequent emails related to the same change.

  • Issue 10952: Fix definition of PID in gerrit.sh.

  • Issue 10852: Replication plugin: Fix scheduling starvation.

  • Issue 10896: Fix eliding project name without slash in notification emails.

  • Issue 10359: LDAP: support servers that do not allow anonymous browsing.

    Add ldap.supportAnonymous configuration setting in gerrit.config to support servers that do not allow anonymous browsing. Default is true per standard and best practice.

  • Show submit button with tooltip when not allowed to submit.

    The submit button was hidden when the user did not have permission to submit, or other conditions prevented submit (for example the change being WIP).

  • Don’t send “GPG keys added” notification when no GPG keys were added.

    A GPG key update can include both addition and removal of GPG keys. The notification email for addition of new keys was always sent, even if the update only removed keys.

  • Update email notifications on changing security related settings.

    Email notifications are now sent when a GPG or SSH key is removed, and when the HTTP password is deleted or changed.

    An email notification is now always sent when an SSH key is added to an account, even when it was added by an administrator.

    These notifications allow to alert the user if their account is compromised and keys or password are altered by the attacker.

  • Remove explicit dependency on protobuf_java.

    The protobuf_java library is now consumed from rules_closure.

  • Improve performance of migration of accounts to schema 146.

    • Migration of the accounts is parallelized. The default number of threads used is the number of available processors. This can be customized using the threadcount system property.

    • Before the migration, gc --prune=now is executed.

    • When hosted on FileRepository, refs are packed after migration of every 1000 accounts.

    • A progress indicator counts every 100 accounts migrated.

  • Allow commit validation listeners to ignore the skip-validation push option.

    Gerrit allows certain users to skip validation of new commits by passing the skip-validation push option.

    A new method shouldValidateAllCommits is added on the CommitValidationListener, to allow plugin implemented validators to override this option and always be invoked for new commits. The new method has a default implementation that returns false meaning that existing implementations don’t need to be modified and will behave the same as before.

  • Optimize commit and ref operation validation for non-ff push.

    On a non-ff push all the commits were validated before the ref operation was validated. On a push with many commits, validating all the commits is wasteful in the case where the ref operation is rejected. The logic is changed so that the ref operation validation is performed before the commit validation.

  • Disallow change index task duplication.

    It was possible for multiple index tasks to be queued for the same change.

  • Fix formatting issues and inconsistencies in soy email templates.

  • Use URL Formatter interface to generate URL in outgoing emails.

  • Fix error message when JRE is not found when starting Gerrit.

    The error message recommended to check for a JRE “>= 1.7”, but Gerrit requires Java 8 minimum.

  • Expose the createProject method of the CreateProject class to plugins.

    This allows plugins to directly invoke the project creation, avoiding the checks that are performed when invking via the apply method.

  • Expose the jsr305 library in the plugin API.

  • Upgrade gitiles to 0.2-10.

    Includes a fix for rendering of metalinks in the navigation bar.

  • Elasticsearch Fixes

    • Issue 10499: Set default number of shards according to Elasticsearch version.

      In Elasticsearch version 7.0 the default number of shards was reduced from 5 to 1.

      See the Elasticsearch documentation for details.

    • Issue 10496 and Issue 10844: Fix usage of include_type_name in index creation.

    • Add support for Elasticsearch 7.1.

    • Upgrade elasticsearch-rest-client to 7.1.1.

  • PolyGerrit UI Fixes

    • Only display 404 page on initial load.

    • Don’t reload when viewing dashboard.

    • Fix hiding the HTTP password screen.

      It was possible for the HTTP password to be un-hidden using CSS.

    • Add an extension point to allow adding links to the user header.

  • Documentation Updates

    • Issue 10897: Update links to Google individual and corporate CLA pages.

    • Clarify that account must have a username to be able to set HTTP password.

    • Fix formatting in project config documentation.