Skip to content

Commit

Permalink
Knock-on effects on ML
Browse files Browse the repository at this point in the history
  • Loading branch information
droberts195 committed Sep 25, 2023
1 parent 99eb232 commit 1e4c2ad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,12 @@ public final class SourceDestValidator {
public static final String REMOTE_CLUSTER_LICENSE_INACTIVE = "License check failed for remote cluster "
+ "alias [{0}], license is not active";
public static final String REMOTE_SOURCE_INDICES_NOT_SUPPORTED = "remote source indices are not supported";
public static final String REMOTE_CLUSTERS_TOO_OLD =
public static final String REMOTE_CLUSTERS_TRANSPORT_TOO_OLD =
"remote clusters are expected to run at least transport version [{0}] (reason: [{1}]),"
+ " but the following clusters were too old: [{2}]";
public static final String REMOTE_CLUSTERS_CONFIG_TOO_OLD =
"remote clusters are expected to run at least config version [{0}] (reason: [{1}]),"
+ " but the following clusters were too old: [{2}]";
public static final String PIPELINE_MISSING = "Pipeline with id [{0}] could not be found";

private final IndexNameExpressionResolver indexNameExpressionResolver;
Expand Down Expand Up @@ -490,7 +493,7 @@ public void validate(Context context, ActionListener<Context> listener) {
.collect(toMap(Map.Entry::getKey, Map.Entry::getValue));
if (oldRemoteClusterVersions.isEmpty() == false) {
context.addValidationError(
REMOTE_CLUSTERS_TOO_OLD,
REMOTE_CLUSTERS_TRANSPORT_TOO_OLD,
minExpectedVersion,
reason,
oldRemoteClusterVersions.entrySet()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
import java.util.function.Predicate;
import java.util.stream.Collectors;

import static org.elasticsearch.xpack.core.common.validation.SourceDestValidator.REMOTE_CLUSTERS_TOO_OLD;
import static org.elasticsearch.xpack.core.common.validation.SourceDestValidator.REMOTE_CLUSTERS_CONFIG_TOO_OLD;

/* This class extends from TransportMasterNodeAction for cluster state observing purposes.
The stop datafeed api also redirect the elected master node.
Expand Down Expand Up @@ -316,7 +316,7 @@ static void checkRemoteConfigVersions(

throw ExceptionsHelper.badRequestException(
Messages.getMessage(
REMOTE_CLUSTERS_TOO_OLD,
REMOTE_CLUSTERS_CONFIG_TOO_OLD,
minVersion.toString(),
reason,
Strings.collectionToCommaDelimitedString(clustersTooOld)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public void testRemoteClusterVersionCheck() {
assertThat(
ex.getMessage(),
containsString(
"remote clusters are expected to run at least version [7.11.0] (reason: [runtime_mappings]), "
"remote clusters are expected to run at least config version [7.11.0] (reason: [runtime_mappings]), "
+ "but the following clusters were too old: [old_cluster_1]"
)
);
Expand Down

0 comments on commit 1e4c2ad

Please sign in to comment.