1. 0Virtual Gerrit User Summit 2020 – On-line GerritForge.com 0
What’s new in Gerrit 3.2/3.3
Luca Milanesio
Gerrit Code Review Maintainer
GerritForge
2. 1Virtual Gerrit User Summit 2020 – On-line GerritForge.com 1
About GerritForge
Founded in
the UK
HQ in London with
presence in Europe and
the USA (GerritForge Inc.)
Committed to
OpenSource
and to Gerrit
Code Review
since 2009
3. 2Virtual Gerrit User Summit 2020 – On-line GerritForge.com 2
Gerrit v3.2 in numbers
Source: analytics.gerrithub.io
4. 3Virtual Gerrit User Summit 2020 – On-line GerritForge.com 3
Gerrit v3.3 in numbers
Source: analytics.gerrithub.io
5. 4Virtual Gerrit User Summit 2020 – On-line GerritForge.com 4
Gerrit v3.2/v3.3 vs. previous releases
6. 5Virtual Gerrit User Summit 2020 – On-line GerritForge.com 5
Gerrit 3.2: Java 11
Gerrit officially supported on Java 11 runtime
• Both Java 8 and Java 11 support
• gerrit.war and plugin API distributed on Java 8 bytecode
• This is the last Gerrit distributed for Java 8
Stats of the first 3 months of adoption of Gerrit v3.2
(source: gerrit-ci.gerritforge.com):
72% on Java 11 / 38% on Java 8
7. 6Virtual Gerrit User Summit 2020 – On-line GerritForge.com 6
Gerrit 3.3: Java 11
Gerrit officially distributed for Java 11
• gerrit.war and plugin API distributed on Java 11 bytecode
• Does NOT work out-of-the-box for Java 8 (needs rebuild)
• Incoming changes on stable-3.3 and master: validated for Java 8
• Gerrit plugins have to target Java 11
(Gerrit plugin API distributed on Java 8 only)
8. 7Virtual Gerrit User Summit 2020 – On-line GerritForge.com 7
Gerrit 3.2: Performance
Shawn (RIP) always said:
“performance is a feature, and a very important one”
Mergeability computation behavior
• NEVER
No mergeability flag computation
• REF_UPDATED_AND_CHANGE_REINDEX
(is:mergeable)
• API_REF_UPDATED_AND_CHANGE_REINDEX
(is:mergeable and mergeable in ChangeInfo)
FASTER
SLOWER
9. 8Virtual Gerrit User Summit 2020 – On-line GerritForge.com 8
Gerrit 3.2: Performance
New accounts cache
• External IDs + user name (cached in
ExternalIdCache)
• CachedAccountDetails (newly cached)
• Gerrit’s default settings CachedAccountDetails
(with account-id sharding)
10. 9Virtual Gerrit User Summit 2020 – On-line GerritForge.com 9
Gerrit 3.2: Performance
New external groups cache
• groups_external
Caches all the external groups available to Gerrit
• groups_external_persisted
Caches all external groups available to Gerrit at some
point in history
11. 10Virtual Gerrit User Summit 2020 – On-line GerritForge.com 10
Gerrit 3.2: InstanceId
Optional config for HA and Multi-Site setup
• ServerId <> InstanceId
• Background: why do you need it?
• Use-cases
• Troubleshooting of events across the cluster
• Avoiding double-notifications (e.g. Jira plugin)
• Avoid loops of events (e.g. HA)
Contributed by GerritForge
12. 11Virtual Gerrit User Summit 2020 – On-line GerritForge.com 11
Gerrit 3.2: zero-downtime upgrade
Allow upgrading from v3.1.6+ without downtime
• Requires HA setup with shared repositories
• Flagged as “experimental”
• Successfully test on GerritHub.io upgrade
Contributed by GerritForge
13. 12Virtual Gerrit User Summit 2020 – On-line GerritForge.com 12
Gerrit 3.2: PolyGerrit Polymer 3
Major milestone in front-end modernization
UI improvements
• cherry pick entire topics
• display names (first name or username as default)
• show the entire comment thread in reply dialog
• “Start Review” button added to change view
• in-product reminder to keep discussions respectful
• “Edit” button to the diff view
• editing the commit message as part of a change edit
14. 13Virtual Gerrit User Summit 2020 – On-line GerritForge.com 13
Gerrit 3.2: Permissions
New Revert permission
allow/deny the ability to revert a change through the Gerrit
UI.
The permission is automatically added to the
Registered Users as part of the schema upgradet
15. 14Virtual Gerrit User Summit 2020 – On-line GerritForge.com 14
Gerrit 3.2: PolyGerrit File uploads
Contributed by Wikimedia
16. 15Virtual Gerrit User Summit 2020 – On-line GerritForge.com 15
Gerrit 3.2: is:merge
new is:merge operator for allowing to find changes
that are merge commits.
NOTE: Requires a full reindex of the changes, which may take
quite a long time to compute for large-sized installations.
Contributed by SAP
17. 16Virtual Gerrit User Summit 2020 – On-line GerritForge.com 16
Gerrit 3.2: SSH commands
gerrit set-topic:
set the topic of a change (existing REST-API surfaced via SSH)
gerrit sequence show:
show the current sequences value from All-Projects.git or All-Users.git
gerrit sequence set:
set the next value for sequences in All-Projects.git or All-Users.git
18. 17Virtual Gerrit User Summit 2020 – On-line GerritForge.com 17
Gerrit 3.2: E2E tests
Gerrit source code now has /e2e-tests
• Based on GerritForge’s Gatling-Git plugin
• Framework for plugins’ E2E testing
• Real Gerrit setup with simulations of:
• Gerrit repositories and test-case setups
• REST-API interactions
• Git protocol interactions
Contributed by Ericsson
19. 18Virtual Gerrit User Summit 2020 – On-line GerritForge.com 18
Gerrit 3.2: Native Packages updates
• RPMs for RedHat & CentOS 8.1
• Debs for Debian & Ubuntu 20.04
• Docker image: Java upgraded to OpenJDK 11
• Support for AWS with aws-gerrit
Contributed by GerritForge
20. 19Virtual Gerrit User Summit 2020 – On-line GerritForge.com 19
Gerrit 3.3: Attention-set
Thanks to Ben + UX, PolyGerrit and Backend Teams !!
NOTE: It is enabled by default
21. 20Virtual Gerrit User Summit 2020 – On-line GerritForge.com 20
Gerrit 3.3: Replication improvements
Stabilization of the replication tasks storage + fixes
• Ability to push changes to replicas
• Manage exceptions and NFS quirks for replication tasks storage
• Do not wait for pending replication events on startup
• Multi-server clustering replication (still experimental)
Contributed by Qualcomm
23. 22Virtual Gerrit User Summit 2020 – On-line GerritForge.com 22
Gerrit 3.0 and 2.16: EOL
Gerrit 3.0.x is EOL according to the support policy [1]
Gerrit 2.16 is EOL with exceptions:
receives updates for NoteDb migration, see v2.16.23:
• Huge performance improvement for large repos
• new option --force-state-change-with-skip in the NoteDb
• Fix contention on single database connection
• Update noteDb status in chunks
• Use multiple threads per project for improving the performance
[1] https://www.gerritcodereview.com/support.html
24. 23Virtual Gerrit User Summit 2020 – On-line GerritForge.com 23
Q&A: excited about the future of Gerrit?
Image from: http://cypp.rutgers.edu/ru-voting/political-information/public-opinion-polls/
25. 24Virtual Gerrit User Summit 2020 – On-line GerritForge.com 24
Wants to know more?
GerritForge.com/contact