Skip to content

Commit dfd2097

Browse files
Merge branch 'main' into release-notes-9-1-5
2 parents 68e539c + 254e1f5 commit dfd2097

File tree

103 files changed

+3658
-2956
lines changed

Some content is hidden

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

103 files changed

+3658
-2956
lines changed

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

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,12 @@
3838
import java.io.FileNotFoundException;
3939
import java.io.IOException;
4040
import java.io.OutputStream;
41+
import java.io.UncheckedIOException;
42+
import java.nio.file.FileVisitResult;
4143
import java.nio.file.Files;
4244
import java.nio.file.Path;
45+
import java.nio.file.SimpleFileVisitor;
46+
import java.nio.file.attribute.BasicFileAttributes;
4347
import java.util.ArrayList;
4448
import java.util.Arrays;
4549
import java.util.List;
@@ -66,7 +70,7 @@ public void apply(Project target) {
6670
? System.getenv("BUILD_NUMBER")
6771
: System.getenv("BUILDKITE_BUILD_NUMBER");
6872
String performanceTest = System.getenv("BUILD_PERFORMANCE_TEST");
69-
if (buildNumber != null && performanceTest == null && GradleUtils.isIncludedBuild(target) == false && OS.current() != OS.WINDOWS) {
73+
if (buildNumber != null && performanceTest == null && GradleUtils.isIncludedBuild(target) == false) {
7074
File targetFile = calculateTargetFile(target, buildNumber);
7175
File projectDir = target.getProjectDir();
7276
File gradleWorkersDir = new File(target.getGradle().getGradleUserHomeDir(), "workers/");
@@ -102,6 +106,23 @@ private File calculateTargetFile(Project target, String buildNumber) {
102106
}
103107

104108
private List<File> resolveProjectLogs(File projectDir) {
109+
// HACK: Some tests leave behind symlinks, and gradle throws an exception if it encounters symlinks.
110+
// Here we remove them before collecting logs to upload. We could instead build our own path matcher
111+
// but that seemed more complex than just deleting the irrelevant files.
112+
try {
113+
Files.walkFileTree(projectDir.toPath(), new SimpleFileVisitor<>() {
114+
@Override
115+
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
116+
if (Files.isSymbolicLink(file)) {
117+
Files.delete(file);
118+
}
119+
return FileVisitResult.CONTINUE;
120+
}
121+
});
122+
} catch (IOException e) {
123+
throw new UncheckedIOException(e);
124+
}
125+
105126
var projectDirFiles = getFileOperations().fileTree(projectDir);
106127
projectDirFiles.include("**/*.hprof");
107128
projectDirFiles.include("**/build/reports/configuration-cache/**");
@@ -276,7 +297,12 @@ private static void createBuildArchiveTar(List<File> files, File projectDir, Fil
276297

277298
@NotNull
278299
private static String calculateArchivePath(Path path, Path projectPath) {
279-
return path.startsWith(projectPath) ? projectPath.relativize(path).toString() : path.getFileName().toString();
300+
String archivePath = path.startsWith(projectPath) ? projectPath.relativize(path).toString() : path.getFileName().toString();
301+
if (OS.current() == OS.WINDOWS) {
302+
// tar always uses forward slashes
303+
archivePath = archivePath.replace("\\", "/");
304+
}
305+
return archivePath;
280306
}
281307
}
282308
}

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
@@ -22,9 +22,11 @@ public static TransportVersionDefinition fromString(Path file, String contents,
2222

2323
String idsLine = null;
2424
if (contents.isEmpty() == false) {
25-
String[] lines = contents.split(System.lineSeparator());
25+
// Regardless of whether windows newlines exist (they could be added by git), we split on line feed.
26+
// All we care about skipping lines with the comment character, so the remaining \r won't matter
27+
String[] lines = contents.split("\n");
2628
for (String line : lines) {
27-
line = line.replaceAll("\\s+", "");
29+
line = line.strip();
2830
if (line.startsWith("#") == false) {
2931
idsLine = line;
3032
break;

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ public static TransportVersionUpperBound fromString(Path file, String contents)
2424
String branch = filename.substring(slashIndex == -1 ? 0 : (slashIndex + 1), filename.length() - 4);
2525

2626
String idsLine = null;
27-
String[] lines = contents.split(System.lineSeparator());
27+
// Regardless of whether windows newlines exist (they could be added by git), we split on line feed.
28+
// All we care about skipping lines with the comment character, so the remaining \r won't matter
29+
String[] lines = contents.split("\n");
2830
for (String line : lines) {
29-
line = line.replaceAll("\\s+", "");
31+
line = line.strip();
3032
if (line.startsWith("#") == false) {
3133
idsLine = line;
3234
break;

docs/changelog/134361.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 134361
2+
summary: Add `ThreadWatchdog` to `ClusterApplierService`
3+
area: Cluster Coordination
4+
type: enhancement
5+
issues: []

docs/changelog/135644.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 135644
2+
summary: Add small optimizations to `PUT _component_template` API
3+
area: Indices APIs
4+
type: enhancement
5+
issues: []

docs/changelog/135897.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 135897
2+
summary: Apply source excludes early when retrieving the `_inference_fields`
3+
area: Search
4+
type: bug
5+
issues: []

docs/changelog/135901.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 135901
2+
summary: Add support for dot-separated attribute names (e.g. `foo.bar`) and for parameters (e.g. `??my_param`) in FUSE GROUP BY
3+
area: ES|QL
4+
type: bug
5+
issues: []

docs/changelog/135987.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 135987
2+
summary: Avoid rewrite `round_to` with expensive queries
3+
area: ES|QL
4+
type: bug
5+
issues: []

docs/reference/elasticsearch/index-lifecycle-actions/ilm-downsample.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mapped_pages:
77

88
Phases allowed: hot, warm, cold.
99

10-
Aggregates a time series (TSDS) index and stores pre-computed statistical summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each metric field grouped by a configured time interval. For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index. All documents within an hour interval are summarized and stored as a single document and stored in the downsample index.
10+
Aggregates a time series (TSDS) index and stores pre-computed statistical summaries (`min`, `max`, `sum`, and `value_count`) for each metric field grouped by a configured time interval. For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index. All documents within an hour interval are summarized and stored as a single document and stored in the downsample index.
1111

1212
This action corresponds to the [downsample API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-downsample).
1313

docs/reference/search-connectors/es-connectors-gmail.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ To get started, log into [Google Cloud Platform](https://cloud.google.com) and g
132132
You need to grant the following **OAuth Scopes** to your service account:
133133

134134
* `https://www.googleapis.com/auth/admin.directory.user.readonly`
135+
* `https://www.googleapis.com/auth/admin.directory.group.readonly`
136+
* `https://www.googleapis.com/auth/gmail.readonly`
135137

136138
This step allows the connector to access user data and their group memberships in your Google Workspace organization.
137139

@@ -296,4 +298,4 @@ See [Security](/reference/search-connectors/es-connectors-security.md).
296298

297299
This connector is built in Python with the [Elastic connector framework](https://github.com/elastic/connectors/tree/main).
298300

299-
View the [source code for this connector](https://github.com/elastic/connectors/tree/main/connectors/sources/gmail.py) (branch *main*, compatible with Elastic *9.0*).
301+
View the [source code for this connector](https://github.com/elastic/connectors/tree/main/connectors/sources/gmail.py) (branch *main*, compatible with Elastic *9.0*).

0 commit comments

Comments
 (0)