Skip to content

Commit 19d1a5a

Browse files
Merge branch 'main' into take-date-nanos-implicit-casting-out-of-snapshot
2 parents 9ad4ca3 + 35ee644 commit 19d1a5a

File tree

152 files changed

+4741
-672
lines changed

Some content is hidden

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

152 files changed

+4741
-672
lines changed

benchmarks/src/main/java/org/elasticsearch/benchmark/_nightly/esql/ValuesSourceReaderBenchmark.java

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,26 @@ static void selfTest() {
142142
private static List<ValuesSourceReaderOperator.FieldInfo> fields(String name) {
143143
return switch (name) {
144144
case "3_stored_keywords" -> List.of(
145-
new ValuesSourceReaderOperator.FieldInfo("keyword_1", ElementType.BYTES_REF, shardIdx -> blockLoader("stored_keyword_1")),
146-
new ValuesSourceReaderOperator.FieldInfo("keyword_2", ElementType.BYTES_REF, shardIdx -> blockLoader("stored_keyword_2")),
147-
new ValuesSourceReaderOperator.FieldInfo("keyword_3", ElementType.BYTES_REF, shardIdx -> blockLoader("stored_keyword_3"))
145+
new ValuesSourceReaderOperator.FieldInfo(
146+
"keyword_1",
147+
ElementType.BYTES_REF,
148+
false,
149+
shardIdx -> blockLoader("stored_keyword_1")
150+
),
151+
new ValuesSourceReaderOperator.FieldInfo(
152+
"keyword_2",
153+
ElementType.BYTES_REF,
154+
false,
155+
shardIdx -> blockLoader("stored_keyword_2")
156+
),
157+
new ValuesSourceReaderOperator.FieldInfo(
158+
"keyword_3",
159+
ElementType.BYTES_REF,
160+
false,
161+
shardIdx -> blockLoader("stored_keyword_3")
162+
)
148163
);
149-
default -> List.of(new ValuesSourceReaderOperator.FieldInfo(name, elementType(name), shardIdx -> blockLoader(name)));
164+
default -> List.of(new ValuesSourceReaderOperator.FieldInfo(name, elementType(name), false, shardIdx -> blockLoader(name)));
150165
};
151166
}
152167

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/RestrictedBuildApiService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
5656
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:third-party:jira");
5757
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:third-party:pagerduty");
5858
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:third-party:slack");
59-
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:downsample:qa:with-security");
6059
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:ent-search:qa:rest");
6160
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:eql:qa:ccs-rolling-upgrade");
6261
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:eql:qa:correctness");

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/transport/TransportVersionDefinition.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99

1010
package org.elasticsearch.gradle.internal.transport;
1111

12+
import java.nio.file.Path;
1213
import java.util.ArrayList;
1314
import java.util.List;
1415

1516
record TransportVersionDefinition(String name, List<TransportVersionId> ids) {
16-
public static TransportVersionDefinition fromString(String filename, String contents) {
17+
public static TransportVersionDefinition fromString(Path file, String contents) {
18+
String filename = file.getFileName().toString();
1719
assert filename.endsWith(".csv");
1820
String name = filename.substring(0, filename.length() - 4);
1921
List<TransportVersionId> ids = new ArrayList<>();
@@ -23,7 +25,7 @@ public static TransportVersionDefinition fromString(String filename, String cont
2325
try {
2426
ids.add(TransportVersionId.fromString(rawId));
2527
} catch (NumberFormatException e) {
26-
throw new IllegalStateException("Failed to parse id " + rawId + " in " + filename, e);
28+
throw new IllegalStateException("Failed to parse id " + rawId + " in " + file, e);
2729
}
2830
}
2931
}

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/transport/TransportVersionLatest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@
99

1010
package org.elasticsearch.gradle.internal.transport;
1111

12+
import java.nio.file.Path;
13+
1214
record TransportVersionLatest(String branch, String name, TransportVersionId id) {
13-
public static TransportVersionLatest fromString(String filename, String contents) {
15+
public static TransportVersionLatest fromString(Path file, String contents) {
16+
String filename = file.getFileName().toString();
1417
assert filename.endsWith(".csv");
1518
String branch = filename.substring(0, filename.length() - 4);
1619

1720
String[] parts = contents.split(",");
1821
if (parts.length != 2) {
19-
throw new IllegalStateException("Invalid transport version latest file [" + filename + "]: " + contents);
22+
throw new IllegalStateException("Invalid transport version latest file [" + file + "]: " + contents);
2023
}
2124

2225
return new TransportVersionLatest(branch, parts[0], TransportVersionId.fromString(parts[1]));

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/transport/TransportVersionResourcesService.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import org.gradle.process.ExecResult;
1717

1818
import java.io.ByteArrayOutputStream;
19-
import java.io.File;
2019
import java.io.IOException;
2120
import java.nio.charset.StandardCharsets;
2221
import java.nio.file.Files;
@@ -104,7 +103,7 @@ Map<String, TransportVersionDefinition> getNamedDefinitions() throws IOException
104103

105104
/** Get a named definition from main if it exists there, or null otherwise */
106105
TransportVersionDefinition getNamedDefinitionFromMain(String name) {
107-
String resourcePath = getNamedDefinitionRelativePath(name).toString();
106+
Path resourcePath = getNamedDefinitionRelativePath(name);
108107
return getMainFile(resourcePath, TransportVersionDefinition::fromString);
109108
}
110109

@@ -130,7 +129,7 @@ Map<String, TransportVersionDefinition> getUnreferencedDefinitions() throws IOEx
130129

131130
/** Get a named definition from main if it exists there, or null otherwise */
132131
TransportVersionDefinition getUnreferencedDefinitionFromMain(String name) {
133-
String resourcePath = getUnreferencedDefinitionRelativePath(name).toString();
132+
Path resourcePath = getUnreferencedDefinitionRelativePath(name);
134133
return getMainFile(resourcePath, TransportVersionDefinition::fromString);
135134
}
136135

@@ -145,7 +144,7 @@ Map<String, TransportVersionLatest> getLatestByReleaseBranch() throws IOExceptio
145144
try (var stream = Files.list(transportResourcesDir.resolve(LATEST_DIR))) {
146145
for (var latestFile : stream.toList()) {
147146
String contents = Files.readString(latestFile, StandardCharsets.UTF_8).strip();
148-
var latest = TransportVersionLatest.fromString(latestFile.getFileName().toString(), contents);
147+
var latest = TransportVersionLatest.fromString(latestFile, contents);
149148
latests.put(latest.name(), latest);
150149
}
151150
}
@@ -154,7 +153,7 @@ Map<String, TransportVersionLatest> getLatestByReleaseBranch() throws IOExceptio
154153

155154
/** Retrieve the latest transport version for the given release branch on main */
156155
TransportVersionLatest getLatestFromMain(String releaseBranch) {
157-
String resourcePath = getLatestRelativePath(releaseBranch).toString();
156+
Path resourcePath = getLatestRelativePath(releaseBranch);
158157
return getMainFile(resourcePath, TransportVersionLatest::fromString);
159158
}
160159

@@ -174,7 +173,7 @@ private Set<String> getMainResources() {
174173
String output = gitCommand("ls-tree", "--name-only", "-r", "main", ".");
175174

176175
HashSet<String> resources = new HashSet<>();
177-
Collections.addAll(resources, output.split(System.lineSeparator()));
176+
Collections.addAll(resources, output.split("\n")); // git always outputs LF
178177
mainResources.set(resources);
179178
}
180179
}
@@ -188,20 +187,21 @@ private Set<String> getChangedResources() {
188187
String output = gitCommand("diff", "--name-only", "main", ".");
189188

190189
HashSet<String> resources = new HashSet<>();
191-
Collections.addAll(resources, output.split(System.lineSeparator()));
190+
Collections.addAll(resources, output.split("\n")); // git always outputs LF
192191
changedResources.set(resources);
193192
}
194193
}
195194
return changedResources.get();
196195
}
197196

198197
// Read a transport version resource from the main branch, or return null if it doesn't exist on main
199-
private <T> T getMainFile(String resourcePath, BiFunction<String, String, T> parser) {
200-
if (getMainResources().contains(resourcePath) == false) {
198+
private <T> T getMainFile(Path resourcePath, BiFunction<Path, String, T> parser) {
199+
String pathString = resourcePath.toString().replace('\\', '/'); // normalize to forward slash that git uses
200+
if (getMainResources().contains(pathString) == false) {
201201
return null;
202202
}
203203

204-
String content = gitCommand("show", "main:." + File.separator + resourcePath).strip();
204+
String content = gitCommand("show", "main:./" + pathString).strip();
205205
return parser.apply(resourcePath, content);
206206
}
207207

@@ -213,7 +213,7 @@ private static Map<String, TransportVersionDefinition> readDefinitions(Path dir)
213213
try (var definitionsStream = Files.list(dir)) {
214214
for (var definitionFile : definitionsStream.toList()) {
215215
String contents = Files.readString(definitionFile, StandardCharsets.UTF_8).strip();
216-
var definition = TransportVersionDefinition.fromString(definitionFile.getFileName().toString(), contents);
216+
var definition = TransportVersionDefinition.fromString(definitionFile, contents);
217217
definitions.put(definition.name(), definition);
218218
}
219219
}

distribution/docker/src/docker/dockerfiles/cloud_ess_fips/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ RUN <%= retry.loop(package_manager,
110110
" ${package_manager} update && \n" +
111111
" ${package_manager} upgrade && \n" +
112112
" ${package_manager} add --no-cache \n" +
113-
" bash java-cacerts curl libstdc++ libsystemd netcat-openbsd p11-kit p11-kit-trust posix-libc-utils shadow tini unzip zip zstd && \n" +
113+
" bash java-cacerts curl libstdc++ libsystemd netcat-openbsd p11-kit p11-kit-trust posix-libc-utils shadow tini unzip zip zstd wget && \n" +
114114
" rm -rf /var/cache/apk/* "
115115
) %>
116116

distribution/packages/build.gradle

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,6 @@ tasks.register('buildDeb', Deb) {
354354
configure(commonDebConfig('x64'))
355355
}
356356

357-
tasks.named('assemble'){
358-
dependsOn 'buildDeb', 'buildAarch64Deb'
359-
}
360-
361357
Closure commonRpmConfig(String architecture) {
362358
return {
363359
configure(commonPackageConfig('rpm', architecture))
@@ -391,11 +387,6 @@ tasks.register('buildRpm', Rpm) {
391387
configure(commonRpmConfig('x64'))
392388
}
393389

394-
tasks.named('assemble'){
395-
dependsOn 'buildRpm', 'buildAarch64Rpm'
396-
}
397-
398-
399390
Closure dpkgExists = { it -> new File('/bin/dpkg-deb').exists() || new File('/usr/bin/dpkg-deb').exists() || new File('/usr/local/bin/dpkg-deb').exists() }
400391
Closure rpmExists = { it -> new File('/bin/rpm').exists() || new File('/usr/bin/rpm').exists() || new File('/usr/local/bin/rpm').exists() }
401392

@@ -409,6 +400,11 @@ subprojects {
409400

410401
String buildTask = "build${it.name.replaceAll(/-[a-z]/) { it.substring(1).toUpperCase() }.capitalize()}"
411402
ext.buildDist = parent.tasks.named(buildTask)
403+
tasks.named('assemble').configure {
404+
dependsOn buildDist
405+
}
406+
407+
// deprecated here for backwards compatibility of DistroTestPlugin and DistributionDownloadPlugin
412408
artifacts {
413409
'default' buildDist
414410
}

docs/changelog/131317.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
pr: 131317
2+
summary: Don't enable norms for fields of type text when the index mode is LogsDB or TSDB
3+
area: Mapping
4+
type: breaking
5+
issues: []
6+
breaking:
7+
title: Don't enable norms for fields of type text when the index mode is LogsDB or TSDB
8+
area: Mapping
9+
details: "This changes the default behavior for norms on `text` fields in logsdb\
10+
\ and tsdb indices. Prior to this change, norms were enabled by default, with\
11+
\ the option to disable them via manual configurations. After this change, norms\
12+
\ will be disabled by default. Note, because we dont support enabling norms from\
13+
\ a disabled state, users will not be able to enable norms on `text` fields in\
14+
\ logsdb and tsdb indices."
15+
impact: Text fields will no longer be normalized by default in LogsDB and TSDB indicies.
16+
notable: false

docs/changelog/132738.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 132738
2+
summary: Fix `AsyncOperator` status values and add emitted rows
3+
area: ES|QL
4+
type: bug
5+
issues: []

docs/changelog/133134.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 133134
2+
summary: Fix sequences with conditions involving keys and non-keys
3+
area: EQL
4+
type: bug
5+
issues: []

0 commit comments

Comments
 (0)