From d936a7a0e0f49da3d0432a4f03e6a008c6e23c54 Mon Sep 17 00:00:00 2001 From: Tao Zhou Date: Tue, 3 Dec 2019 15:16:29 +0100 Subject: [PATCH 1/8] Add event interface to Gerrit This is to solve problems like communicating among Gerrit components, plugins and Gerrit, and plugins themselves. Original discussion and one classic problem to solve: https://gerrit-review.googlesource.com/c/gerrit/+/242732 ``` // pluginA Gerrit.install(plugin => { // do something Gerrit.emit("event-name", {plugin: plugin}); }); // Gerrit Gerrit.on("event-name", event => { // event.plugin should be pluginA }); ``` Change-Id: I8b9703f5fafd5fc00054d6d4bce4628d4aba6624 --- .../gr-event-interface/gr-event-interface.js | 142 +++++++++++++++++ .../gr-event-interface_test.html | 146 ++++++++++++++++++ .../gr-js-api-interface.html | 1 + .../gr-js-api-interface/gr-public-js-api.js | 37 +++++ polygerrit-ui/app/test/index.html | 1 + 5 files changed, 327 insertions(+) create mode 100644 polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface.js create mode 100644 polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface_test.html diff --git a/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface.js b/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface.js new file mode 100644 index 0000000000..d024bb2df3 --- /dev/null +++ b/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface.js @@ -0,0 +1,142 @@ +/** + * @license + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(window) { + 'use strict'; + + // Avoid duplicate registeration + if (window.EventEmitter) return; + + /** + * An lite implementation of + * https://nodejs.org/api/events.html#events_class_eventemitter. + * + * This is unrelated to the native DOM events, you should use it when you want + * to enable EventEmitter interface on any class. + * + * @example + * + * class YourClass extends EventEmitter { + * // now all instance of YourClass will have this EventEmitter interface + * } + * + */ + class EventEmitter { + constructor() { + /** + * Shared events map from name to the listeners. + * @type {!Object>} + */ + this._listenersMap = new Map(); + } + + /** + * Register an event listener to an event. + * + * @param {string} eventName + * @param {eventCallback} cb + * @returns {Function} Unsubscribe method + */ + addListener(eventName, cb) { + if (!eventName || !cb) { + console.warn('A valid eventname and callback is required!'); + return; + } + + const listeners = this._listenersMap.get(eventName) || []; + listeners.push(cb); + this._listenersMap.set(eventName, listeners); + + return () => { + this.off(eventName, cb); + }; + } + + // Alias for addListener. + on(eventName, cb) { + return this.addListener(eventName, cb); + } + + // Attach event handler only once. Automatically removed. + once(eventName, cb) { + const onceWrapper = (...args) => { + cb(...args); + this.off(eventName, onceWrapper); + }; + return this.on(eventName, onceWrapper); + } + + /** + * De-register an event listener to an event. + * + * @param {string} eventName + * @param {eventCallback} cb + */ + removeListener(eventName, cb) { + let listeners = this._listenersMap.get(eventName) || []; + listeners = listeners.filter(listener => listener !== cb); + this._listenersMap.set(eventName, listeners); + } + + // Alias to removeListener + off(eventName, cb) { + this.removeListener(eventName, cb); + } + + /** + * Synchronously calls each of the listeners registered for + * the event named eventName, in the order they were registered, + * passing the supplied detail to each. + * + * Returns true if the event had listeners, false otherwise. + * + * @param {string} eventName + * @param {*} detail + */ + emit(eventName, detail) { + const listeners = this._listenersMap.get(eventName) || []; + for (const listener of listeners) { + try { + listener(detail); + } catch (e) { + console.error(e); + } + } + return listeners.length !== 0; + } + + // Alias to emit. + dispatch(eventName, detail) { + return this.emit(eventName, detail); + } + + /** + * Remove listeners for a specific event or all. + * + * @param {string} eventName if not provided, will remove all + */ + removeAllListeners(eventName) { + if (eventName) { + this._listenersMap.set(eventName, []); + } else { + this._listenersMap = new Map(); + } + } + } + + window.EventEmitter = EventEmitter; +})(window); \ No newline at end of file diff --git a/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface_test.html b/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface_test.html new file mode 100644 index 0000000000..137ed25042 --- /dev/null +++ b/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface_test.html @@ -0,0 +1,146 @@ + + + + +gr-api-interface + + + + + + + + + + + + + \ No newline at end of file diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.html b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.html index d8a662ec37..d95fd0afd6 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.html +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.html @@ -30,6 +30,7 @@ limitations under the License. + diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.js index 36a428d966..1311105572 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.js @@ -662,6 +662,43 @@ } }; + // TODO(taoalpha): List all internal supported event names. + // Also convert this to inherited class once we move Gerrit to class. + Gerrit._eventEmitter = new EventEmitter(); + ['addListener', + 'dispatch', + 'emit', + 'off', + 'on', + 'once', + 'removeAllListeners', + 'removeListener', + ].forEach(method => { + /** + * Enabling EventEmitter interface on Gerrit. + * + * This will enable to signal across different parts of js code without relying on DOM, + * including core to core, plugin to plugin and also core to plugin. + * + * @example + * + * // Emit this event from pluginA + * Gerrit.install(pluginA => { + * fetch("some-api").then(() => { + * Gerrit.on("your-special-event", {plugin: pluginA}); + * }); + * }); + * + * // Listen on your-special-event from pluignB + * Gerrit.install(pluginB => { + * Gerrit.on("your-special-event", ({plugin}) => { + * // do something, plugin is pluginA + * }); + * }); + */ + Gerrit[method] = Gerrit._eventEmitter[method].bind(Gerrit._eventEmitter); + }); + window.Gerrit = Gerrit; // Preloaded plugins should be installed after Gerrit.install() is set, diff --git a/polygerrit-ui/app/test/index.html b/polygerrit-ui/app/test/index.html index 5784eadec7..75ba7054d5 100644 --- a/polygerrit-ui/app/test/index.html +++ b/polygerrit-ui/app/test/index.html @@ -149,6 +149,7 @@ limitations under the License. 'settings/gr-settings-view/gr-settings-view_test.html', 'settings/gr-ssh-editor/gr-ssh-editor_test.html', 'settings/gr-watched-projects-editor/gr-watched-projects-editor_test.html', + 'shared/gr-event-interface/gr-event-interface_test.html', 'shared/gr-account-label/gr-account-label_test.html', 'shared/gr-account-link/gr-account-link_test.html', 'shared/gr-alert/gr-alert_test.html', From d8182babb4579d1eb1d55996fd4391beacac0bda Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Mon, 9 Dec 2019 14:50:23 +0100 Subject: [PATCH 2/8] Rename "master" to "primary" in documentation and comments Per https://en.wikipedia.org/wiki/Master/slave_(technology)#Terminology_concerns the use of "master" and "slave" is considered offsensive in some circles. This is a followup for https://gerrit-review.googlesource.com/c/gerrit/+/238661 to also rename "master" to "primary" and "multi-master" to "cluster setup with multiple primary nodes". Also fix a few remaining occurrences of "slave" to "replica". Change-Id: I8cd73220e2428d78dcd8205fbd826b4ebdcb2372 --- Documentation/backup.txt | 18 ++++++++++-------- Documentation/config-accounts.txt | 8 ++++---- Documentation/config-gerrit.txt | 8 +++++--- Documentation/config-groups.txt | 8 ++++---- Documentation/config-plugins.txt | 4 ++-- Documentation/dev-plugins.txt | 3 ++- Documentation/pgm-daemon.txt | 4 ++-- contrib/hooks/post-receive-move-tmp-refs | 18 +++++++++--------- .../google/gerrit/server/ExceptionHook.java | 10 +++++----- .../server/change/AccountPatchReviewStore.java | 3 ++- .../google/gerrit/server/submit/MergeOp.java | 6 +++--- java/com/google/gerrit/sshd/SshDaemon.java | 7 +++---- .../server/project/ProjectWatchIT.java | 12 ++++++------ 13 files changed, 57 insertions(+), 52 deletions(-) diff --git a/Documentation/backup.txt b/Documentation/backup.txt index cd247af828..7220c740f0 100644 --- a/Documentation/backup.txt +++ b/Documentation/backup.txt @@ -139,11 +139,12 @@ Use a file system supporting snapshots to keep the period where the gerrit server is read-only or down as short as possible. [#cons-backup-read-only] -=== Turn master read-only for backup +=== Turn primary server read-only for backup -Make the server read-only before taking the backup. This means read-access -is still available during backup, because only write operations have to be -stopped to ensure consistency. This can be implemented using the +Make the primary server handling write operations read-only before taking the +backup. This means read-access is still available from replica servers during +backup, because only write operations have to be stopped to ensure consistency. +This can be implemented using the link:https://gerrit.googlesource.com/plugins/readonly/[_readonly_] plugin. [#cons-backup-replicate] @@ -180,11 +181,12 @@ If you are using Gerrit replica to offload read traffic you can use one of these replica for creating backups. [#cons-backup-offline] -=== Take master offline for backup +=== Take primary server offline for backup -Shutdown the server before taking a backup. This is simple but means downtime -for the users. Also crons and currently running cron jobs (e.g. repacking -repositories) which affect the repositories may need to be shut down. +Shut down the primary server handling write operations before taking a backup. +This is simple but means downtime for the users. Also crons and currently +running cron jobs (e.g. repacking repositories) which affect the repositories +may need to be shut down. [#backup-methods] == Backup methods diff --git a/Documentation/config-accounts.txt b/Documentation/config-accounts.txt index 45aa42a432..d1fb690b19 100644 --- a/Documentation/config-accounts.txt +++ b/Documentation/config-accounts.txt @@ -386,10 +386,10 @@ stored in a local H2 database, but there is an extension point that allows to plug in alternate implementations for storing the reviewed flags. To replace the storage for reviewed flags a plugin needs to implement the link:dev-plugins.html#account-patch-review-store[ -AccountPatchReviewStore] interface. E.g. to support a multi-master -setup where reviewed flags should be replicated between the master -nodes one could implement a store for the reviewed flags that is -based on MySQL with replication. +AccountPatchReviewStore] interface. E.g. to support a cluster setup with +multiple primary servers handling write operations where reviewed flags should +be replicated between the primary nodes one could implement a store for the +reviewed flags that is based on MySQL with replication. [[account-sequence]] == Account Sequence diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt index 6dd01fe7b8..cf255f3cf4 100644 --- a/Documentation/config-gerrit.txt +++ b/Documentation/config-gerrit.txt @@ -826,7 +826,8 @@ changes for up to 1024 projects can be held in the cache. + Default value is 0 (disabled). It is disabled by default due to the fact that change updates are not communicated between Gerrit servers. Hence -this cache should be disabled in an multi-master/multi-replica setup. +this cache should be disabled in a cluster setup using multiple primary +or multiple replica nodes. + The cache should be flushed whenever the database changes table is modified outside of Gerrit. @@ -1569,7 +1570,8 @@ options. + Used on Gerrit replica installations. If set to true the Gerrit JVM is called with the '--replica' switch, enabling replica mode. If no value is -set (or any other value), Gerrit defaults to master mode. +set (or any other value), Gerrit defaults to primary mode enabling write +operations. [[container.slave]]container.slave:: + @@ -4365,7 +4367,7 @@ SSH-compression since git does not compress the ref announcement during handshake. + Compression can be especially useful when Gerrit replicas are being used -for the larger clones and fetches and the master server mostly takes +for the larger clones and fetches and the primary server mostly takes small receive-packs. + By default, `false`. diff --git a/Documentation/config-groups.txt b/Documentation/config-groups.txt index 327cab6733..afabbfce10 100644 --- a/Documentation/config-groups.txt +++ b/Documentation/config-groups.txt @@ -103,7 +103,7 @@ Group] reindex the affected groups manually. == Replication -In a replicated setting (eg. backups and or master/replica -configurations), all refs in the `All-Users` project must be copied -onto all replicas, including `refs/groups/*`, `refs/meta/group-names` -and `refs/sequences/groups`. +In a replicated setting (eg. backups and or primary/replica configurations), all +refs in the `All-Users` project on primary nodes must be copied onto all +replicas, including `refs/groups/*`, `refs/meta/group-names` and +`refs/sequences/groups`. diff --git a/Documentation/config-plugins.txt b/Documentation/config-plugins.txt index edeec5426c..464611de8e 100644 --- a/Documentation/config-plugins.txt +++ b/Documentation/config-plugins.txt @@ -797,8 +797,8 @@ Configuration] This plugin replaces the built-in Gerrit H2 based websession cache with a flatfile based implementation. This implementation is shareable -among multiple Gerrit servers, making it useful for multi-master -Gerrit installations. +among multiple Gerrit servers, making it useful for cluster +Gerrit installations having multiple primary Gerrit nodes. link:https://gerrit-review.googlesource.com/admin/repos/plugins/websession-flatfile[ Project] | diff --git a/Documentation/dev-plugins.txt b/Documentation/dev-plugins.txt index a2fcd47599..11e0666e33 100644 --- a/Documentation/dev-plugins.txt +++ b/Documentation/dev-plugins.txt @@ -2306,7 +2306,8 @@ flags is growing without bound. The store must be able handle this data volume efficiently. Gerrit implements this extension point, but plugins may bind another -implementation, e.g. one that supports multi-master. +implementation, e.g. one that supports cluster setup with multiple +primary Gerrit nodes handling write operations. ---- DynamicItem.bind(binder(), AccountPatchReviewStore.class) diff --git a/Documentation/pgm-daemon.txt b/Documentation/pgm-daemon.txt index 210b1cbd8c..7345d069d2 100644 --- a/Documentation/pgm-daemon.txt +++ b/Documentation/pgm-daemon.txt @@ -81,7 +81,7 @@ external log cleaning service to clean up the prior logs. == KNOWN ISSUES Replica daemon caches can quickly become out of date when modifications -are made on the master. The following configuration is suggested in +are made on the primary node. The following configuration is suggested in a replica to reduce the maxAge for each cache entry, so that changes are recognized in a reasonable period of time: @@ -106,7 +106,7 @@ and if LDAP support was enabled, also include: maxAge = 5 min ---- -Automatic cache coherency between master and replica systems is +Automatic cache coherency between primary and replica systems is planned to be implemented in a future version. GERRIT diff --git a/contrib/hooks/post-receive-move-tmp-refs b/contrib/hooks/post-receive-move-tmp-refs index c99a3e5344..fa0684f5df 100755 --- a/contrib/hooks/post-receive-move-tmp-refs +++ b/contrib/hooks/post-receive-move-tmp-refs @@ -15,10 +15,10 @@ # limitations under the License. # -------------------------------------------------------- # Install this hook script as post-receive hook in replicated repositories -# hosted by a gerrit slave which are updated by push replication from the -# corresponding gerrit master. +# hosted by a gerrit replica which are updated by push replication from the +# corresponding gerrit primary node. # -# In the gerrit master configure the replication plugin to push changes from +# In the gerrit primary node configure the replication plugin to push changes from # refs/changes/ to refs/tmp/changes/ # remote.NAME.push = +refs/changes/*:refs/tmp/changes/* # remote.NAME.push = +refs/heads/*:refs/heads/* @@ -26,26 +26,26 @@ # And if it's a Gerrit mirror: # remote.NAME.push = +refs/meta/*:refs/meta/* # -# In the replicated repository in the gerrit slave configure +# In the replicated repository in the gerrit replica configure # receive.hideRefs = refs/changes/ # in order to not advertise the big number of refs in this namespace when -# the gerrit master's replication plugin is pushing a change +# the gerrit primary's replication plugin is pushing a change # # Whenever a ref under refs/tmp/changes/ is arriving this hook will move it # to refs/changes/. This helps to avoid the large overhead of advertising all -# refs/changes/ refs to the gerrit master when it replicates changes to the -# slave.. +# refs/changes/ refs to the gerrit primary when it replicates changes to the +# replica. # # Make this script executable then link to it in the repository you would like # to use it in. # cd /path/to/your/repository.git # ln -sf /post-receive-move-tmp-refs hooks/post-receive # -# If you want to use this by default for repositories on the Gerrit slave you +# If you want to use this by default for repositories on the Gerrit replica you # can set up a git template directory $TEMPLATE_DIR/hooks/post-receive and # configure init.templateDir in the ~/.gitconfig of the user that receives the # replication on the mirror host. That way when a new repository is created on -# the master and hence on the mirror (if configured that way) it will +# the primary and hence on the mirror (if configured that way) it will # automatically have the "tmp-refs" commit hook installed. # See https://git-scm.com/docs/git-init#_template_directory for details. diff --git a/java/com/google/gerrit/server/ExceptionHook.java b/java/com/google/gerrit/server/ExceptionHook.java index ea76330244..a0d98d2866 100644 --- a/java/com/google/gerrit/server/ExceptionHook.java +++ b/java/com/google/gerrit/server/ExceptionHook.java @@ -19,11 +19,11 @@ import com.google.gerrit.extensions.annotations.ExtensionPoint; /** * Allows implementors to control how certain exceptions should be handled. * - *

This interface is intended to be implemented for multi-master setups to control the behavior - * for handling exceptions that are thrown by a lower layer that handles the consensus and - * synchronization between different server nodes. E.g. if an operation fails because consensus for - * a Git update could not be achieved (e.g. due to slow responding server nodes) this interface can - * be used to retry the request instead of failing it immediately. + *

This interface is intended to be implemented for cluster setups with multiple primary nodes to + * control the behavior for handling exceptions that are thrown by a lower layer that handles the + * consensus and synchronization between different server nodes. E.g. if an operation fails because + * consensus for a Git update could not be achieved (e.g. due to slow responding server nodes) this + * interface can be used to retry the request instead of failing it immediately. */ @ExtensionPoint public interface ExceptionHook { diff --git a/java/com/google/gerrit/server/change/AccountPatchReviewStore.java b/java/com/google/gerrit/server/change/AccountPatchReviewStore.java index d6bb164b64..8da2a90660 100644 --- a/java/com/google/gerrit/server/change/AccountPatchReviewStore.java +++ b/java/com/google/gerrit/server/change/AccountPatchReviewStore.java @@ -30,7 +30,8 @@ import java.util.Optional; * number of reviewed flags is growing without bound. The store must be able handle this data volume * efficiently. * - *

For a multi-master setup the store must replicate the data between the masters. + *

For a cluster setups with multiple primary nodes the store must replicate the data between the + * primary servers. */ public interface AccountPatchReviewStore { diff --git a/java/com/google/gerrit/server/submit/MergeOp.java b/java/com/google/gerrit/server/submit/MergeOp.java index a06027af0f..adb75a402e 100644 --- a/java/com/google/gerrit/server/submit/MergeOp.java +++ b/java/com/google/gerrit/server/submit/MergeOp.java @@ -828,9 +828,9 @@ public class MergeOp implements AutoCloseable { } // The patch set ref is not found but we want to merge the change. We can't safely do that - // if the patch set ref is missing. In a multi-master setup this can indicate a replication - // lag (e.g. the change meta data was already replicated, but the replication of the patch - // set ref is still pending). + // if the patch set ref is missing. In a cluster setups with multiple primary nodes this can + // indicate a replication lag (e.g. the change meta data was already replicated, but the + // replication of the patch set ref is still pending). commitStatus.logProblem( changeId, "Patch set ref " diff --git a/java/com/google/gerrit/sshd/SshDaemon.java b/java/com/google/gerrit/sshd/SshDaemon.java index 7512b3eabe..da090871bf 100644 --- a/java/com/google/gerrit/sshd/SshDaemon.java +++ b/java/com/google/gerrit/sshd/SshDaemon.java @@ -638,10 +638,9 @@ public class SshDaemon extends SshServer implements SshInfo, LifecycleListener { // However, if there are CPU in abundance and the server is reachable through // slow networks, gits with huge amount of refs can benefit from SSH-compression // since git does not compress the ref announcement during the handshake. - // - // Compression can be especially useful when Gerrit slaves are being used - // for the larger clones and fetches and the master server mostly takes small - // receive-packs. + // Compression can be especially useful when Gerrit replica are being used + // for the larger clones and fetches and the primary server handling write + // operations mostly takes small receive-packs. if (enableCompression) { compressionFactories.add(BuiltinCompressions.zlib); diff --git a/javatests/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java b/javatests/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java index 464f3ffe84..29574c4e84 100644 --- a/javatests/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java +++ b/javatests/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java @@ -306,7 +306,7 @@ public class ProjectWatchIT extends AbstractDaemonTest { requestScopeOperations.setApiUser(user.id()); // watch keyword in project as user - watch(watchedProject, "multimaster"); + watch(watchedProject, "multiprimary"); // push a change with keyword -> should trigger email notification requestScopeOperations.setApiUser(admin.id()); @@ -314,7 +314,7 @@ public class ProjectWatchIT extends AbstractDaemonTest { cloneProject(Project.nameKey(watchedProject), admin); PushOneCommit.Result r = pushFactory - .create(admin.newIdent(), watchedRepo, "Document multimaster setup", "a.txt", "a1") + .create(admin.newIdent(), watchedRepo, "Document multiprimary setup", "a.txt", "a1") .to("refs/for/master"); r.assertOkStatus(); @@ -323,7 +323,7 @@ public class ProjectWatchIT extends AbstractDaemonTest { assertThat(messages).hasSize(1); Message m = messages.get(0); assertThat(m.rcpt()).containsExactly(user.getEmailAddress()); - assertThat(m.body()).contains("Change subject: Document multimaster setup\n"); + assertThat(m.body()).contains("Change subject: Document multiprimary setup\n"); assertThat(m.body()).contains("Gerrit-PatchSet: 1\n"); sender.clear(); @@ -418,7 +418,7 @@ public class ProjectWatchIT extends AbstractDaemonTest { requestScopeOperations.setApiUser(user.id()); // watch keyword in project as user - watch(allProjects.get(), "multimaster"); + watch(allProjects.get(), "multiprimary"); // push a change with keyword to any project -> should trigger email // notification @@ -426,7 +426,7 @@ public class ProjectWatchIT extends AbstractDaemonTest { TestRepository anyRepo = cloneProject(Project.nameKey(anyProject), admin); PushOneCommit.Result r = pushFactory - .create(admin.newIdent(), anyRepo, "Document multimaster setup", "a.txt", "a1") + .create(admin.newIdent(), anyRepo, "Document multiprimary setup", "a.txt", "a1") .to("refs/for/master"); r.assertOkStatus(); @@ -435,7 +435,7 @@ public class ProjectWatchIT extends AbstractDaemonTest { assertThat(messages).hasSize(1); Message m = messages.get(0); assertThat(m.rcpt()).containsExactly(user.getEmailAddress()); - assertThat(m.body()).contains("Change subject: Document multimaster setup\n"); + assertThat(m.body()).contains("Change subject: Document multiprimary setup\n"); assertThat(m.body()).contains("Gerrit-PatchSet: 1\n"); sender.clear(); From d17c01d0af0e49a48d40b0ea190aa24c50005e9e Mon Sep 17 00:00:00 2001 From: Luca Milanesio Date: Tue, 10 Dec 2019 21:45:12 +0000 Subject: [PATCH 3/8] Set version to 2.16.14 Change-Id: I9fef21fa14d2e273657dab894529e07e5bf03e92 --- tools/maven/gerrit-acceptance-framework_pom.xml | 2 +- tools/maven/gerrit-extension-api_pom.xml | 2 +- tools/maven/gerrit-plugin-api_pom.xml | 2 +- tools/maven/gerrit-plugin-gwtui_pom.xml | 2 +- tools/maven/gerrit-war_pom.xml | 2 +- version.bzl | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/maven/gerrit-acceptance-framework_pom.xml b/tools/maven/gerrit-acceptance-framework_pom.xml index 0fac5bfb05..c85e9e3e67 100644 --- a/tools/maven/gerrit-acceptance-framework_pom.xml +++ b/tools/maven/gerrit-acceptance-framework_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-acceptance-framework - 2.16.14-SNAPSHOT + 2.16.14 jar Gerrit Code Review - Acceptance Test Framework Framework for Gerrit's acceptance tests diff --git a/tools/maven/gerrit-extension-api_pom.xml b/tools/maven/gerrit-extension-api_pom.xml index bae58c0a6c..f6a964877b 100644 --- a/tools/maven/gerrit-extension-api_pom.xml +++ b/tools/maven/gerrit-extension-api_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-extension-api - 2.16.14-SNAPSHOT + 2.16.14 jar Gerrit Code Review - Extension API API for Gerrit Extensions diff --git a/tools/maven/gerrit-plugin-api_pom.xml b/tools/maven/gerrit-plugin-api_pom.xml index 20868c1584..19a6504659 100644 --- a/tools/maven/gerrit-plugin-api_pom.xml +++ b/tools/maven/gerrit-plugin-api_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-plugin-api - 2.16.14-SNAPSHOT + 2.16.14 jar Gerrit Code Review - Plugin API API for Gerrit Plugins diff --git a/tools/maven/gerrit-plugin-gwtui_pom.xml b/tools/maven/gerrit-plugin-gwtui_pom.xml index f8f8366c64..1c3dfd78de 100644 --- a/tools/maven/gerrit-plugin-gwtui_pom.xml +++ b/tools/maven/gerrit-plugin-gwtui_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-plugin-gwtui - 2.16.14-SNAPSHOT + 2.16.14 jar Gerrit Code Review - Plugin GWT UI Common Classes for Gerrit GWT UI Plugins diff --git a/tools/maven/gerrit-war_pom.xml b/tools/maven/gerrit-war_pom.xml index 388f314354..d728604069 100644 --- a/tools/maven/gerrit-war_pom.xml +++ b/tools/maven/gerrit-war_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-war - 2.16.14-SNAPSHOT + 2.16.14 war Gerrit Code Review - WAR Gerrit WAR diff --git a/version.bzl b/version.bzl index 6d0f2e0afa..3382fb3220 100644 --- a/version.bzl +++ b/version.bzl @@ -2,4 +2,4 @@ # Used by :api_install and :api_deploy targets # when talking to the destination repository. # -GERRIT_VERSION = "2.16.14-SNAPSHOT" +GERRIT_VERSION = "2.16.14" From d83119b0cd74055719dc1e9898fc2769f1ad2d38 Mon Sep 17 00:00:00 2001 From: Luca Milanesio Date: Tue, 10 Dec 2019 22:24:28 +0000 Subject: [PATCH 4/8] Set version to 2.16.15-SNAPSHOT Change-Id: I70ab4223cbc0ff43187e4895e439efb2f9ba0fcc --- tools/maven/gerrit-acceptance-framework_pom.xml | 2 +- tools/maven/gerrit-extension-api_pom.xml | 2 +- tools/maven/gerrit-plugin-api_pom.xml | 2 +- tools/maven/gerrit-plugin-gwtui_pom.xml | 2 +- tools/maven/gerrit-war_pom.xml | 2 +- version.bzl | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/maven/gerrit-acceptance-framework_pom.xml b/tools/maven/gerrit-acceptance-framework_pom.xml index c85e9e3e67..c2c6f1e68d 100644 --- a/tools/maven/gerrit-acceptance-framework_pom.xml +++ b/tools/maven/gerrit-acceptance-framework_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-acceptance-framework - 2.16.14 + 2.16.15-SNAPSHOT jar Gerrit Code Review - Acceptance Test Framework Framework for Gerrit's acceptance tests diff --git a/tools/maven/gerrit-extension-api_pom.xml b/tools/maven/gerrit-extension-api_pom.xml index f6a964877b..c357aeadd5 100644 --- a/tools/maven/gerrit-extension-api_pom.xml +++ b/tools/maven/gerrit-extension-api_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-extension-api - 2.16.14 + 2.16.15-SNAPSHOT jar Gerrit Code Review - Extension API API for Gerrit Extensions diff --git a/tools/maven/gerrit-plugin-api_pom.xml b/tools/maven/gerrit-plugin-api_pom.xml index 19a6504659..8b3da79516 100644 --- a/tools/maven/gerrit-plugin-api_pom.xml +++ b/tools/maven/gerrit-plugin-api_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-plugin-api - 2.16.14 + 2.16.15-SNAPSHOT jar Gerrit Code Review - Plugin API API for Gerrit Plugins diff --git a/tools/maven/gerrit-plugin-gwtui_pom.xml b/tools/maven/gerrit-plugin-gwtui_pom.xml index 1c3dfd78de..3fac3b4730 100644 --- a/tools/maven/gerrit-plugin-gwtui_pom.xml +++ b/tools/maven/gerrit-plugin-gwtui_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-plugin-gwtui - 2.16.14 + 2.16.15-SNAPSHOT jar Gerrit Code Review - Plugin GWT UI Common Classes for Gerrit GWT UI Plugins diff --git a/tools/maven/gerrit-war_pom.xml b/tools/maven/gerrit-war_pom.xml index d728604069..730511a8c7 100644 --- a/tools/maven/gerrit-war_pom.xml +++ b/tools/maven/gerrit-war_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-war - 2.16.14 + 2.16.15-SNAPSHOT war Gerrit Code Review - WAR Gerrit WAR diff --git a/version.bzl b/version.bzl index 3382fb3220..e074c11e64 100644 --- a/version.bzl +++ b/version.bzl @@ -2,4 +2,4 @@ # Used by :api_install and :api_deploy targets # when talking to the destination repository. # -GERRIT_VERSION = "2.16.14" +GERRIT_VERSION = "2.16.15-SNAPSHOT" From ff7550d5a7def03ac69bfecb07fb6364c851442f Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 11 Dec 2019 08:20:49 +0900 Subject: [PATCH 5/8] Set version to 3.0.5 Change-Id: Ib83bb1933723255685f3276d2e169944183f9b0f --- tools/maven/gerrit-acceptance-framework_pom.xml | 2 +- tools/maven/gerrit-extension-api_pom.xml | 2 +- tools/maven/gerrit-plugin-api_pom.xml | 2 +- tools/maven/gerrit-war_pom.xml | 2 +- version.bzl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/maven/gerrit-acceptance-framework_pom.xml b/tools/maven/gerrit-acceptance-framework_pom.xml index 945d2be764..52741d6373 100644 --- a/tools/maven/gerrit-acceptance-framework_pom.xml +++ b/tools/maven/gerrit-acceptance-framework_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-acceptance-framework - 3.0.5-SNAPSHOT + 3.0.5 jar Gerrit Code Review - Acceptance Test Framework Framework for Gerrit's acceptance tests diff --git a/tools/maven/gerrit-extension-api_pom.xml b/tools/maven/gerrit-extension-api_pom.xml index 3ff5cfc30b..b5be6b984f 100644 --- a/tools/maven/gerrit-extension-api_pom.xml +++ b/tools/maven/gerrit-extension-api_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-extension-api - 3.0.5-SNAPSHOT + 3.0.5 jar Gerrit Code Review - Extension API API for Gerrit Extensions diff --git a/tools/maven/gerrit-plugin-api_pom.xml b/tools/maven/gerrit-plugin-api_pom.xml index f4af83570b..cb4009ac05 100644 --- a/tools/maven/gerrit-plugin-api_pom.xml +++ b/tools/maven/gerrit-plugin-api_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-plugin-api - 3.0.5-SNAPSHOT + 3.0.5 jar Gerrit Code Review - Plugin API API for Gerrit Plugins diff --git a/tools/maven/gerrit-war_pom.xml b/tools/maven/gerrit-war_pom.xml index 6cbcf58ade..e582a865f7 100644 --- a/tools/maven/gerrit-war_pom.xml +++ b/tools/maven/gerrit-war_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-war - 3.0.5-SNAPSHOT + 3.0.5 war Gerrit Code Review - WAR Gerrit WAR diff --git a/version.bzl b/version.bzl index cbc86ac35d..4d920ba647 100644 --- a/version.bzl +++ b/version.bzl @@ -2,4 +2,4 @@ # Used by :api_install and :api_deploy targets # when talking to the destination repository. # -GERRIT_VERSION = "3.0.5-SNAPSHOT" +GERRIT_VERSION = "3.0.5" From 3ba22bb08a14f9f5a6ba7b4947c4c44a5dcba819 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 11 Dec 2019 10:01:12 +0900 Subject: [PATCH 6/8] Set version to 3.0.6-SNAPSHOT Change-Id: Ibc69f7f3f27afcc4d7c86ad8dc7a4bdfa73a8345 --- tools/maven/gerrit-acceptance-framework_pom.xml | 2 +- tools/maven/gerrit-extension-api_pom.xml | 2 +- tools/maven/gerrit-plugin-api_pom.xml | 2 +- tools/maven/gerrit-war_pom.xml | 2 +- version.bzl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/maven/gerrit-acceptance-framework_pom.xml b/tools/maven/gerrit-acceptance-framework_pom.xml index 52741d6373..801a7df127 100644 --- a/tools/maven/gerrit-acceptance-framework_pom.xml +++ b/tools/maven/gerrit-acceptance-framework_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-acceptance-framework - 3.0.5 + 3.0.6-SNAPSHOT jar Gerrit Code Review - Acceptance Test Framework Framework for Gerrit's acceptance tests diff --git a/tools/maven/gerrit-extension-api_pom.xml b/tools/maven/gerrit-extension-api_pom.xml index b5be6b984f..515c2d40a3 100644 --- a/tools/maven/gerrit-extension-api_pom.xml +++ b/tools/maven/gerrit-extension-api_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-extension-api - 3.0.5 + 3.0.6-SNAPSHOT jar Gerrit Code Review - Extension API API for Gerrit Extensions diff --git a/tools/maven/gerrit-plugin-api_pom.xml b/tools/maven/gerrit-plugin-api_pom.xml index cb4009ac05..4a5d9cf520 100644 --- a/tools/maven/gerrit-plugin-api_pom.xml +++ b/tools/maven/gerrit-plugin-api_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-plugin-api - 3.0.5 + 3.0.6-SNAPSHOT jar Gerrit Code Review - Plugin API API for Gerrit Plugins diff --git a/tools/maven/gerrit-war_pom.xml b/tools/maven/gerrit-war_pom.xml index e582a865f7..f73778672f 100644 --- a/tools/maven/gerrit-war_pom.xml +++ b/tools/maven/gerrit-war_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-war - 3.0.5 + 3.0.6-SNAPSHOT war Gerrit Code Review - WAR Gerrit WAR diff --git a/version.bzl b/version.bzl index 4d920ba647..968182cc1a 100644 --- a/version.bzl +++ b/version.bzl @@ -2,4 +2,4 @@ # Used by :api_install and :api_deploy targets # when talking to the destination repository. # -GERRIT_VERSION = "3.0.5" +GERRIT_VERSION = "3.0.6-SNAPSHOT" From bd0dbd9c327ee3d6943ab8b1520a492af5d65335 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 11 Dec 2019 10:32:55 +0900 Subject: [PATCH 7/8] Set version to 3.1.1 Change-Id: I58be3318c524ce3bc71fc0b4b7eff8cdb478d028 --- tools/maven/gerrit-acceptance-framework_pom.xml | 2 +- tools/maven/gerrit-extension-api_pom.xml | 2 +- tools/maven/gerrit-plugin-api_pom.xml | 2 +- tools/maven/gerrit-war_pom.xml | 2 +- version.bzl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/maven/gerrit-acceptance-framework_pom.xml b/tools/maven/gerrit-acceptance-framework_pom.xml index 1b0f3f2cc5..44aba646f4 100644 --- a/tools/maven/gerrit-acceptance-framework_pom.xml +++ b/tools/maven/gerrit-acceptance-framework_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-acceptance-framework - 3.1.1-SNAPSHOT + 3.1.1 jar Gerrit Code Review - Acceptance Test Framework Framework for Gerrit's acceptance tests diff --git a/tools/maven/gerrit-extension-api_pom.xml b/tools/maven/gerrit-extension-api_pom.xml index a6efa4c321..0238481816 100644 --- a/tools/maven/gerrit-extension-api_pom.xml +++ b/tools/maven/gerrit-extension-api_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-extension-api - 3.1.1-SNAPSHOT + 3.1.1 jar Gerrit Code Review - Extension API API for Gerrit Extensions diff --git a/tools/maven/gerrit-plugin-api_pom.xml b/tools/maven/gerrit-plugin-api_pom.xml index 2d0f19c87c..a365d9889c 100644 --- a/tools/maven/gerrit-plugin-api_pom.xml +++ b/tools/maven/gerrit-plugin-api_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-plugin-api - 3.1.1-SNAPSHOT + 3.1.1 jar Gerrit Code Review - Plugin API API for Gerrit Plugins diff --git a/tools/maven/gerrit-war_pom.xml b/tools/maven/gerrit-war_pom.xml index a1c228b9d2..987cd40343 100644 --- a/tools/maven/gerrit-war_pom.xml +++ b/tools/maven/gerrit-war_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-war - 3.1.1-SNAPSHOT + 3.1.1 war Gerrit Code Review - WAR Gerrit WAR diff --git a/version.bzl b/version.bzl index f3c53991f5..0022402ff4 100644 --- a/version.bzl +++ b/version.bzl @@ -2,4 +2,4 @@ # Used by :api_install and :api_deploy targets # when talking to the destination repository. # -GERRIT_VERSION = "3.1.1-SNAPSHOT" +GERRIT_VERSION = "3.1.1" From f2c5c36dcbe4abb7411479dd1427f727ee95d58c Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 11 Dec 2019 16:03:47 +0900 Subject: [PATCH 8/8] Set version to 3.1.2-SNAPSHOT Change-Id: I0a709cbf7e57d8583ad53f4f952803a3b4da016b --- tools/maven/gerrit-acceptance-framework_pom.xml | 2 +- tools/maven/gerrit-extension-api_pom.xml | 2 +- tools/maven/gerrit-plugin-api_pom.xml | 2 +- tools/maven/gerrit-war_pom.xml | 2 +- version.bzl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/maven/gerrit-acceptance-framework_pom.xml b/tools/maven/gerrit-acceptance-framework_pom.xml index 44aba646f4..d96e27890b 100644 --- a/tools/maven/gerrit-acceptance-framework_pom.xml +++ b/tools/maven/gerrit-acceptance-framework_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-acceptance-framework - 3.1.1 + 3.1.2-SNAPSHOT jar Gerrit Code Review - Acceptance Test Framework Framework for Gerrit's acceptance tests diff --git a/tools/maven/gerrit-extension-api_pom.xml b/tools/maven/gerrit-extension-api_pom.xml index 0238481816..499832b590 100644 --- a/tools/maven/gerrit-extension-api_pom.xml +++ b/tools/maven/gerrit-extension-api_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-extension-api - 3.1.1 + 3.1.2-SNAPSHOT jar Gerrit Code Review - Extension API API for Gerrit Extensions diff --git a/tools/maven/gerrit-plugin-api_pom.xml b/tools/maven/gerrit-plugin-api_pom.xml index a365d9889c..f41ff6f30d 100644 --- a/tools/maven/gerrit-plugin-api_pom.xml +++ b/tools/maven/gerrit-plugin-api_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-plugin-api - 3.1.1 + 3.1.2-SNAPSHOT jar Gerrit Code Review - Plugin API API for Gerrit Plugins diff --git a/tools/maven/gerrit-war_pom.xml b/tools/maven/gerrit-war_pom.xml index 987cd40343..e9e667766d 100644 --- a/tools/maven/gerrit-war_pom.xml +++ b/tools/maven/gerrit-war_pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-war - 3.1.1 + 3.1.2-SNAPSHOT war Gerrit Code Review - WAR Gerrit WAR diff --git a/version.bzl b/version.bzl index 0022402ff4..cca89c9963 100644 --- a/version.bzl +++ b/version.bzl @@ -2,4 +2,4 @@ # Used by :api_install and :api_deploy targets # when talking to the destination repository. # -GERRIT_VERSION = "3.1.1" +GERRIT_VERSION = "3.1.2-SNAPSHOT"