Skip to content

Commit 74e8eb3

Browse files
authored
Merge branch '8.x' into ps250303-cherryPick-elastic#123630
2 parents 508ddf0 + 9f67130 commit 74e8eb3

File tree

64 files changed

+1608
-296
lines changed

Some content is hidden

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

64 files changed

+1608
-296
lines changed

.buildkite/pipelines/intake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ steps:
5656
timeout_in_minutes: 300
5757
matrix:
5858
setup:
59-
BWC_VERSION: ["7.17.29", "8.16.5", "8.17.3", "8.18.0", "8.19.0"]
59+
BWC_VERSION: ["7.17.29", "8.16.5", "8.17.4", "8.18.0", "8.19.0"]
6060
agents:
6161
provider: gcp
6262
image: family/elasticsearch-ubuntu-2004

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,8 @@ steps:
595595
env:
596596
BWC_VERSION: 8.16.5
597597

598-
- label: "{{matrix.image}} / 8.17.3 / packaging-tests-upgrade"
599-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.3
598+
- label: "{{matrix.image}} / 8.17.4 / packaging-tests-upgrade"
599+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.4
600600
timeout_in_minutes: 300
601601
matrix:
602602
setup:
@@ -609,7 +609,7 @@ steps:
609609
machineType: custom-16-32768
610610
buildDirectory: /dev/shm/bk
611611
env:
612-
BWC_VERSION: 8.17.3
612+
BWC_VERSION: 8.17.4
613613

614614
- label: "{{matrix.image}} / 8.18.0 / packaging-tests-upgrade"
615615
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.18.0

.buildkite/pipelines/periodic.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,8 @@ steps:
667667
- signal_reason: agent_stop
668668
limit: 3
669669

670-
- label: 8.17.3 / bwc
671-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.3#bwcTest
670+
- label: 8.17.4 / bwc
671+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.4#bwcTest
672672
timeout_in_minutes: 300
673673
agents:
674674
provider: gcp
@@ -677,7 +677,7 @@ steps:
677677
buildDirectory: /dev/shm/bk
678678
preemptible: true
679679
env:
680-
BWC_VERSION: 8.17.3
680+
BWC_VERSION: 8.17.4
681681
retry:
682682
automatic:
683683
- exit_status: "-1"
@@ -790,7 +790,7 @@ steps:
790790
setup:
791791
ES_RUNTIME_JAVA:
792792
- openjdk17
793-
BWC_VERSION: ["7.17.29", "8.16.5", "8.17.3", "8.18.0", "8.19.0"]
793+
BWC_VERSION: ["7.17.29", "8.16.5", "8.17.4", "8.18.0", "8.19.0"]
794794
agents:
795795
provider: gcp
796796
image: family/elasticsearch-ubuntu-2004
@@ -838,7 +838,7 @@ steps:
838838
- openjdk21
839839
- openjdk22
840840
- openjdk23
841-
BWC_VERSION: ["7.17.29", "8.16.5", "8.17.3", "8.18.0", "8.19.0"]
841+
BWC_VERSION: ["7.17.29", "8.16.5", "8.17.4", "8.18.0", "8.19.0"]
842842
agents:
843843
provider: gcp
844844
image: family/elasticsearch-ubuntu-2004

.ci/bwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ BWC_VERSION:
3434
- "8.14.3"
3535
- "8.15.5"
3636
- "8.16.5"
37-
- "8.17.3"
37+
- "8.17.4"
3838
- "8.18.0"
3939
- "8.19.0"

.ci/snapshotBwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BWC_VERSION:
22
- "7.17.29"
33
- "8.16.5"
4-
- "8.17.3"
4+
- "8.17.4"
55
- "8.18.0"
66
- "8.19.0"

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

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,55 @@ import org.gradle.testkit.runner.TaskOutcome
1414

1515
class ElasticsearchTestBasePluginFuncTest extends AbstractGradleFuncTest {
1616

17-
def setup() {
18-
// see https://github.com/gradle/gradle/issues/24172
19-
configurationCacheCompatible = false
17+
def "can disable assertions via cmdline param"() {
18+
given:
19+
file("src/test/java/acme/SomeTests.java").text = """
20+
public class SomeTests {
21+
@org.junit.Test
22+
public void testAsserts() {
23+
assert false;
24+
}
25+
}
26+
"""
27+
buildFile.text = """
28+
plugins {
29+
id 'java'
30+
id 'elasticsearch.test-base'
31+
}
32+
33+
repositories {
34+
mavenCentral()
35+
}
36+
37+
dependencies {
38+
testImplementation 'junit:junit:4.12'
39+
}
40+
"""
41+
42+
when:
43+
def result = gradleRunner("test").buildAndFail()
44+
then:
45+
result.task(':test').outcome == TaskOutcome.FAILED
46+
47+
when:
48+
result = gradleRunner("test", "-Dtests.asserts=false").build()
49+
then:
50+
result.task(':test').outcome == TaskOutcome.SUCCESS
51+
52+
when:
53+
result = gradleRunner("test", "-Dtests.jvm.argline=-da").build()
54+
then:
55+
result.task(':test').outcome == TaskOutcome.SUCCESS
56+
57+
when:
58+
result = gradleRunner("test", "-Dtests.jvm.argline=-disableassertions").build()
59+
then:
60+
result.task(':test').outcome == TaskOutcome.SUCCESS
61+
62+
when:
63+
result = gradleRunner("test", "-Dtests.asserts=false", "-Dtests.jvm.argline=-da").build()
64+
then:
65+
result.task(':test').outcome == TaskOutcome.SUCCESS
2066
}
2167

2268
def "can configure nonInputProperties for test tasks"() {

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,15 @@ public void execute(Task t) {
137137
test.jvmArgs((Object[]) argline.split(" "));
138138
}
139139

140-
if (Util.getBooleanProperty("tests.asserts", true)) {
141-
test.jvmArgs("-ea", "-esa");
140+
// Check if "tests.asserts" is false or "tests.jvm.argline" contains the "-da" flag.
141+
boolean disableAssertions = Util.getBooleanProperty("tests.asserts", true) == false
142+
|| (argline != null && (argline.contains("-da")))
143+
|| (argline != null && (argline.contains("-disableassertions")));
144+
145+
if (disableAssertions) {
146+
System.out.println("disable assertions");
147+
test.setEnableAssertions(false);
142148
}
143-
144149
Map<String, String> sysprops = Map.of(
145150
"java.awt.headless",
146151
"true",

docs/changelog/120952.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/changelog/121911.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/changelog/122011.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)