Skip to content

Commit 6da9aa2

Browse files
authored
Avoid clobbering shared testcluster JAR files when installing modules (#42879)
1 parent 4ac51bc commit 6da9aa2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.elasticsearch.gradle.FileSupplier;
2424
import org.elasticsearch.gradle.OS;
2525
import org.elasticsearch.gradle.Version;
26+
import org.gradle.api.file.DuplicatesStrategy;
2627
import org.gradle.api.logging.Logger;
2728
import org.gradle.api.logging.Logging;
2829

@@ -398,6 +399,9 @@ private void copyExtraConfigFiles() {
398399
private void installModules() {
399400
if (distribution == Distribution.INTEG_TEST) {
400401
modules.forEach(module -> services.copy(spec -> {
402+
// ensure we don't override any existing JARs, since these are hardlinks other clusters might be using those files
403+
spec.setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE);
404+
401405
if (module.getName().toLowerCase().endsWith(".zip")) {
402406
spec.from(services.zipTree(module));
403407
} else if (module.isDirectory()) {

0 commit comments

Comments
 (0)