Consider robot comments as mutable ref for validation

Change has two ref-names for mutable data:
- /meta, which contains all meta-data associated with the change
  and comments performed by humans
- /robot-comments which contains all comments and associated
  meta-data performed by robots

The /robot-comments ref was initially missed, causing issues
with replication consistency and opening the risk of causing
split brains on robot-generated comments.

Bug: Issue 288965461
Change-Id: I3adda3cdd55257100d69fe10e18dc3f828646a41
2 files changed
tree: 414e563537b2b8f3be7f1bf532b98f9b57655328
  1. src/
  2. .gitignore
  3. bindings.md
  4. BUILD
  5. config.md
  6. Jenkinsfile
  7. LICENSE
  8. metrics.md
  9. pom.xml
  10. README.md
README.md

Gerrit interface to a global-refdb

Global ref-database interface for use with Gerrit Code Review.

Enables the de-coupling between Gerrit, its libModules and the different implementations of a globally shared ref-database.

Design

The design for a global ref-db interface can be found as part of the multi-site design documentation, where it first originated and was approved by the community.

Bindings

In order to consume this library, some Guice bindings need to be registered appropriately. More information in the relevant documentation.

Metrics

Global ref-database expose metrics to measure the global ref-database operation latency. List of the available metrics can be found here.

How to build

This libModule is built like a Gerrit in-tree plugin, using Bazelisk.

Build in Gerrit tree

Create a symbolic link of the repository source to the Gerrit source tree /plugins/global-refdb directory.

Example:

git clone https://gerrit.googlesource.com/gerrit git clone https://gerrit.googlesource.com/modules/global-refdb cd gerrit/plugins ln -s ../../global-refdb . From the Gerrit source tree issue the command bazelsk build plugins/global-refdb

Example:

bazelisk build plugins/global-refdb

The libModule jar file is created under basel-bin/plugins/global-refdb/global-refdb.jar

To execute the tests run bazelisk test plugins/global-refdb/... from the Gerrit source tree.

Example:

bazelisk test plugins/global-refdb/...

How to import into Eclipse as a project

Add global-refdb in the CUSTOM_PLUGINS section of the tools/bzl/plugins.bzl.

Example:

CUSTOM_PLUGINS = [
    "global-refdb",
]

Run tools/eclipse/project.py for generating or updating the Eclipse project.