Download: 3.7.3 | 3.7.2 | 3.7.1 | 3.7.0
Documentation: 3.7.3 | 3.7.2 | 3.7.1 | 3.7.0
Gerrit UI is mostly migrated to Lit, with a few exceptions for certain modules.
Users can be mentioned in comments using the @<user>
notation and select the matching accounts. Mentioning users automatically add them in CC and send e-mail notification to get their attention.
This feature can be enabled in gerrit.config
by adding this configuration:
[experiments] enabled = UiFeature__mention_users
Comments and checks accept and render the full markdown syntax, allowing richer interaction and communication between authors and reviewers. This follows the CommonMark spec, except inline images and direct HTML are not rendered and kept as plaintext. No markdown rendering is done in the commit message.
Apply a change action to an entire group of changes all at once right from the search page or your dashboard. Simply select all the changes, click your action, and fill out the details on the dialog. Currently supported actions are:
The theme is automatically changed to light/dark based on your OS preference. You can change the theme in users preferences.
The copy links are in the dropdown next to the change number with keyboard shortcuts or a button to quickly copy the format that you prefer to link change.
Gerrit can read and render Changes coming from Projects copied from other servers having different server-ids and account-ids. This allows the Gerrit administrators to move projects and changes across servers with a compatible NoteDb structure and having the change meta-data parsed and reindexed in Gerrit.
NOTE: Only the changes can be imported and reindexed in Gerrit, following the account reverse lookup association using the new
imported
external-ids. Groups, ACLs and project hierarchy and Prolog rules (akarefs/meta/config
) may not be imported out of the box and still require the Gerrit administrator to copy and adapt them manually.
At high-level, the process consists of:
Configure the gerrit.importedServerId
with the values of the gerrit.serverId
of the Gerrit servers from the project changes to be imported originate from.
Identify the accounts involved in the project changes to import and create the corresponding imported
external-ids in the All-Users.git
repository.
Example of how to add the external-id imported:1000002@59a4964e-6376-4ed9-beef-123bd9217df8
to the account-id 1000001
:
$ EXT_ID=imported:1000002@59a4964e-6376-4ed9-beef-123bd9217df8 $ EXT_ID_NOTE=$(echo -n $EXT_ID | shasum | awk '{print $1}') $ git clone $GERRIT_SITE/git/All-Users.git && cd All-Users $ git fetch origin refs/meta/external-ids && git checkout FETCH_HEAD $ echo -e '[externalId "'$EXT_ID'"]\n\taccountId = 1000001' > $EXT_ID_NOTE $ git commit -am "Added $EXT_ID" $ git push origin HEAD:refs/meta/external-ids
Create the destination project of the import in Gerrit
Push the changes under refs/changes/*
from the source Gerrit into the newly created destination project.
Reindex all imported changes, either online with gerrit index changes
or offline with the java -jar gerrit.war reindex
commands.
The overall process has been described in detail and live demoed during the Gerrit User Summit 2022.
Gerrit admins can verify the ACLs of projects for individual users using the new gerrit check-project-access
SSH command.
This release contain changes to the schema which is upgraded to version 185; also all indexes have been upgraded.
Download the gerrit.war and run the init
and then reindex
program:
java -jar gerrit.war init -d site_path java -jar gerrit.war reindex -d site_path
Gerrit v3.7.x supports zero-downtime upgrade from Gerrit v3.6.3 or later when configured using a high-availability configuration, and the Git repositories are stored in a shared filesystem such as NFS or similar.
NOTE: Gerrit versions older than v3.6.0 would require an offline upgrade.
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:
gerrit.experimentalRollingUpgrade
to true
in gerrit.config
on both Gerrit masters.gerrit.experimentalRollingUpgrade
from gerrit.config
on both Gerrit masters.Downgrade to Gerrit v3.6.x release is possible, but requires the following manual steps:
Shutdown a migrated Gerrit v3.7.x server
Downgrade the All-Projects.git version (refname: refs/meta/version
) to 184
:
git update-ref refs/meta/version $(echo -n 184|git hash-object -w --stdin)
See git hash-object and git update-ref.
NOTE: The migration of the label config to copy-condition performed in v3.7.x init step is idempotent and can be run many times. Also v3.6.x supports the copy-condition and therefore the migration does not need to be downgraded.
Run Gerrit v3.6.x init, downgrading all plugins, and run the off-line reindex
java -jar gerrit-3.6.x.war init -d site_path java -jar gerrit-3.6.x.war reindex -d site_path
Start Gerrit v3.6.x server
GerritForge RPM repository updated for arm64 architecture
GerritForge RPM v1.4 has been released, including the native packages for arm64 architecutre.
gerrit:3.7.0-almalinux8 OS base image upgraded to AlmaLinux 8.6
DockerHub images for arm64 architecture
DockerHub Gerrit images include images for arm64 architecture.
Change 335625: ThreadMXBeanSun: Use getCurrentThreadAllocatedBytes() method
Used Bazel version is shipping latest release of JDK 11, that contains this method. The getCurrentThreadAllocatedBytes()
method is provided from JDK versions
= 11.0.10. Make sure you are running JDK versions >= 11.0.10 when upgrading to 3.7.
Change 343774: Delete ignored state of changes and ‘star:’ queries
The query predicates star:ignored
, is:ignored
and star:star
are not supported anymore. The latter is identical to ‘is:starred’ or ‘has:star’.
Change 334467: Removed support for deprecated approval config fields in label configs
The boolean flags in label configurations to control approval copying, as well as the copyValue settings, was previously deprecated and now completely removed in flavor of the new copyCondition setting that allows to express the copy conditions as a query.
Change 337456: Ban new modifications to label functions in favour of submit requirements
Issue 15784: New project head updated
event in the stream events
Issue 11686: Discontinue support for legacy numeric types in Lucene
In Lucene the implementation switched from integer id to string id and now all the old code is removed. Three different index implementations are affected:
Change 334325: Migrated label definitions to use copy conditions instead of deprecated fields
The boolean flags in label configurations to control approval copying, as well as the copyValue settings, have been deprecated in favor of the new copyCondition setting that allows to express the copy conditions as a query. The newly added schema version migrates the deprecated fields to copy conditions.
NOTE: Because of this breaking change, downgrading to Gerrit v3.6.x is not possible out of the box.
Issue 15941: Fix SSH queries to not show commit-message unless --commit-message is provided
This issue has existed for several years and should be considered breaking as users might expect commit message to be included by default in SSH query results. Obtaining the commit message is a costly operation as the commit data has to be loaded. So, showing it even when --commit-message is not provided degrades the performance of SSH queries.
Change 336297: Recognize lower case operators in search
Previously, we only recognized AND, OR and NOT as boolean operators. This seems overly strict as users might unintentionally use the lower case variants.
Change 343798: Introduce index.pageSizeMultiplier
configuration to paginate index queries with increasing size
Change 343694: Improve performance of queries that check the visibility of changes for a non-current user
Change 343096: Introduce index.paginationType=SEARCH_AFTER
configuration for speeding up query pagination
Change 349694: Improve performance of parentof operator by two orders of magnitude
Change 345634: Paginate internal change index queries, as index backends such as Lucene and Elasticsearch are known to degrade with a high limit
Change 338154: Lazy load change notes when submit by push Improves performance of change submit via push
Change 338574: Cache ProjectControl instances in SSH queries A PerThreadCache is used to cache ProjectControl instances to improve SSH query performance.
Change 338614 Optimize SSH queries to avoid loading individual accounts This improves performance of SSH queries.
Change 338834: Avoid creating an IdentifiedUser multiple times in a SSH query This improves performance of SSH queries.
Change 339795: Improve performance of the create branch REST API when the repository contains over one million refs
Issue 16284: Fix performance issues with git-upload-pack on repositories with a large number of changes
Change 346979: Add ability to specify prefix, suffix and text fields for commentLinks of type link
Change 346854: Update change.maxPatchSets value from 1500 to 1000
Change 345229: Support bulk actions on dashboard and search pages
Change 337434: New REST API for previewing fix from the request body to a patch set
The newly added API fix:preview
previewes fix(es) provided as part of a POST request body. ApplyProvidedFixInput
holds the fix(es). This flow is suitable when a frontend plugin shows fix(es) that it is suggesting on the UI and that the user can accept.
Change 339788: Allow testing submit requirements using a pending change to the refs/meta/config branch
Admins can then test their SRs using the following workflow:
curl -X POST https://<gerrit-url>/changes/<change_to_test>/check.submit_requirement?sr-name=Foo&refs-config-change-id=$id
Change 336715: Disallow index updates that both add and remove fields
A new version may only add or remove fields, but not both. The type of existing fields may not be changed.
Change 341454: Allow using GitWeb with multi-site and cached-refdb
Change 307349: Add change REST endpoints to create and retrieve submit requirements.
Change 307352: Add a REST endpoint to delete submit requirements
Change 307351: Add a REST endpoint to list submit requirements in a project.
Change : New REST API for applying a fix from the request body to a patch set
Change 339555: The commit-msg hook ignores fixup and squash commits now.
Fixup and squash commits will inherit the Change-id of the commit they are squashed into.
Issue 10168: Fix broken links to Gitweb lightweight tags
Issue 12546: In commit-msg hook, the Change-Id is now inserted before any Signed-off-by
Issue 13930: Support ssh kex server-sig-algs for modern clients, like OpenSSH 8.8
Issue 15194: Define new event containing all refs updated in a single operation
Issue 15664: Disallow truncating the Change-Id across patch-sets
Issue 15997: Make DelegateRepository#delegate() method public
Issue 16182: Display the change's Change-Id underneath the commit message when not present in the commit message
Issue 16263: Disallow js in comment links
Issue 16322: Limit the number of changes that can be submitted at once
Issue 16354: Fix change screen errors when trying to load an invalid project with an exixting change number
Change 338680: Included copied/outdated votes in change message on patch set creation
Include copied and outdated approvals into the change message that is posted on patch set creation. This allows users to find the copied/outdated approvals for each patch set in the change log.
Change 337968: Copy approvals that are applied on outdated patch sets to follow-up patch sets if copyable
Copying approvals that are applied on outdated patch sets to follow-up patch sets make the life easier for CIs, e.g.:
Change 336712: Included outdated approvals in push output when pushing a new patch set
Change 336414: Included unsatisfied SRs into new patch set email when change becomes unsubmittable
When a change becomes unsubmittable users want to know which submit requirements are no longer satisfied.
Change : Support deletion of missing changes from the index
If a change is not found, and the “delete_missing” option is set to “true”, then try to delete it from the index.
Change 336134: gerrit.sh: add --debug option, start JVM in debug mode
Change 335754: Approver is added to the attention set when their approval is not copied
If a user applied an approval on a change and this approval gets outdated and removed when a new patch set is uploaded (i.e. the approval is not copied to the new patch set) then this user is added to the attention set now. This is to signal that this user should re-review the change and renew their approval.
Change 330407: Added the value “NOT_EVALUATED” to the SubmitRequirementExpressionInfo in the Change API and in NoteDb.
Change 349314: Fixed change reindex with label copyCondition containing group
Change 346077: Added “Your > All Visible Changes” default query
Add a new entry to the “Your” menu which queries “is:visible” which, is the query for viewing all changes.
Change 345136: Remove redundant/unhelpful ARIA labels from diff tables
Change 344914: Fix freezing in Safari when adding comments
Change : New user setting for theme. New default - Auto - shows dark or light theme based on OS theme preference. User can change new default in settings
Switching theme is now reactive - listening to OS theme preference changes or on user changing user preferences.
Change 337421: Introduce Auto Dark/Light Theme based on OS preference
Introducing a new default mode - Auto. This will dynamically change theme based on OS preferences. Mac OS has Auto mode, that switch to dark mode in evening. With this change Gerrit can have dark theme in evening and light them during day.
Change 343605: Make the file list easier to understand at a glance
Folders that match the previous file are colored gray, folders that do not match are black, and the file name it self is blue.
Change 340970: Start using material icons
Issue 14526: Allow to rebase changes with conflicts in the UI
Change 337097: Contribution Documentation updated for grammar
A few updates to the contribution documentation for developers:
Change 335394: Added property authenticated to e2e-tests
This property let you use authenticated HTTP clones with the e2e-tests.
New Features
Change 364591 Allow to hide download schemes from the UI
Allow hiding a download scheme in the UI by still allowing to use it.
Change 360221: Add metric for memory allocated by all threads
Introduce proc/jvm/memory/allocated which can be used to monitor total memory allocation rate causing work for the Java gc.
Bug Fixes
Change 362914 Fix internal server error caused by double flush in BaseCommand.TaskThunk
Ignore SshChannelClosedException
when flushing the task's output and error streams. JGit commands like UploadPack
flush these streams already. When TaskThunk
tries to flush them again SshChannelClosedException
is thrown and leads to an internal server error.
Change 364478: AndSource: Run isVisibleToPredicate
based on its cost
isVisible
check can be expensive and always running it ahead of other cheaper predicates can increase the query time. Update AndSource
to treat isVisibleToPredicate
like any other predicate so that it runs based on its estimated cost.
Issue 16819: Enable LDAP “Remember me” in login form per default
When users are presented with the LDAP login page, the “Remember me” checkbox is disabled by default. This might be a problem because, if the user doesn't explicitly click the checkbox, the session will be tied to the browser session.
Issue 16814: Improve Rebase-SubmitStrategy
performance in some cases
Set uninteresting branches based on project configuration: create_new_change_for_all_not_in_target
.
Change 369415: Fix metric computation with file paths in metric name.
Don't fail metric computation due to duplicated metric names.
Change 370354: Improved performance of queries when backend index returns more results than needed
Matching changes more than the limit is just extra work that is discarded at the end when the results are trimmed to match the limit. This can help improve performance of queries where a small percentage of changes are filtered in the initial page and the remaining results are obtained from the next page.
Change 357834: Improved performance for plugin-provided SSH commands that perform multiple permission checks or ref lookups for the same project
Move creation of PerThreadCache
to SshCommand
so that the cache is available to most commands, including plugins.
Change 361434: Mark LabelType.Builder#setFunction
as deprecated
Align the code with the documentation.
Change 370835: Enforce minimum Java version to Java 11.0.10 or higher
Minimum supported java version was raised to Java 11 since release 3.5. Since Change 335625 the minimum Java version 11.0.10 is required.
Issue 16884: Fix switching plugin screens.
Backport of Change 371094.
Issue 16823: Fix the search by query in the project filter
Fix regression introduced in Change 337994, in context of Issue 15134.
Change 370334 Fix build on MacOS 13.3
Update bazel to 6.1.2 and remote_java_tools to 12.1 to fix build on MacOS 13.3
Download-commands plugin fixes
Dependency Updates
Update jgit to 5ae8d28faaf6168921f673c89a4e6d601ffad78d.
JGit Bug 565854 SshdSession
: close channel gracefully
Close the channel gracefully to give the server a chance to clean up properly on its side.
Update bouncycastle to 1.72.
Update commons-compress to 1.22.
New features
The new setting that is added is called download.hide.
Bug Fixes
Change 364458: Fix an issue when clicking on edit uses an old patchset
Issue 16072: Fix “showchange” plugin event being triggered twice on patchset change
Issue 16589: Do not emit a SHOW_CHANGE event without a change
Issue 16765: Change gr-patch-range-select to use models instead of props
Change 362914 Fix internal server error caused by double flush in BaseCommand.TaskThunk
Change 361434: Mark label functions are deprecated
New features
Change 351795: New auto theme mode.
The theme is automatically changed to light/dark based on your OS preference. The new auto-theme can be set in users' preferences.
Change 351774: New copy links in the dropdown next to the change number.
New copy links and keyboard shortcuts or a button is added to the dropdown next to the change number to quickly copy the format that you prefer for your snippets.
Issue 16565: Introduce cache.threads option to allow custom executors for Caffeine caches.
The introduction of cache.threads
in gerrit.config
allows to configure a separate thread pool which can be tuned and decoupled from the rest of the JVM common threads.
Change 353177: Add tsconfig-plugins-base.json to Gerrit TypeScript Plugin API.
Adds tsconfig-plugins-base.json
to the npm package so downstream plugins can easily use the same set of TypeScript settings.
Issue 16445: Add slice number to the change indexing task description.
To indicate to the administrator each task is indeed doing something different, add the slice number if there is more than one slice in total.
Change 356215: Support init --reindex-threads=-1
to skip reindexing after init.
Admins may wish to run other commands after init
and before reindex
, but previously would have needed to observe and interrupt the init
command process once it started reindexing in order to do so. Providing an option to init
that skips the reindexing phase simplifies that workflow and makes it less error prone.
Change 356234: Add CUDA syntax highlighting.
Change 352534: Introduce --show-cache-stats
for printing cache stats during init
and reindex
, disabled by default.
Bug Fixes
Change 351674: SSH review cmd handles lock failures with retries.
Retrying on lock failures helps mitigating lock failures when there is contention to lock the notedb ref. Retries were already implemented in REST API code path at a high enough layer so that it applies for all REST APIs.
Change 353594: Inserting new patch-sets is retried on lock failures.
Mitigates failures when creating new patch-sets fails if the notedb ref is locked for another update on the change.
Issue 14686, Issue 14779, Issue 16030:
In Change 293978, eTag was removed from GetRevisionActions, but not RevisionResource. This resulted in the UI to show a stale ‘submit’ action on the change in the same submission chain. The UI now uses RevisionResource eTag, that does not include MergeSuperSet (all related changes).
Issue 16409: Report pack protocol errors to the client via smart-HTTP.
A regression introduced by JGit Change 1926771, caused pack protocol errors to be reported as 500 Server errors. Such situations should be reported to the user as a 200 OK containing the details of the failed operation.
Change 351759: Fix contrib/find-duplicate-usernames.sh
output when usernames contain spaces.
Issue 16449: Fix project root computation in Gitweb servlet.
Change 356715: Fixed bug with negated label for queries with external groups.
Change 359176: Fix LabelPredicate group matching for included external groups.
Change 357874: Fixed ownerin/uploaderin for internal groups that include external groups.
Change 355054: Wrap #mobileSearch in a div.
Fixes an issue on wikimedia where the search button was hidden even though the rules executed to make it show.
Issue 16433: Fix 404 page shown after login using OpenID
Change 360134: Fix “Old Patchset” being displayed on current edits.
Change 359895: Fix gr-file-list to use change-model for patchSet.
Issue 16475: Fix stream events message including comments created as draft.
Fixes a regression in v3.7 where the GUI stores the patchset-level comments first as drafts and then publishes them.
Issue 16465: Restores the ChangeNotes.Factory.createChecked with an open Repository object.
Issue 16421: Don't ship auto-value-* and auto-factory dependencies.
Dependency Updates
Update jgit to a1901305b26ed5e0116f138bc02837713d2cf5c3.
Update from stable-6.1 to stable-6.5:
Notable enhancements and fixes from 6.2.0 are:
4dd9a94e: Better feedback on SSH authentication failure
7b1c8cf14: Retry reading a file when there are concurrent writes
fed1a5493: Refresh ‘objects’ dir and retry if a loose object is not found (Fixes cases where a new loose object is not immediately visible on a NFS client if it was created on another client)
011c26ff3: Fix connection leak for smart http connections
ac127a793: Do not handle internal git errors as an HTTP error
Notable enhancements and fixes from 6.3.0 are:
Notable enhancements and fixes from 6.4.0 are:
fe9aeb02e6, 93097f0018: Receive and parse client git session-id
59029aec3: Add option to allow using JDK's SHA1 implementation
3e7281662: UploadPackServlet#doPost use try-with-resource to ensure UploadPack is closed
1e04046a6: Fix crashes on rare combination of file names (This issue has been seen during offline reindex of changes with specific merge commits)
Update sshd to 2.9.2
CVE-2022-45047: Avoid using Java deserialization to load a serialized java.security.PrivateKey
SSHD-1302: Reading again from exhausted ChannelExec#getInvertedOut() throws IOException instead of returning -1
SSHD-966: Deadlock on disconnection at the end of key-exchange
SSHD-1231: Public key authentication: wrong signature algorithm used (ed25519 key with ssh-rsa signature)
SSHD-1257: Shell is not getting closed if the command has already closed the OutputStream it is using.
SSHD-1261: Sometimes async write listener is not called
SSHD-1290: Race condition is logged in ChannelAsyncOutputStream
Update mina-core to 2.0.23
Update reviewnotes to 10db2cf772989d031c6f3558010c51fe07cf9722
Documentation fixes