Skip to content

Commit 78d1071

Browse files
Merge branch 'main' into svilen/multimatch_args
2 parents 824b3ca + d487eb5 commit 78d1071

File tree

60 files changed

+2061
-985
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2061
-985
lines changed

build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/PublishPluginFuncTest.groovy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@
99

1010
package org.elasticsearch.gradle.internal
1111

12+
import spock.lang.IgnoreIf
13+
1214
import org.elasticsearch.gradle.fixtures.AbstractGradleFuncTest
1315
import org.gradle.testkit.runner.TaskOutcome
1416
import org.xmlunit.builder.DiffBuilder
1517
import org.xmlunit.builder.Input
1618

19+
// Ignoring this test on windows due to what appears to be a bug in the gradle testkit runner.
20+
// https://github.com/elastic/elasticsearch/issues/129100
21+
@IgnoreIf({ os.isWindows() })
1722
class PublishPluginFuncTest extends AbstractGradleFuncTest {
1823

1924
def setup() {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
import org.elasticsearch.gradle.Version
11+
import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask
12+
13+
tasks.register("bcUpgradeTest", StandaloneRestIntegTestTask) {
14+
// We use a phony version here as the real version is provided via `tests.bwc.main.version` system property
15+
usesBwcDistribution(Version.fromString("0.0.0"))
16+
systemProperty("tests.old_cluster_version", "0.0.0")
17+
onlyIf("tests.bwc.main.version system property exists") { System.getProperty("tests.bwc.main.version") != null }
18+
}

docs/changelog/129367.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 129367
2+
summary: Run `TransportGetStatusAction` on local node
3+
area: ILM+SLM
4+
type: enhancement
5+
issues: []

docs/changelog/129391.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pr: 129391
2+
summary: Ensure that anomaly detection job state update retries if master node is
3+
temoporarily unavailable
4+
area: Machine Learning
5+
type: bug
6+
issues:
7+
- 126148

modules/ingest-geoip/qa/full-cluster-restart/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask
1111

1212
apply plugin: 'elasticsearch.internal-java-rest-test'
1313
apply plugin: 'elasticsearch.bwc-test'
14-
14+
apply plugin: 'elasticsearch.bc-upgrade-test'
1515

1616
dependencies {
1717
javaRestTestImplementation project(':test:fixtures:geoip-fixture')

muted-tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,12 @@ tests:
523523
- class: org.elasticsearch.xpack.autoscaling.storage.ReactiveStorageIT
524524
method: testScaleDuringSplitOrClone
525525
issue: https://github.com/elastic/elasticsearch/issues/129335
526+
- class: org.elasticsearch.entitlement.runtime.policy.FileAccessTreeTests
527+
method: testWindowsMixedCaseAccess
528+
issue: https://github.com/elastic/elasticsearch/issues/129167
529+
- class: org.elasticsearch.entitlement.runtime.policy.FileAccessTreeTests
530+
method: testWindowsAbsolutPathAccess
531+
issue: https://github.com/elastic/elasticsearch/issues/129168
526532

527533
# Examples:
528534
#

qa/full-cluster-restart/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask
1313
apply plugin: 'elasticsearch.internal-java-rest-test'
1414
apply plugin: 'elasticsearch.internal-test-artifact'
1515
apply plugin: 'elasticsearch.bwc-test'
16+
apply plugin: 'elasticsearch.bc-upgrade-test'
1617

1718
buildParams.bwcVersions.withIndexCompatible { bwcVersion, baseName ->
1819
tasks.register(bwcTaskName(bwcVersion), StandaloneRestIntegTestTask) {

qa/rolling-upgrade/build.gradle

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ apply plugin: 'elasticsearch.internal-java-rest-test'
1414
apply plugin: 'elasticsearch.internal-test-artifact-base'
1515
apply plugin: 'elasticsearch.bwc-test'
1616
apply plugin: 'elasticsearch.fwc-test'
17+
apply plugin: 'elasticsearch.bc-upgrade-test'
1718

1819
testArtifacts {
1920
registerTestArtifactFromSourceSet(sourceSets.javaRestTest)
@@ -26,18 +27,6 @@ buildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
2627
}
2728
}
2829

29-
tasks.register("bcUpgradeTest", StandaloneRestIntegTestTask) {
30-
// We use a phony version here as the real version is provided via `tests.bwc.main.version` system property
31-
usesBwcDistribution(Version.fromString("0.0.0"))
32-
systemProperty("tests.old_cluster_version", "0.0.0")
33-
onlyIf("tests.bwc.main.version system property exists") { System.getProperty("tests.bwc.main.version") != null }
34-
filter {
35-
// filter tests initially for quicker iterations
36-
// TODO remove once expanding the test set to other modules
37-
includeTestsMatching("org.elasticsearch.upgrades.IndexingIT")
38-
}
39-
}
40-
4130
tasks.withType(Test).configureEach {
4231
// CI doesn't like it when there's multiple clusters running at once
4332
maxParallelForks = 1

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ static TransportVersion def(int id) {
195195
public static final TransportVersion ML_INFERENCE_MISTRAL_CHAT_COMPLETION_ADDED_8_19 = def(8_841_0_47);
196196
public static final TransportVersion ML_INFERENCE_ELASTIC_RERANK_ADDED_8_19 = def(8_841_0_48);
197197
public static final TransportVersion NONE_CHUNKING_STRATEGY_8_19 = def(8_841_0_49);
198+
public static final TransportVersion IDP_CUSTOM_SAML_ATTRIBUTES_ALLOW_LIST_8_19 = def(8_841_0_50);
198199
public static final TransportVersion V_9_0_0 = def(9_000_0_09);
199200
public static final TransportVersion INITIAL_ELASTICSEARCH_9_0_1 = def(9_000_0_10);
200201
public static final TransportVersion INITIAL_ELASTICSEARCH_9_0_2 = def(9_000_0_11);
@@ -296,6 +297,7 @@ static TransportVersion def(int id) {
296297
public static final TransportVersion SEARCH_LOAD_PER_INDEX_STATS = def(9_095_0_00);
297298
public static final TransportVersion HEAP_USAGE_IN_CLUSTER_INFO = def(9_096_0_00);
298299
public static final TransportVersion NONE_CHUNKING_STRATEGY = def(9_097_0_00);
300+
public static final TransportVersion PROJECT_DELETION_GLOBAL_BLOCK = def(9_098_0_00);
299301

300302
/*
301303
* STOP! READ THIS FIRST! No, really,

server/src/main/java/org/elasticsearch/cluster/ClusterState.java

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -873,21 +873,24 @@ private Iterator<ToXContent> blocksXContentMultiProjects() {
873873
}
874874
builder.endObject();
875875
}
876-
if (blocks().noIndexBlockAllProjects() == false) {
876+
if (blocks().noProjectHasAProjectBlock() == false) {
877877
builder.startArray("projects");
878878
}
879879
return builder;
880880
};
881881
final ToXContent after = (builder, params) -> {
882-
if (blocks().noIndexBlockAllProjects() == false) {
882+
if (blocks().noProjectHasAProjectBlock() == false) {
883883
builder.endArray();
884884
}
885885
return builder.endObject();
886886
};
887887
return chunkedSection(
888888
true,
889889
before,
890-
Iterators.map(metadata().projects().keySet().iterator(), projectId -> new Tuple<>(projectId, blocks().indices(projectId))),
890+
Iterators.map(
891+
metadata().projects().keySet().iterator(),
892+
projectId -> new Tuple<>(projectId, blocks().projectBlocks(projectId))
893+
),
891894
ClusterState::projectBlocksXContent,
892895
after
893896
);
@@ -929,19 +932,37 @@ private Iterator<ToXContent> blocksXContentSingleProject(ProjectId singleProject
929932
);
930933
}
931934

932-
private static Iterator<ToXContent> projectBlocksXContent(Tuple<ProjectId, Map<String, Set<ClusterBlock>>> entry) {
933-
return chunkedSection(
934-
entry.v2().isEmpty() == false,
935-
(builder, params) -> builder.startObject().field("id", entry.v1()).startObject("indices"),
936-
entry.v2().entrySet().iterator(),
937-
e -> Iterators.single((builder, params) -> {
938-
builder.startObject(e.getKey());
939-
for (ClusterBlock block : e.getValue()) {
935+
private static Iterator<ToXContent> projectBlocksXContent(Tuple<ProjectId, ClusterBlocks.ProjectBlocks> entry) {
936+
final var projectId = entry.v1();
937+
final var projectBlocks = entry.v2();
938+
if (projectBlocks.isEmpty()) {
939+
return Collections.emptyIterator();
940+
}
941+
return Iterators.concat(
942+
Iterators.single((builder, params) -> builder.startObject().field("id", projectId)),
943+
// write project global blocks in one chunk
944+
projectBlocks.projectGlobals().isEmpty() ? Collections.emptyIterator() : Iterators.single((builder, params) -> {
945+
builder.startObject("project_globals");
946+
for (ClusterBlock block : projectBlocks.projectGlobals()) {
940947
block.toXContent(builder, params);
941948
}
942949
return builder.endObject();
943950
}),
944-
(builder, params) -> builder.endObject().endObject()
951+
// write index blocks for the project
952+
projectBlocks.indices().isEmpty()
953+
? Collections.emptyIterator()
954+
: Iterators.concat(
955+
Iterators.single((builder, params) -> builder.startObject("indices")),
956+
Iterators.flatMap(projectBlocks.indices().entrySet().iterator(), indexBlocks -> Iterators.single((builder, params) -> {
957+
builder.startObject(indexBlocks.getKey());
958+
for (ClusterBlock block : indexBlocks.getValue()) {
959+
block.toXContent(builder, params);
960+
}
961+
return builder.endObject();
962+
})),
963+
Iterators.single((builder, params) -> builder.endObject())
964+
),
965+
Iterators.single((builder, params) -> builder.endObject())
945966
);
946967
}
947968

0 commit comments

Comments
 (0)