Fix init step for pull-replication. Add `accessDatabase` capability to the `Pull-replication Internal User` in the `postRun` step instead of the `run` step. In this way we can ensure that the project `All-Projects.git` will be already created. Bug: Issue 16594 Change-Id: I639421aadfd41300725309283f7bd3d149cc3021
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/InitPlugin.java b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/InitPlugin.java index 1702948..5539451 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/InitPlugin.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/InitPlugin.java
@@ -52,7 +52,10 @@ } @Override - public void run() throws Exception { + public void run() {} + + @Override + public void postRun() throws Exception { ui.header("%s initialization", pluginName); if (!bearerTokenProvider.get().isPresent()) {