Gerrit Advanced Workflows Training
Master advanced Gerrit workflows — multi-project submissions, Prolog submit rules, plugin development, repo tool integration, NoteDb internals, and compliance patterns for regulated environments.
Push your Gerrit expertise to the limit with this 2-day advanced training covering multi-project orchestration, Prolog submit rules, plugin development with the Gerrit Java API, repo tool integration for Android-scale multi-repository workflows, NoteDb and Lucene internals, and compliance patterns for regulated industries. This training is for experienced Gerrit users ready to extend and customize the platform.
Training Details
| Duration | 2 days (16 hours) |
| Level | Advanced |
| Delivery | In-person, Live online, Hybrid |
| Certification | N/A |
Who Is This For?
- Senior engineers working on Gerrit-hosted projects with complex multi-repo dependencies
- Gerrit administrators who need to customize review logic beyond standard configuration
- Platform engineers building Gerrit plugins for organization-specific workflows
- Teams working with Android (AOSP), ChromeOS, or other repo-tool managed projects
- Compliance officers and engineers in regulated industries (financial services, healthcare, defense)
Learning Outcomes
After completing this training, participants will be able to:
- Orchestrate multi-project coordinated submissions using topics and cross-repo dependencies
- Write Prolog submit rules for complex approval logic
- Develop Gerrit plugins using the Java extension API and bazlets build system
- Integrate Gerrit with the repo tool for multi-repository development workflows
- Understand NoteDb storage format, Lucene indexing, and JGit architecture
- Design compliance and audit workflows for regulated environments
- Tune Gerrit performance for large-scale deployments
Detailed Agenda
Day 1: Multi-Project Workflows, Prolog Rules, and Plugin Development
Module 1: Multi-Project Coordinated Submissions
- Topic-based submission: grouping changes across repositories
- Cross-repository dependency resolution and atomic topic submit
- Superproject subscriptions: automatic submodule updates on submit
- Managing diamond dependencies and circular references
- Change chains vs topics: when to use each approach
- Hands-on: Set up three interdependent repositories, create a cross-repo feature using topics, and submit all changes atomically
Module 2: Prolog Submit Rules
- Prolog rule engine: how Gerrit evaluates rules/submit in refs/meta/config
- Rule syntax: submit_rule/1, submit_filter/1 predicates
- Built-in Prolog predicates: gerrit:commit_author/1, gerrit:commit_message_matches/1
- Writing rules: require review from specific groups, enforce file-owner approval
- Combining Prolog rules with modern submit requirements
- Debugging Prolog rules with the test-submit-rule REST endpoint
- Hands-on: Write Prolog rules that require security team approval for changes touching crypto/ directories and enforce two approvals from different teams
Module 3: Plugin Development Basics
- Gerrit plugin architecture: ClassLoader isolation, Guice injection, extension points
- Development environment setup: bazlets (Bazel), Buck legacy, Maven fallback
- Extension points: SSH commands, REST endpoints, UI extensions, event listeners
- The @Listen, @Export, and @PluginName annotations
- Building and packaging plugins as .jar files
- Plugin lifecycle: init, start, stop, reload
- Hands-on: Build a plugin skeleton that adds a custom REST endpoint returning change statistics and an SSH command for bulk label operations
Module 4: Repo Tool Integration
- The repo tool: managing hundreds of Git repositories with a manifest
- Manifest format: project, remote, default revision, groups
- repo init, repo sync, repo upload — the developer workflow
- How repo upload maps to Gerrit refs/for/ pushes
- Topic assignment from repo upload for coordinated reviews
- Gerrit superproject and manifest-based build integration
- Hands-on: Set up a multi-repository project with a repo manifest, make changes across three repos, upload with repo, and review the coordinated changes in Gerrit
Day 2: Architecture Internals, Compliance, and Performance
Module 5: Gerrit Architecture and NoteDb Internals
- NoteDb: storing change metadata as Git notes in All-Users and project repos
- NoteDb data model: change refs (refs/changes/), meta refs, star refs
- Lucene index: change index, account index, group index, project index
- Index schema versions and online reindexing with zero downtime
- JGit internals: ObjectReader, RevWalk, DiffFormatter, and how Gerrit uses them
- Hands-on: Inspect NoteDb refs with git log, examine Lucene index files, and trigger a manual reindex of specific changes
Module 6: Compliance and Audit Patterns
- Audit trail: leveraging NoteDb as an immutable Git-based audit log
- Signed pushes and GPG verification for non-repudiation
- Mandatory review policies: preventing direct pushes, enforcing review before submit
- Separation of duties: distinct author, reviewer, and submitter requirements
- Change retention policies and archival strategies for regulatory compliance
- Integration with external compliance tools (audit log exporters, SIEM systems)
- Hands-on: Configure a compliance-ready project with enforced review, signed pushes, separation of duties, and export the audit trail for a change lifecycle
Module 7: Performance Tuning and Scalability
- JVM tuning: heap sizing, GC algorithm selection (G1GC, ZGC), GC logging
- Pack cache and window/memory configuration for large repositories
- SSH and HTTP thread pool sizing based on concurrent user load
- Query performance: index optimization, secondary index tuning
- Git protocol v2 and bitmap indexes for faster fetches
- Monitoring bottlenecks: slow queries, lock contention, I/O wait
- Hands-on: Profile a Gerrit instance under simulated load, identify bottlenecks, apply JVM and configuration tuning, and measure improvement
Module 8: Capstone — Enterprise Gerrit Deployment
- Designing a Gerrit deployment for a 500-developer organization
- Multi-site topology with geographic distribution
- Plugin stack selection for enterprise needs (webhooks, reviewers, checks, code-owners)
- CI/CD integration architecture with Zuul or Jenkins at scale
- Operational runbook: upgrades, rollbacks, incident response
- Hands-on: Capstone — design and present an enterprise Gerrit architecture including multi-site replication, custom Prolog rules for compliance, a plugin for automated reviewer assignment, and a performance-tuned configuration for the target workload
Prerequisites
- Completion of Gerrit Fundamentals and Gerrit Administration Training (or equivalent production experience)
- Strong Git knowledge including refs, objects, packfiles, and notes
- Java development experience for plugin development modules
- Familiarity with Bazel build system helpful but not required
- Understanding of CI/CD pipelines and automation patterns
Delivery Formats
| Format | Description |
|---|---|
| In-Person | On-site at your company's location, hands-on with direct interaction |
| Live Online | Interactive virtual sessions with screen sharing and real-time labs |
| Hybrid | Combination of on-site and remote sessions, flexible scheduling |
All formats include hands-on labs, course materials, and post-training support.
Prerequisites
- Gerrit Fundamentals Training
- Gerrit Administration Training or equivalent experience
- Strong Git and Java knowledge
Ready to get started?
Request a training quote for your team — in-person, live-online, or hybrid.