Skip to content

Commit 11f3439

Browse files
author
elasticsearchmachine
committed
Merge remote-tracking branch 'origin/main' into lucene_snapshot
2 parents 5251daf + c8196d4 commit 11f3439

File tree

41 files changed

+1170
-674
lines changed

Some content is hidden

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

41 files changed

+1170
-674
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
}

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/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/text-analysis/analysis-keep-words-tokenfilter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Either this parameter or `keep_words_path` must be specified.
5151

5252

5353
`keep_words_path`
54-
: (Required*, array of strings) Path to a file that contains a list of words to keep. Only tokens that match words in this list are included in the output.
54+
: (Required*, string) Path to a file that contains a list of words to keep. Only tokens that match words in this list are included in the output.
5555

5656
This path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each word in the file must be separated by a line break.
5757

muted-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,9 @@ tests:
723723
- class: org.elasticsearch.compute.data.BasicPageTests
724724
method: testEqualityAndHashCode
725725
issue: https://github.com/elastic/elasticsearch/issues/135990
726+
- class: org.elasticsearch.xpack.security.CoreWithSecurityClientYamlTestSuiteIT
727+
method: test {yaml=indices.get_sample/10_basic/Test get sample for index with no sample config}
728+
issue: https://github.com/elastic/elasticsearch/issues/135993
726729

727730
# Examples:
728731
#

0 commit comments

Comments
 (0)