Merge branch 'stable-3.3'
* stable-3.3:
Fix injection of the ignoredRef for global-refdb validation
Ignore multi-site version refs from global-refdb checks
Revert "Use project versioning ref name from global-refdb library"
Use plugins from stable-3.3 for local setup
Use events-broker version 3.3.1
Use project versioning ref name from global-refdb library
Change-Id: I8f669545755d4c74e4dd17cf4e5086e3563ccd8e
diff --git a/external_plugin_deps.bzl b/external_plugin_deps.bzl
index 19b06b1..82cd5e8 100644
--- a/external_plugin_deps.bzl
+++ b/external_plugin_deps.bzl
@@ -3,12 +3,12 @@
def external_plugin_deps():
maven_jar(
name = "global-refdb",
- artifact = "com.gerritforge:global-refdb:3.3.0-rc1",
- sha1 = "1b005b31c27a30ff10de97f903fa2834051bcadf",
+ artifact = "com.gerritforge:global-refdb:3.3.1",
+ sha1 = "5df9dddad2fc67c922406f41549186b210cd957e",
)
maven_jar(
name = "events-broker",
- artifact = "com.gerritforge:events-broker:3.2.0-rc4",
- sha1 = "53e3f862ac2c2196dba716756ac9586f4b63af47",
+ artifact = "com.gerritforge:events-broker:3.3.1",
+ sha1 = "90775e671946b20e52be3a11277d1ed33973d66e",
)
diff --git a/setup_local_env/setup.sh b/setup_local_env/setup.sh
index d4718ba..f25281c 100755
--- a/setup_local_env/setup.sh
+++ b/setup_local_env/setup.sh
@@ -16,7 +16,7 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-GERRIT_BRANCH=stable-3.2
+GERRIT_BRANCH=stable-3.3
GERRIT_CI=https://gerrit-ci.gerritforge.com/view/Plugins-$GERRIT_BRANCH/job
LAST_BUILD=lastSuccessfulBuild/artifact/bazel-bin/plugins
EVENTS_BROKER_VER=`grep 'com.gerritforge:events-broker' $(dirname $0)/../external_plugin_deps.bzl | cut -d '"' -f 2 | cut -d ':' -f 3`
diff --git a/src/main/java/com/googlesource/gerrit/plugins/multisite/Configuration.java b/src/main/java/com/googlesource/gerrit/plugins/multisite/Configuration.java
index d6fa749..81e1c12 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/multisite/Configuration.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/multisite/Configuration.java
@@ -82,7 +82,9 @@
projects = memoize(() -> new Projects(lazyMultiSiteCfg));
sharedRefDb =
memoize(
- () -> new SharedRefDbConfiguration(enableSharedRefDbByDefault(lazyMultiSiteCfg.get())));
+ () ->
+ new SharedRefDbConfiguration(
+ enableSharedRefDbByDefault(lazyMultiSiteCfg.get()), PLUGIN_NAME));
broker = memoize(() -> new Broker(lazyMultiSiteCfg));
}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/multisite/validation/ValidationModule.java b/src/main/java/com/googlesource/gerrit/plugins/multisite/validation/ValidationModule.java
index 1d9d2c4..fe224ae 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/multisite/validation/ValidationModule.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/multisite/validation/ValidationModule.java
@@ -29,10 +29,13 @@
import com.gerritforge.gerrit.globalrefdb.validation.dfsrefdb.CustomSharedRefEnforcementByProject;
import com.gerritforge.gerrit.globalrefdb.validation.dfsrefdb.DefaultSharedRefEnforcement;
import com.gerritforge.gerrit.globalrefdb.validation.dfsrefdb.SharedRefEnforcement;
+import com.google.common.collect.ImmutableSet;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.extensions.registration.DynamicItem;
import com.google.gerrit.server.git.GitRepositoryManager;
import com.google.inject.Scopes;
+import com.google.inject.TypeLiteral;
+import com.google.inject.name.Names;
import com.googlesource.gerrit.plugins.multisite.Configuration;
import com.googlesource.gerrit.plugins.multisite.Log4jProjectVersionLogger;
import com.googlesource.gerrit.plugins.multisite.ProjectVersionLogger;
@@ -63,6 +66,12 @@
factory(BatchRefUpdateValidator.Factory.class);
bind(SharedRefDbConfiguration.class).toInstance(cfg.getSharedRefDbConfiguration());
+ bind(new TypeLiteral<ImmutableSet<String>>() {})
+ .annotatedWith(Names.named(SharedRefDbGitRepositoryManager.IGNORED_REFS))
+ .toInstance(
+ ImmutableSet.of(
+ ProjectVersionRefUpdate.MULTI_SITE_VERSIONING_REF,
+ ProjectVersionRefUpdate.MULTI_SITE_VERSIONING_VALUE_REF));
bind(GitRepositoryManager.class).to(SharedRefDbGitRepositoryManager.class);
DynamicItem.bind(binder(), ReplicationPushFilter.class)
.to(MultisiteReplicationPushFilter.class);