Skip to content

Commit ac416b0

Browse files
authored
Merge branch 'main' into test-failure/RcsCcsCommonYamlTestSuiteIT_suite_timeout
2 parents 2ec4e68 + 91bdd04 commit ac416b0

File tree

11 files changed

+71
-58
lines changed

11 files changed

+71
-58
lines changed

.buildkite/pipelines/intake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ steps:
6565
timeout_in_minutes: 300
6666
matrix:
6767
setup:
68-
BWC_VERSION: ["8.17.10", "8.18.6", "8.19.2", "9.0.6", "9.1.2", "9.2.0"]
68+
BWC_VERSION: ["8.17.11", "8.18.6", "8.19.2", "9.0.6", "9.1.2", "9.2.0"]
6969
agents:
7070
provider: gcp
7171
image: family/elasticsearch-ubuntu-2404

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ steps:
302302
env:
303303
BWC_VERSION: 8.16.6
304304

305-
- label: "{{matrix.image}} / 8.17.10 / packaging-tests-upgrade"
306-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.10
305+
- label: "{{matrix.image}} / 8.17.11 / packaging-tests-upgrade"
306+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.11
307307
timeout_in_minutes: 300
308308
matrix:
309309
setup:
@@ -316,7 +316,7 @@ steps:
316316
machineType: custom-16-32768
317317
buildDirectory: /dev/shm/bk
318318
env:
319-
BWC_VERSION: 8.17.10
319+
BWC_VERSION: 8.17.11
320320

321321
- label: "{{matrix.image}} / 8.18.6 / packaging-tests-upgrade"
322322
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.18.6

.buildkite/pipelines/periodic.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@ steps:
325325
- signal_reason: agent_stop
326326
limit: 3
327327

328-
- label: 8.17.10 / bwc
329-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.10#bwcTest
328+
- label: 8.17.11 / bwc
329+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.11#bwcTest
330330
timeout_in_minutes: 300
331331
agents:
332332
provider: gcp
@@ -335,7 +335,7 @@ steps:
335335
buildDirectory: /dev/shm/bk
336336
preemptible: true
337337
env:
338-
BWC_VERSION: 8.17.10
338+
BWC_VERSION: 8.17.11
339339
retry:
340340
automatic:
341341
- exit_status: "-1"
@@ -506,7 +506,7 @@ steps:
506506
setup:
507507
ES_RUNTIME_JAVA:
508508
- openjdk21
509-
BWC_VERSION: ["8.17.10", "8.18.6", "8.19.2", "9.0.6", "9.1.2", "9.2.0"]
509+
BWC_VERSION: ["8.17.11", "8.18.6", "8.19.2", "9.0.6", "9.1.2", "9.2.0"]
510510
agents:
511511
provider: gcp
512512
image: family/elasticsearch-ubuntu-2404
@@ -550,7 +550,7 @@ steps:
550550
ES_RUNTIME_JAVA:
551551
- openjdk21
552552
- openjdk23
553-
BWC_VERSION: ["8.17.10", "8.18.6", "8.19.2", "9.0.6", "9.1.2", "9.2.0"]
553+
BWC_VERSION: ["8.17.11", "8.18.6", "8.19.2", "9.0.6", "9.1.2", "9.2.0"]
554554
agents:
555555
provider: gcp
556556
image: family/elasticsearch-ubuntu-2404

.ci/bwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ BWC_VERSION:
1616
- "8.14.3"
1717
- "8.15.5"
1818
- "8.16.6"
19-
- "8.17.10"
19+
- "8.17.11"
2020
- "8.18.6"
2121
- "8.19.2"
2222
- "9.0.6"

.ci/snapshotBwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BWC_VERSION:
2-
- "8.17.10"
2+
- "8.17.11"
33
- "8.18.6"
44
- "8.19.2"
55
- "9.0.6"

muted-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,6 @@ tests:
143143
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
144144
method: test {p0=nodes.stats/11_indices_metrics/indices mappings exact count test for indices level}
145145
issue: https://github.com/elastic/elasticsearch/issues/120950
146-
- class: org.elasticsearch.test.rest.yaml.CcsCommonYamlTestSuiteIT
147-
issue: https://github.com/elastic/elasticsearch/issues/121407
148146
- class: org.elasticsearch.analysis.common.CommonAnalysisClientYamlTestSuiteIT
149147
method: test {yaml=analysis-common/40_token_filters/stemmer_override file access}
150148
issue: https://github.com/elastic/elasticsearch/issues/121625

qa/ccs-common-rest/src/yamlRestTest/java/org/elasticsearch/test/rest/yaml/CcsCommonYamlTestSuiteIT.java

Lines changed: 56 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
import java.util.Map;
5353
import java.util.Optional;
5454
import java.util.Set;
55+
import java.util.concurrent.atomic.AtomicBoolean;
56+
import java.util.concurrent.atomic.AtomicReference;
5557
import java.util.function.BiPredicate;
5658
import java.util.stream.Collectors;
5759
import java.util.stream.Stream;
@@ -78,6 +80,12 @@ public class CcsCommonYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
7880
// the remote cluster is the one we write index operations etc... to
7981
private static final String REMOTE_CLUSTER_NAME = "remote_cluster";
8082

83+
private static final AtomicBoolean isRemoteConfigured = new AtomicBoolean(false);
84+
private static final AtomicBoolean isCombinedComputed = new AtomicBoolean(false);
85+
private static final AtomicReference<TestFeatureService> combinedTestFeatureServiceRef = new AtomicReference<>();
86+
private static final AtomicReference<Set<String>> combinedOsSetRef = new AtomicReference<>();
87+
private static final AtomicReference<Set<String>> combinedNodeVersionsRef = new AtomicReference<>();
88+
8189
private static LocalClusterConfigProvider commonClusterConfig = cluster -> cluster.module("x-pack-async-search")
8290
.module("aggregations")
8391
.module("analysis-common")
@@ -165,25 +173,26 @@ public void initSearchClient() throws IOException {
165173
}
166174
clusterHosts = unmodifiableList(hosts);
167175
logger.info("initializing REST search clients against {}", clusterHosts);
168-
searchClient = buildClient(restClientSettings(), clusterHosts.toArray(new HttpHost[clusterHosts.size()]));
169-
adminSearchClient = buildClient(restAdminSettings(), clusterHosts.toArray(new HttpHost[clusterHosts.size()]));
176+
searchClient = buildClient(restClientSettings(), clusterHosts.toArray(new HttpHost[0]));
177+
adminSearchClient = buildClient(restAdminSettings(), clusterHosts.toArray(new HttpHost[0]));
170178

171179
searchYamlTestClient = new TestCandidateAwareClient(getRestSpec(), searchClient, hosts, this::getClientBuilderWithSniffedHosts);
172180

173-
// check that we have an established CCS connection
174-
Request request = new Request("GET", "_remote/info");
175-
Response response = adminSearchClient.performRequest(request);
176-
assertOK(response);
177-
ObjectPath responseObject = ObjectPath.createFromResponse(response);
178-
assertNotNull(responseObject.evaluate(REMOTE_CLUSTER_NAME));
179-
assertNull(responseObject.evaluate(REMOTE_CLUSTER_NAME + ".cluster_credentials"));
180-
logger.info("Established connection to remote cluster [" + REMOTE_CLUSTER_NAME + "]");
181+
assert searchClient != null;
182+
assert adminSearchClient != null;
183+
assert clusterHosts != null;
184+
185+
if (isRemoteConfigured.compareAndSet(false, true)) {
186+
// check that we have an established CCS connection
187+
Request request = new Request("GET", "_remote/info");
188+
Response response = adminSearchClient.performRequest(request);
189+
assertOK(response);
190+
ObjectPath responseObject = ObjectPath.createFromResponse(response);
191+
assertNotNull(responseObject.evaluate(REMOTE_CLUSTER_NAME));
192+
assertNull(responseObject.evaluate(REMOTE_CLUSTER_NAME + ".cluster_credentials"));
193+
logger.info("Established connection to remote cluster [" + REMOTE_CLUSTER_NAME + "]");
194+
}
181195
}
182-
183-
assert searchClient != null;
184-
assert adminSearchClient != null;
185-
assert clusterHosts != null;
186-
187196
searchYamlTestClient.setTestCandidate(getTestCandidate());
188197
}
189198

@@ -301,44 +310,46 @@ protected ClientYamlTestExecutionContext createRestTestExecutionContext(
301310
final Set<String> osSet
302311
) {
303312
try {
304-
// Ensure the test specific initialization is run by calling it explicitly (@Before annotations on base-derived class may
305-
// be called in a different order)
306-
initSearchClient();
307-
// Reconcile and provide unified features, os, version(s), based on both clientYamlTestClient and searchYamlTestClient
308-
var searchOs = readOsFromNodesInfo(adminSearchClient);
309-
var searchNodeVersions = readVersionsFromNodesInfo(adminSearchClient);
310-
var semanticNodeVersions = searchNodeVersions.stream()
311-
.map(ESRestTestCase::parseLegacyVersion)
312-
.flatMap(Optional::stream)
313-
.collect(Collectors.toSet());
314-
final TestFeatureService searchTestFeatureService = createTestFeatureService(
315-
getClusterStateFeatures(adminSearchClient),
316-
semanticNodeVersions
317-
);
318-
final TestFeatureService combinedTestFeatureService = (featureId, any) -> {
319-
boolean adminFeature = testFeatureService.clusterHasFeature(featureId, any);
320-
boolean searchFeature = searchTestFeatureService.clusterHasFeature(featureId, any);
321-
return any ? adminFeature || searchFeature : adminFeature && searchFeature;
322-
};
323-
final Set<String> combinedOsSet = Stream.concat(osSet.stream(), Stream.of(searchOs)).collect(Collectors.toSet());
324-
final Set<String> combinedNodeVersions = Stream.concat(nodesVersions.stream(), searchNodeVersions.stream())
325-
.collect(Collectors.toSet());
313+
if (isCombinedComputed.compareAndSet(false, true)) {
314+
// Ensure the test specific initialization is run by calling it explicitly (@Before annotations on base-derived class may
315+
// be called in a different order)
316+
initSearchClient();
317+
// Reconcile and provide unified features, os, version(s), based on both clientYamlTestClient and searchYamlTestClient
318+
var searchOs = readOsFromNodesInfo(adminSearchClient);
319+
var searchNodeVersions = readVersionsFromNodesInfo(adminSearchClient);
320+
var semanticNodeVersions = searchNodeVersions.stream()
321+
.map(ESRestTestCase::parseLegacyVersion)
322+
.flatMap(Optional::stream)
323+
.collect(Collectors.toSet());
324+
final TestFeatureService searchTestFeatureService = createTestFeatureService(
325+
getClusterStateFeatures(adminSearchClient),
326+
semanticNodeVersions
327+
);
328+
final TestFeatureService combinedTestFeatureService = (featureId, any) -> {
329+
boolean adminFeature = testFeatureService.clusterHasFeature(featureId, any);
330+
boolean searchFeature = searchTestFeatureService.clusterHasFeature(featureId, any);
331+
return any ? adminFeature || searchFeature : adminFeature && searchFeature;
332+
};
333+
final Set<String> combinedOsSet = Stream.concat(osSet.stream(), Stream.of(searchOs)).collect(Collectors.toSet());
334+
final Set<String> combinedNodeVersions = Stream.concat(nodesVersions.stream(), searchNodeVersions.stream())
335+
.collect(Collectors.toSet());
336+
337+
combinedTestFeatureServiceRef.set(combinedTestFeatureService);
338+
combinedOsSetRef.set(combinedOsSet);
339+
combinedNodeVersionsRef.set(combinedNodeVersions);
340+
}
326341

327342
return new ClientYamlTestExecutionContext(
328343
clientYamlTestCandidate,
329344
clientYamlTestClient,
330345
randomizeContentType(),
331-
combinedNodeVersions,
332-
combinedTestFeatureService,
333-
combinedOsSet
346+
combinedNodeVersionsRef.get(),
347+
combinedTestFeatureServiceRef.get(),
348+
combinedOsSetRef.get()
334349
) {
335350
// depending on the API called, we either return the client running against the "write" or the "search" cluster here
336351
protected ClientYamlTestClient clientYamlTestClient(String apiName) {
337-
if (CCS_APIS.contains(apiName)) {
338-
return searchYamlTestClient;
339-
} else {
340-
return super.clientYamlTestClient(apiName);
341-
}
352+
return CCS_APIS.contains(apiName) ? searchYamlTestClient : super.clientYamlTestClient(apiName);
342353
}
343354
};
344355
} catch (IOException e) {

server/src/main/java/org/elasticsearch/TransportVersions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ static TransportVersion def(int id) {
9999
public static final TransportVersion INITIAL_ELASTICSEARCH_8_17_8 = def(8_797_0_08);
100100
public static final TransportVersion INITIAL_ELASTICSEARCH_8_17_9 = def(8_797_0_09);
101101
public static final TransportVersion INITIAL_ELASTICSEARCH_8_17_10 = def(8_797_0_10);
102+
public static final TransportVersion INITIAL_ELASTICSEARCH_8_17_11 = def(8_797_0_11);
102103
public static final TransportVersion INDEXING_PRESSURE_THROTTLING_STATS = def(8_798_0_00);
103104
public static final TransportVersion REINDEX_DATA_STREAMS = def(8_799_0_00);
104105
public static final TransportVersion ESQL_REMOVE_NODE_LEVEL_PLAN = def(8_800_0_00);

server/src/main/java/org/elasticsearch/Version.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ public class Version implements VersionId<Version>, ToXContentFragment {
206206
public static final Version V_8_17_8 = new Version(8_17_08_99);
207207
public static final Version V_8_17_9 = new Version(8_17_09_99);
208208
public static final Version V_8_17_10 = new Version(8_17_10_99);
209+
public static final Version V_8_17_11 = new Version(8_17_11_99);
209210
public static final Version V_8_18_0 = new Version(8_18_00_99);
210211
public static final Version V_8_18_1 = new Version(8_18_01_99);
211212
public static final Version V_8_18_2 = new Version(8_18_02_99);

server/src/main/resources/org/elasticsearch/TransportVersions.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
8.17.7,8797007
151151
8.17.8,8797008
152152
8.17.9,8797009
153+
8.17.10,8797010
153154
8.18.0,8840002
154155
8.18.1,8840003
155156
8.18.2,8840004

0 commit comments

Comments
 (0)