* Update plugins/replication from branch 'master'
to 841ed8fe0417a8aef985d1dd4bfd368d9a00b355
- Merge branch 'stable-3.1'
* stable-3.1:
Clarify the limitations of gerrit+ssh in replication.config
PushOne: Don't log refs to push at ERROR level
PushOne: Remove redundant 'throws' declarations
Destination: Further improve the debug logs when not pushing
Improve logging of why a project or ref is not replicated
ReplicationQueue: Add handling of null ReplicationTasksStorage.ReplicateRefUpdate
Destination: Extract repeated string to a constant
Fix flaky ReplicationConfig tests
FanoutReplicationConfig: Make methods static where possible
Factor out and simplify the check if Path is a *.config file
Consistently use Files.list in FanoutReplicationConfig
Add multiple replication configuration file support
Use ReplicationConfig interface instead of ReplicationFileBasedConfig
Fix failing AutoReloadConfigDecorator tests
Move replication config parsing out of DestinationsCollection
Extract destinations logic into a new class
ReplicationQueue: Migrate to Flogger
Adapt existing replication logging code in master to Flogger,
to allow the merged code to build successfully on master.
Change-Id: Ice4e54ab5c1a1a53894432c3687137e4b3603c41
- Merge branch 'stable-3.0' into stable-3.1
* stable-3.0:
Clarify the limitations of gerrit+ssh in replication.config
PushOne: Don't log refs to push at ERROR level
PushOne: Remove redundant 'throws' declarations
Destination: Further improve the debug logs when not pushing
Improve logging of why a project or ref is not replicated
ReplicationQueue: Add handling of null ReplicationTasksStorage.ReplicateRefUpdate
Destination: Extract repeated string to a constant
ReplicationQueue: Migrate to Flogger
Change-Id: Ib78ceca4d6f40f31bb80fca188228ae6aa263c23
- Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
Clarify the limitations of gerrit+ssh in replication.config
PushOne: Don't log refs to push at ERROR level
PushOne: Remove redundant 'throws' declarations
Destination: Further improve the debug logs when not pushing
Improve logging of why a project or ref is not replicated
ReplicationQueue: Add handling of null ReplicationTasksStorage.ReplicateRefUpdate
Destination: Extract repeated string to a constant
ReplicationQueue: Migrate to Flogger
Change-Id: I13265df47beca6717dc78a790fba793c649a8b1b
- Merge "Clarify the limitations of gerrit+ssh in replication.config" into stable-2.16
- Clarify the limitations of gerrit+ssh in replication.config
The gerrit+ssh option, introduced years ago when Lucene was not
used in Gerrit, is currently misunderstood by the users because
it is presented as a way to perform Gerrit master to master
replication.
Whilst it was actually possible in the past, it isn't supported
anymore because of the need of more machinery around it.
Clarify the limitations in the documentation and warn on the
limited applicability.
Bug: Issue 12616
Change-Id: I992385b9da03b0c3c2b938817687ba50b2dbde58
- PushOne: Don't log refs to push at ERROR level
The log is informational, not an error, so log it at INFO
level.
Change-Id: Ic16264da744bd3df4f6f28ff2ad82fc6856f98b4
- PushOne: Remove redundant 'throws' declarations
NotSupportedException and TransportException are subclasses
of IOException, which is already declared.
Change-Id: Iee0f971386a6134363018f87c30a588594be4235
- Destination: Further improve the debug logs when not pushing
Follow-up to change I13f5649cf. Remove all uppercase "NOT" and
improve the wording.
Also add one more debug log when push of ref is skipped.
Change-Id: I2e3a6fb19ec9ca7f722810a94d9466be6fb0e45e
- Improve logging of why a project or ref is not replicated
Add more debug logs to indicate the cases where a project or
ref does not replicated.
For failure to read the project cache, log at warning level.
Also fix logging of the "scheduling replication ..." info log, which
was emitted before the check which could cause the replication to not
be scheduled. Move it to after the check, and add an additional debug
log of "NOT replicating ..." for the case where the check fails.
Change-Id: I13f5649cfe7e42fc672989efe8d77b47b0472023
- ReplicationQueue: Add handling of null ReplicationTasksStorage.ReplicateRefUpdate
This was originally done in change I72f34d8de but got lost in
the merge from stable-2.15 to stable-2.16 in change Icc855dd26.
Change-Id: Iea4d6e80f64d84b9c13a9fb1792e84fec808a237
- Destination: Extract repeated string to a constant
Change-Id: Ic12619b066c9b3013c65f42879d08b97055bc0d3
Signed-off-by: David Pursehouse <dpursehouse@digital.ai>
- Fix flaky ReplicationConfig tests
Change-Id: Ic5d4b1f19a5864114697d91030b534ac6cf3f9f8
- FanoutReplicationConfig: Make methods static where possible
Change-Id: I95cf2fdf933cfde3f291e8822e00b3845ac48f11
- Factor out and simplify the check if Path is a *.config file
Change-Id: I1eaf1d18aeb4de32f8370819acead4b7dc1751af
- Consistently use Files.list in FanoutReplicationConfig
Use Files.list in both places where fan-out config files are listed.
Change-Id: Ia67aec878b25abf176a79e3911cf221973f4cb84
- Add multiple replication configuration file support
Replication plugin is capable to load both replication.config file and
all *.config files from etc/replication directory. This change allows
to split current monolith replication.config into global and remotes
parts. Main purpose of this change is to simplify future generation
of the diff between old and new remote configurations to decide which
remote configurations needs to be reloaded.
Feature: Issue 12450
Change-Id: I51c1b8fc3b7d95b65b15c37a540fdc6e2087d09c
- Use ReplicationConfig interface instead of ReplicationFileBasedConfig
ReplicationFileBasedConfing is an implementation of the
ReplicationConfig interface. Using ReplicationFileBasedConfig directly
is causing unnecessary code coupling and makes use of different
ReplicationConfig implementation difficult.
Feature: Issue 12450
Change-Id: Icda484ce6bd4a9246c530b8705910331c12d6c8f
- Fix failing AutoReloadConfigDecorator tests
Currently configuration is loaded in ReplicationFileBasedConfig
constructor instead of ConfigParser.parseRemotes method. Adjust
AutoReloadConfigDecorator tests to load initial state correctly.
Feature: Issue 12450
Change-Id: Iaa9163bd409c56789b1f190293c89b35d632a2a3
- Move replication config parsing out of DestinationsCollection
DestinationsCollection class is breaking single responsibility principle
because is mixing ReplicationDestination and ConfigParser functionality.
This split allows better code decoupling and is a prerequisite for
replacing ReplicationFileBasedConfig with ReplicationConfig interface.
Feature: Issue 12450
Change-Id: I33e3350596884e24bc32eacc4b51b73048e3f18c
- Extract destinations logic into a new class
The config file is never loaded by ReplicationFileBasedConfig and thus
is empty in its constructor. config.load() is later called by
DestinationsCollection.validateConfig(), but that doesn't affect the
values stored in ReplicationFileBasedConfig.
It seems DestinationsCollection.validateConfig() shouldn't be reading
config values or calling load() directly, but I'll address that in a
follow-up change.
Change-Id: I3f53237a1f0ac03948b72ae388722aed65716b4b
- ReplicationQueue: Migrate to Flogger
ReplicationQueue uses a named logger which is not directly supported
by FluentLogger. Use Gerrit's own NamedFluentLogger instead.
Change-Id: I3ed0244a517d51a349182b34b67202efb3d0ba83