Skip to content

Commit

Permalink
allow empty probe config when no replication endpoint defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerkesni committed Nov 20, 2024
1 parent 9ed7032 commit 4b1395b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/config/configItems.joi.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const probeServerJoi = joi.object({
port: joi.number().required(),
});

const probeServerPerSite = joi.array().min(1).items(
const probeServerPerSite = joi.array().items(
joi.object({
bindAddress: joi.string().default('localhost'),
port: joi.number().required(),
Expand Down
2 changes: 1 addition & 1 deletion lib/util/probe.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function getReplicationProbeConfig(config, siteNames, topicName, logger) {
}

if (Array.isArray(probeConfig)) {
if (siteNames.length !== 1) {
if (siteNames.length > 1) {
logger.error('Process configured for more than one site or no site provided', {
siteNames,
probeConfig,
Expand Down

0 comments on commit 4b1395b

Please sign in to comment.