Download: 3.9.5 | 3.9.4 | 3.9.2 | 3.9.1
Documentation: 3.9.5 | 3.9.4 | 3.9.2 | 3.9.1
The language level used for Gerrit source code stays on Java 11, however, Gerrit is built and distributed for Java 17, which is the recommended JVM version for running it in production.
batch-refupdate
Gerrit notifies all the refs of a single batch-refupdate as a single stream event JSON payload Issue 40015567. The new batch-ref-updated
event is controlled by configuration and can be switched off for backward compatibility with legacy CI/CD systems.
ref-update for draft-comments
Gerrit generates the ref-update event for all the additions and removals of draft comments in the All-Users
project (Change 382819). This is needed for replicating the All-Users
project across sites, thanks to the replication plugins being notified of the updates.
Due to the nature of drafts, on busy installations the amount of ref-updated
events created on draft operations could be high, possibly having an impact on performance.
For this reason this is disabled by default, you can enable it by configuring event.stream-events.enableDraftCommentEvents=true
in gerrit.config
Change 385714
There are new limit definitions which can be used to protect Gerrit from improper client activity.
change.topicLimit
: defines the maximum number of changes in the same topic (Change 381055.
change.maxFileSizeDownload
: prevents memory overload caused by clients downloading large files from REST-API (Change 381595).
change.maxFileSizeDiff
: prevents memory overload caused by rendering large files diffs in a browser.
A new change.diff3ConflictView
option allows to enable a richer diff3 rendering of changes with conflict markers (Change 382894).
Gerrit can return changes to the original attention set assignment if any of the new assignees do not provide feedback within a specific time (Issue 40015204). The behaviour is controlled by two new settings, attentionSet.readdAfter
and attentionSet.readdMessage
.
Allow to limit the queries that do not specify a default limit and also can now reindex changes with an asynchronous process when a change is updated from the UI, controlled by the index.indexChangesAsync
.
The new option yields a much more responsive user-experience by releasing UI elements without waiting for the backend reindex execution to complete.
Users can now delete their own account, making it possible to be forgotten by the Gerrit Code Review platform. Please note that existing commits in the projects will stay and the account's e-mail stored in Git commits will be preserved beyond account deletion.
User Suggested Edits are an easy and fast way for reviewers to suggest code changes that can be easily applied by the change owner. They were introduced in 3.7.2
as an experimental feature, disabled by default. With Gerrit 3.9
, this feature is no longer experimental and User Suggested Edits are now enabled by default.
Plugins may store additional string key/value pairs to change notes in NoteDb.
Change 372694 Added APIs to set/get custom keyed-value change metadata
Plugins can communicate and declare dependencies to other plugins thanks to the introduction of Gerrit-ApiModule
Guice modules in plugin manifest (Issue 292114807).
Change 394440 flagged the API Changes.id(int) as deprecated to prevent using it from plugins and fail to locate changes imported from Gerrit servers with a different server-id.
The release of Gerrit v3.9.0 has been impacted by the bad merge of Change 394445 due to the “implicit merge on moved changes issue” that has pulled 64 unwanted commits from the master branch. As a consequence, the version has been declared defective and withdrawn.
The upgrade from 3.9.0 to the following 3.9.* patch-releases needs to follow the instructions of the “Offline upgrade” because it contains an incompatible Lucene Engine that won't be able to read the legacy index data.
This release doesn't contain schema changes.
The accounts
index version has been increased to version 13. The changes
index version has been increased to version 84. The groups
index version has been increased to version 10. The projects
index version has been increased to version 8.
By default, if you're upgrading from 3.7/3.8, the index is automatically rebuilt upon Gerrit startup after the upgrade.
If you're upgrading from 3.6 or an earlier version, you must use the Offline upgrade steps below.
java -jar gerrit.war init -d site_path --batch
Online index schema upgrade from 3.7/3.8
above). If you still want to you will need to run reindex:java -jar gerrit.war reindex -d site_path
java -jar gerrit.war reindex -d site_pathSee the reindex program for other options.
Gerrit v3.9.x supports zero-downtime upgrade from Gerrit v3.7 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 any API.
The zero-downtime upgrade consists of the following steps:
gerrit.experimentalRollingUpgrade
to true
in gerrit.config
on both Gerrit primaries.gerrit.experimentalRollingUpgrade
from gerrit.config
on both Gerrit primaries.Downgrade to any Gerrit v3.7/v3.8 release is possible, but requires the following manual steps:
java -jar gerrit.war init -d site_path --batch java -jar gerrit.war reindex -d site_path
Change 369234 Return 400 BAD_REQUEST when a reviewer cannot be added by email
When trying to add a user that cannot be added as a reviewer on a change, the API was returning a 200 Status Code with an error message.
Change 379475 Don't call Java gc explicitly, remove --gc option from show-caches ssh command and REST API /config/server/summary
Change 378638 Remove change.stars
field from ChangeInfo
Remove the stars
field from the ChangeInfo
response. You should check whether you were relying on this field when using any REST endpoint returning ChangeInfo
.
Change 373780 removed all performance/operations/*
metrics because of the performance issues introduced (details)
Change 371198 Add option to populate ‘starred’ field for change queries
star
option can must now be provided to include the starred
field in ChangeInfo
, which indicates if the change is starred by the current user or not.
Change 387435 refreshAfterWrite
and maxAge
settings in gerrit config are now honored for both persistent and in-memory caches.
Previously these settings were erroneously ignored for persistent caches. If you rely on them for persistent caches you should be aware they will be honoured now.
Change 379154 New patch sets will prefer the previous patch set's committer email
If one of the user's secondary emails was used as the committer email in previous patchset, continue using it instead of preferred email.
Change 390986 Update mockito
to 5.6.0
and bytebuddy
to 1.14.9
Mockito framework was upgraded from 3.3.3
to 5.6.0
, hence if you have some custom plugins your test code might require some minor refactoring. Please refer to the mockito documentation and the release notes
Change 394435: Support listing of patch-set files also for imported changes from other Gerrit server-ids
Change 377699: Allow generating safe local-only documentation, without reference to external fonts in CSS
Change 394654: Fix documentation attributes bug
Change 392517: Added ‘m’ alias for the ‘message’ operator
Change 392515 Groups Audit Log API - Gerrit now parses all commits in refs/groups/... branch
Change 392514 Support tracing requests that match a header
Gerrit supports tracing requests that match a configured trace configuration. With this change we add a new parameter to the tracing configuration that allows matching requests by a header. E.g. this allows matching requests that are sent with a certain user agent (e.g. headerPattern = User-Agent=foo-.*).
Change 392518 Change .scl
files to be highlighted as python
Change 392175 Reviewer's votes are not restored back after the reviewer is deleted and added back
When a reviewer votes for the patchset and then the reviewer is removed, Gerrit removes votes from this reviewer too. However if the reviewer is added back (to the same patchset) previous votes are restored back.
This change ensures that after a reviewer is deleted, all votes from this reviewer are permanently removed.
Change 390897 Option to skip projects during change reindexing
Introduce index.excludeProjectFromChangeReindex
: A list of projects that will be excluded from reindexing. This can be used to exclude projects which are expensive to reindex to prioritize the other projects.
Change 390895 The revert UI now defaults to Revert^2 instead of "Revert "Revert “...”
Change 390614 Users can now upload changes to group refs except changes to group files
Change 389115 Improved error message when change cannot be submitted due to a missing dependency
Change 388914 Changing preferred email does not result in duplicate email
Change 368335 Rebase can be performed with a secondary email using REST API
Change 388336 Added ‘description’, ‘d’ aliases for the ‘message’ operator
Change 388554 committer_email
field is removed from topic cherry-pick payload
Change 392534 Return approver/rejector for a label if DETAILED_LABELS is passed
Change 388054 Eliminated startup warning for plugins whose SshModule only provides Ssh* CommandInterceptors
Change 387217 Fixed case where an exception in change visibility checking could break visibility of all refs in that repo
Change 377154 REST API supports cherry-pick using a registered secondary email
Change 387055 SSH set-topic cmd is fixed to consider edit topic permission
Change 387103 Avoid NullPointerException when deleting a single ref
Change 387216 Fixed potential OOM due to SubmitRuleEvaluator creating new metrics whenever an instance was created
Change 387017 Fix NPE when auth.httpDisplaynameHeader
is configured but header is unset
Change 387054 force topic edit
'` permission is fixed to work with change owner rule
Change 386976 Fixed potential OOM due to *QueryProcessor classes creating new metrics whenever an instance was provided
Change 386974 SSH command set-reviewers
now handles lock failures with retries
Change 386994 Fixed InactiveAccountDisconnector NPE due to race condition
Change 386777 Allow modules to provide different logic for the HTTP canonicalWebUrl
This is useful to allow adding some logic to the way the canonical Web URL is computed. A use-case for this need is the virtualhost
module, where the canonical Web URL is replaced by a virtual host name instead Change 386616
Change 383334 Allow to set instance ID from java system property
Change 385556 Allow pagination using continuation token for ‘list branches’
Issue 295457464 SSH queries now show copied approvals on respective patch-sets
Change 383955 Allow SubmitRequirement errors to be HTTP 500 errors
Change 384096 Exposed default branch in GerritInfo
Issue 296889346 Added placeholder text for “Default Branch” field in the create repo wizard
Change 383034 List/Query projects: Set flag in last returned project when result is limited
If the number of projects matching a query exceeds either the internal limit or a supplied limit
query parameter, the last project object has a _more_projects: true
JSON field set now.
Change 382557 Added support for searching projects by substring
The new substring:SUBSTRING
predicate matches projects that have a name that contains SUBSTRING
(case-insensitive).
Change 382295 Added support for querying projects by prefix.
the new prefix:PREFIX
predicate matches projects that have a name that starts with PREFIX
.
Change 381915 Added support for matching all project by an empty project query
Change 382258 Fixed setting parent field in project index for direct children of All-Projects
Change 381594 Added response_format_options
param to /review
API
Allow specifying a list of formatting options to the the /changes/{change-id}/revisions/{revision-id}/review
endpoint.
If response_format_options
was provided, the response payload will contain a new change_info
field showing post-update change information formatted by response_format_options
.
Change 380914 Fixed NPE when submitting changes
Change 380916 Fixed ThreadMXBeanSun to only report allocated bytes when supported by the JVM
Change 379054 Fixed create merge patch-set API to use identity of caller as committer
Change 380314 Named queries are now supported on group refs
You can now use group
with the query
predicate: query:group="GROUP"
Change 379714 Named destinations are now supported on group refs
You can now use group
with the destination
predicate: destination:group="GROUP"
Change 379513 Add CustomKeyedValues
field to change index, requires schema upgrade
Change 378999 Fail ‘Get Diff’ requests for file sizes that exceed 50Mb
Change 378899 ApplyPatch: Do not fail with 500 ISE if no patch is provided
Change 378535 Added config option that allows to disable change ID link footers
Introduce the receive.enableChangeIdLinkFooters
configuration to enables a Link
footer to be used as an alternative Change-Id
footer.
Change 376877 Add a new parents_data
field in RevisionInfo
The new field is a list of ParentInfo entities and provides more information about the parent commit of the patch-set.
Change 377174 Add branch
as a new field in RevisionInfo
The name of the target branch that this revision is set to be merged into.
Change 375155 Fix GetRelated if multiple changes for the same commit exist
Change 356465 Add API method for deleting self account
Change 374995 Adding GET and POST requests for custom_keyed_values
Change 374695 Add verbose version output
provide noteDb and index versions, in addition to the Gerrit version
Change 373997 Return 500 when a request is canceled due to an exceeded server deadline
Change 373854 The commit-msg hook now detects existing Link
trailers.
An additional $
was making detection of Link trailers to fail, causing Link trailers to repeatedly be added when amending a commit.
Change 370194 Add merge strategy to rebase REST API
The strategy of the merge, can be recursive
, resolve
, simple-two-way-in-core
, ours
or theirs
, default will use project settings.
Change 362774 Adds a new footer for changes for key-value storage.
These can be used to store metadata on a change. The format on the change-message is for a given <key>
<value>
is: Custom-Values: <key>=<value>
Change 366776 Provide change number to patch set link plugins
Change 392474 Add session support in FakeHttpServletRequest for tests
Change 392454 Include HTTP testutil package in the Gerrit acceptance framework
Change 392455 Fix FakeHttpServletRequest getRequestURI() returning query string
Change 385115 Fixed updating and publishing draft comment on old patch set
Issue 309849905: Account external IDs are updated in a single commit
Change 390919 Skip already reindexed changes during reindexing
During online reindexing after an upgrade, all changes were reindexed, even if they were already present in the new index. If the Gerrit instance was restarted before the index was ready, this caused a lot of repeated indexing.
Now, changes that are already present in the newest index version won't be reindexed anymore. However, they will still be checked for staleness and reindexed if necessary.
Change 376094 Add cache to speedup ref advertisements (particularly on replicas) and receive-pack
Change 224772 Reduced memory and storage needs for TagSet
Change 377814 Bloom filters are no longer built during offline reindex
Change 380594 Reduced memory and storage needs for TagSet by using RoaringBitmaps
Change 389894 Track diff page sidebar state as a user preference
Change 389700 Add a user preference for sidebar on the diff page
Change 376934 Rebase can be performed using a secondary email via UI
updates the UI to show a list of relevant emails to choose from when rebasing a change.
Issue 303075739 New frontend extension point: auth-link
Change 387695 Show diff as User Suggested Edit Preview instead of code block
Issue 301481564 Fix the repository configuration loading and rendering when switching tabs
Change 382555 Introduce “showdiff” plugin event
Any listeners are notified any time a diff is shown on the screen.
Change 379095 Add diff page sidebar for plugins
Change 378634 Experimental plugin endpoint for diff hover events
Change 378436 Fix copying Change-Id in dropdown
Change 373477 Fire SHOW_CHANGE
event to plugins from diff page
Change 394834 Fix auto-completion of suggested accounts for imported changes
Change 391858: Document ChecksApi.updateResult()
in PolyGerrit plugins checks API
Change 391696: Document check-result-expanded
plugin endpoint in PolyGerrit plugins checks API
Change 390454 Document gerrit set-head
SSH command and fix old UI references
Change 388936 Explain in ls-projects
SSH API when the “parent” field is “?-N”
Change 388936 Explain in /projects/
REST API when the “parent” field is “?-N”
Change 387736 Be more explicit about using Bazelisk in dev docs
Change 382794 Update blurb for ldap.accountFullName
Change 378094 Add example for GerritSiteHeader.html
Change 372854 Add example to blurb for ldap.mandatoryGroup
Change 387495 Bump JGit version to b6b1e0a0a. You can retrieve the full list of changes with:
git log --no-merges --format=oneline 74fa245b3c3ccf13afcbec7911c7c8459e48527d..b6b1e0a0adda605f7a62c915d1aef606b961e36f
notable changes are:
Change 388177 Update error_prone_annotations to 2.22.0
Change 372276 Update guice version to 6.0.0
Change 388038 Add java-prettify as git submodule
Change 387998 Update gitiles version to 1.3.0
Change 387999 Update SSHD version to 2.10.0
Issue 302090044: Update plugins/download-commands
--recurse-submodules
flag to supporting commandsChange 336947 Upgrade guava to 32.1-jre
Change 384754 Update plugins/replication
Change 378434 Update Resemble to 5.0
Change 219455 Update Lucene version to 8.11.2
New features
Change 424957; Mention who owns the change in comment emails
When receiving the email, knowing the change owner helps the receiver prioritize their reviews.
Issue 325309573: Add virtual_id_number
to ChangeInfo
.
Introduces virtualId
to change data to avoid clashes when starring changes imported from foreign server ids.
Bug Fixes
Change 425597: Fix bogus account labels
Issue 337076005: Fix vertical alignment of header icon and text
Change 420279: Fix buttons on header disappearing
The login button was disappearing when the title was big enough.
Issue 338826950: Fix NPE during git clone
Change 423800: Removed missed reference to assignee config in docs
Change 423378: gr-main-header: fix header to wrap the better
Issue 335613081: Fix clearing cache in gr-rest-api
Change 420357: Fix buttons on header disappearing
Plugin changes
Other changes
Security Fixes
Issue 321784734: Fix endless loop when using “is:watched” in project watches.
Previous setting up email notification with is:watched
predicate would create an infinite loop that would take a CPU offline.
Breaking changes
Change 416278: Validate and reject SSH keys with invalid or mismatched algorithm
Verify that the OpenSSH key algorithm matches the one associated with the public key. Throw a new specific InvalidKeyAlgorithmException if the two algorithms do not match.
Make SshKeyCacheImpl tolerant to existing keys stored in the accounts' profile, otherwise Gerrit may start flagging keys that have been previously stored as invalid, resulting in random authentication failures by existing users.
Existing invalid keys are reported in the error_log with the associated exceptions and automatically fixed, removing the invalid key from the accounts profile and adjusting the key algorithm with the one associated with the public key.
Bug Fixes
Issue 330195358: Fix paginationType NONE to stop querying when there are no more results
Change 416560: Ensure that clearing reviewed flags is performed on correct change when it is imported from another instance
Issue 325309573: Prevent starred changes clashes between local and imported changes having the same change number.
Note that as a result of this change the virtual_id_number
is propagated as part ChangeInfo
returned in the REST API calls.
Issue 325309574: Assign draft comments to the correct change when there is ambiguity due to imported changes having the same change number.
Change 411279: Fix change staleness check for changes with drafts and stars
Issue 325821304: Fix change id parsing in SSH commands
SSH commands did not support anything but simply the change number as change id. They are now able to interpret all the standard format of changeIds like project~changeNumber.
Issue 40014889: Fix WIP changes being always considered as in conflict.
Change 410458: ReviewCommand identify change with project,change-number if project is provided as parameter in the command line
Issue 324462734: Prevent reload of plugins with ApiModule
JGit changes
Change 415557: Update JGit to c0b415fb0
ref-prefix
scanningBreaking changes
Change 404018: Add option to populate ‘starred’ field for change queries.
A star
option must now be provided to include the starred
field in ChangeInfo
, which indicates if the change is starred by the current user or not.
New Features
Change 406237: Add metrics for git/upload-pack/bitmap_index_misses_count
and a separate one for missing bitmap indexes.
JGit packer tracks the number of times that an object was not found in the bitmap index or if the bitmap index was completely missing. Added the git/upload-pack/bitmap_index_misses_count
for being used in performance graphs, while the git/upload-pack/no_bitmap_index
should be more suitable for alerts.
Change 406004: Add timer for git/upload-pack/phase_searching_for_* phases.
Add metrics for the “Finding sources” phase, which is critical for an optimal Git/HTTP performance.
Change 402497: Introduce configurable shutdown timeout
Added container.shutdownTimeout
to configure the maximum time (in seconds) to wait before terminating Gerrit.
Change 404718: Add timer for git/upload-pack/phase_negotiating
.
Added the git/upload-pack/phase_negotiating
so that the Gerrit admin can graph how these are performing and spot any potential issues. JGit packer tracks time spent in the negotiation phase. This statistic was only exposed in the sshd_log and is not available when the client uses Git/HTTP.
Change 393037: Bazel: Add support for BuildBuddy RBE provider.
BuildBuddy provides an open-core suite of enterprise features for Bazel.
Performance Fixes
Merge-If-Necessary
.Bug Fixes
Issue 325537222 Force Bazel to separate /tmp between JVMs when running test
Issue 319671265 Fix x-plugin communication with multiple ApiModules
Fixes plugin load failure when multiple plugins were declaring ApiModules for cross communication.
Fixes potential NullPointerException when ignoreSelfApproval
magic label is used.
Issue 314113030: Fail the change reindex operation upon StorageException(s).
Allows some of the indexing operations to fail, so that if a change indexing throws a StorageException
, so that the change does not disappear from the index.
Change 395741: Fix event parse exception when changing repository HEAD.
Explicitly registered a type and class for ProjectHeadUpdatedEvent
in EventType
in order to successfully deserialize events.
Issue 318745940: Fix serverId in identity parsing for imported human comments.
Remapping of account-ids correctly adapts the comment's author account-ids and serverId
fixing the inconsistent identity of the comments.
Change 400997 Reduce email spam, by not notifying existing reviewers when new ones are added
Issue 318079520 Fix comments rendering with imported changes
Fixes a bug when comments posted on changes imported from another Gerrit instance were not rendered in the UI.
Issue 40014889 Fixed WIP changes always showing Merge Conflict in searches
Fixes the work-in-progress changes always shown as having a merge conflict when change.mergeabilityComputationBehaviour
was set to value other than NEVER
.
Issue 312895375 Fix comment directly link pointing to a change imported from other Gerrit server-ids
Fixes direct links to a comment on a change imported from another Gerrit instance returning HTTP status 404.
Change 404937: Fix copyable change links when base URL has a path.
Removed extra base URL prefix in gr-copy-links
. The links are crafted from createChangeUrl which already returns an URL with the base URL.
Issue 311925527: Fix canonical web url binding in Git over HTTP.
Fix a problem encountered in the virtualhost
plugin, where despite proper configuration for tenant canonical web URL, the git push output would use the value of gerrit.canonicalWebUrl
configuration option.
Dependency Updates
Change 409781 Update download-commands to ed214d6f
Change 403721: Bump SSHD version to 2.12.0 with security fix for CVE-2023-48795
JGit changes
Change 409279 Update jgit to bf70c9f4c (stable-6.7) You can retrieve the full list of changes with:
git log --no-merges --oneline b6b1e0a0ad..bf70c9f4c2
notable changes are: