Skip to content

Commit 31abe50

Browse files
authored
Merge branch 'main' into entitlements/java_xml
2 parents ee6b5e8 + 3b25b97 commit 31abe50

File tree

80 files changed

+1766
-622
lines changed

Some content is hidden

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

80 files changed

+1766
-622
lines changed

.buildkite/pipelines/intake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ steps:
6565
timeout_in_minutes: 300
6666
matrix:
6767
setup:
68-
BWC_VERSION: ["8.18.7", "8.19.4", "9.0.7", "9.1.3", "9.2.0"]
68+
BWC_VERSION: ["8.18.7", "8.19.4", "9.0.7", "9.1.4", "9.2.0"]
6969
agents:
7070
provider: gcp
7171
image: family/elasticsearch-ubuntu-2404

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ steps:
366366
env:
367367
BWC_VERSION: 9.0.7
368368

369-
- label: "{{matrix.image}} / 9.1.3 / packaging-tests-upgrade"
370-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.3
369+
- label: "{{matrix.image}} / 9.1.4 / packaging-tests-upgrade"
370+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.4
371371
timeout_in_minutes: 300
372372
matrix:
373373
setup:
@@ -380,7 +380,7 @@ steps:
380380
machineType: custom-16-32768
381381
buildDirectory: /dev/shm/bk
382382
env:
383-
BWC_VERSION: 9.1.3
383+
BWC_VERSION: 9.1.4
384384

385385
- label: "{{matrix.image}} / 9.2.0 / packaging-tests-upgrade"
386386
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.2.0

.buildkite/pipelines/periodic.template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ steps:
246246
image: family/elasticsearch-ubuntu-2404
247247
machineType: n2-standard-8
248248
buildDirectory: /dev/shm/bk
249-
if: build.branch == "main" || build.branch == "9.1" || build.branch == "9.0" || build.branch == "8.19" || build.branch == "8.18" || build.branch == "7.17"
249+
if: build.branch =~ /^(main|\d+\.\d+|\d+\.x)$/
250250
- label: check-branch-consistency
251251
command: .ci/scripts/run-gradle.sh branchConsistency
252252
timeout_in_minutes: 15

.buildkite/pipelines/periodic.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ steps:
401401
- signal_reason: agent_stop
402402
limit: 3
403403

404-
- label: 9.1.3 / bwc
405-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.1.3#bwcTest
404+
- label: 9.1.4 / bwc
405+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.1.4#bwcTest
406406
timeout_in_minutes: 300
407407
agents:
408408
provider: gcp
@@ -411,7 +411,7 @@ steps:
411411
buildDirectory: /dev/shm/bk
412412
preemptible: true
413413
env:
414-
BWC_VERSION: 9.1.3
414+
BWC_VERSION: 9.1.4
415415
retry:
416416
automatic:
417417
- exit_status: "-1"
@@ -506,7 +506,7 @@ steps:
506506
setup:
507507
ES_RUNTIME_JAVA:
508508
- openjdk21
509-
BWC_VERSION: ["8.18.7", "8.19.4", "9.0.7", "9.1.3", "9.2.0"]
509+
BWC_VERSION: ["8.18.7", "8.19.4", "9.0.7", "9.1.4", "9.2.0"]
510510
agents:
511511
provider: gcp
512512
image: family/elasticsearch-ubuntu-2404
@@ -550,7 +550,7 @@ steps:
550550
ES_RUNTIME_JAVA:
551551
- openjdk21
552552
- openjdk23
553-
BWC_VERSION: ["8.18.7", "8.19.4", "9.0.7", "9.1.3", "9.2.0"]
553+
BWC_VERSION: ["8.18.7", "8.19.4", "9.0.7", "9.1.4", "9.2.0"]
554554
agents:
555555
provider: gcp
556556
image: family/elasticsearch-ubuntu-2404
@@ -684,7 +684,7 @@ steps:
684684
image: family/elasticsearch-ubuntu-2404
685685
machineType: n2-standard-8
686686
buildDirectory: /dev/shm/bk
687-
if: build.branch == "main" || build.branch == "9.1" || build.branch == "9.0" || build.branch == "8.19" || build.branch == "8.18" || build.branch == "7.17"
687+
if: build.branch =~ /^(main|\d+\.\d+|\d+\.x)$/
688688
- label: check-branch-consistency
689689
command: .ci/scripts/run-gradle.sh branchConsistency
690690
timeout_in_minutes: 15

.ci/bwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ BWC_VERSION:
2020
- "8.18.7"
2121
- "8.19.4"
2222
- "9.0.7"
23-
- "9.1.3"
23+
- "9.1.4"
2424
- "9.2.0"

.ci/snapshotBwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ BWC_VERSION:
22
- "8.18.7"
33
- "8.19.4"
44
- "9.0.7"
5-
- "9.1.3"
5+
- "9.1.4"
66
- "9.2.0"

BUILDING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,23 +186,23 @@ dependencies {
186186

187187
To test an unreleased development version of a third party dependency you have several options.
188188

189-
### How do I test against java early access (ea) versions?
189+
### How do I test against java pre-release versions like early access (ea) or release candidates (rc)?
190190

191191
Currently only openjdk EA builds by oracle are supported.
192192
To test against an early access version java version you can pass the major
193-
java version appended with `-ea` as a system property (e.g. -Druntime.java=26-ea) to the Gradle build:
193+
java version appended with `-pre` as a system property (e.g. -Druntime.java=26-pre) to the Gradle build:
194194

195195
```
196-
./gradlew clean test -Druntime.java=26-ea
196+
./gradlew clean test -Druntime.java=26-pre
197197
```
198198

199-
This will run the tests using the JDK 26 EA version and pick the latest available build of the matching JDK EA version we expose
200-
in our custom jdk catalogue at `https://storage.googleapis.com/elasticsearch-jdk-archive/jdks/openjdk/latest.json`.
199+
This will run the tests using the JDK 26 pre-release version and pick the latest available build of the matching JDK EA version we expose
200+
in our custom jdk catalogue at `https://builds.es-jdk-archive.com/jdks/openjdk/recent.json`.
201201

202202
To run against a specific build number of the EA build you can pass a second system property (e.g. `-Druntime.java.build=6`):
203203

204204
```
205-
./gradlew clean test -Druntime.java=26-ea -Druntime.java.build=6
205+
./gradlew clean test -Druntime.java=26-pre -Druntime.java.build=6
206206
```
207207

208208
#### How to use a Maven based third party dependency via `mavenlocal`?

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

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,33 @@ class TransportVersionValidationFuncTest extends AbstractTransportVersionFuncTes
223223

224224
def "unreferable definitions can have primary ids that are patches"() {
225225
given:
226-
unreferableTransportVersion("initial_10.0.1", "10000001")
226+
unreferableTransportVersion("initial_7.0.1", "7000001")
227227
when:
228228
def result = gradleRunner(":myserver:validateTransportVersionResources").build()
229229
then:
230230
result.task(":myserver:validateTransportVersionResources").outcome == TaskOutcome.SUCCESS
231231
}
232+
233+
def "highest id in an referable definition should exist in an upper bounds file"() {
234+
given:
235+
referableAndReferencedTransportVersion("some_tv", "10000000")
236+
when:
237+
def result = validateResourcesFails()
238+
then:
239+
assertValidateResourcesFailure(result, "Transport version definition file " +
240+
"[myserver/src/main/resources/transport/definitions/referable/some_tv.csv] " +
241+
"has the highest transport version id [10000000] but is not present in any upper bounds files")
242+
}
243+
244+
def "highest id in an unreferable definition should exist in an upper bounds file"() {
245+
given:
246+
unreferableTransportVersion("initial_10.0.0", "10000000")
247+
when:
248+
def result = validateResourcesFails()
249+
then:
250+
// TODO: this should be _unreferable_ in the error message, but will require some rework
251+
assertValidateResourcesFailure(result, "Transport version definition file " +
252+
"[myserver/src/main/resources/transport/definitions/referable/initial_10.0.0.csv] " +
253+
"has the highest transport version id [10000000] but is not present in any upper bounds files")
254+
}
232255
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class Jdk implements Buildable, Iterable<File> {
3232
"(\\d+)(\\.\\d+\\.\\d+(?:\\.\\d+)?)?\\+(\\d+(?:\\.\\d+)?)(@([a-f0-9]{32}))?"
3333
);
3434
private static final Pattern LEGACY_VERSION_PATTERN = Pattern.compile("(\\d)(u\\d+)\\+(b\\d+?)(@([a-f0-9]{32}))?");
35-
private static final Pattern EA_VERSION_PATTERN = Pattern.compile("(\\d+)-ea\\+(\\d+)(@([a-f0-9]{32}))?");
35+
private static final Pattern EA_VERSION_PATTERN = Pattern.compile("(\\d+)-(?:ea|rc)\\+(\\d+)(@([a-f0-9]{32}))?");
3636

3737
private final String name;
3838
private final FileCollection configuration;

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

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -114,33 +114,40 @@ private void setupRepository(Project project, Jdk jdk) {
114114
+ jdk.getBuild()
115115
+ "/[module]/[classifier]/jdk/hotspot/normal/adoptium";
116116
}
117-
} else if (jdk.getVendor().equals(VENDOR_OPENJDK) && "ea".equals(jdk.getDistributionVersion())) {
118-
repoUrl = "https://builds.es-jdk-archive.com/";
119-
// current pattern since 12.0.1
120-
artifactPattern = "jdks/openjdk/"
121-
+ jdk.getMajor()
122-
+ "/openjdk-"
123-
+ jdk.getBaseVersion()
124-
+ "/"
125-
+ "openjdk-[revision]_[module]-[classifier]_bin.[ext]";
126117
} else if (jdk.getVendor().equals(VENDOR_OPENJDK)) {
127-
repoUrl = "https://download.oracle.com";
128-
if (jdk.getHash() != null) {
118+
if ("ea".equals(jdk.getDistributionVersion())) {
119+
repoUrl = "https://builds.es-jdk-archive.com/";
129120
// current pattern since 12.0.1
130-
artifactPattern = "java/GA/jdk"
131-
+ jdk.getBaseVersion()
132-
+ "/"
133-
+ jdk.getHash()
134-
+ "/"
135-
+ jdk.getBuild()
136-
+ "/GPL/openjdk-[revision]_[module]-[classifier]_bin.[ext]";
137-
} else {
138-
// simpler legacy pattern from JDK 9 to JDK 12 that we are advocating to Oracle to bring back
139-
artifactPattern = "java/GA/jdk"
121+
artifactPattern = "jdks/openjdk/"
140122
+ jdk.getMajor()
141-
+ "/"
142-
+ jdk.getBuild()
143-
+ "/GPL/openjdk-[revision]_[module]-[classifier]_bin.[ext]";
123+
+ "/openjdk-[revision]/openjdk-[revision]_[module]-[classifier]_bin.[ext]";
124+
} else if ("rc".equals(jdk.getDistributionVersion())) {
125+
repoUrl = "https://builds.es-jdk-archive.com/";
126+
// current pattern since 12.0.1
127+
artifactPattern = "jdks/openjdk/"
128+
+ jdk.getMajor()
129+
+ "/openjdk-[revision]/openjdk-"
130+
+ jdk.getMajor()
131+
+ "_[module]-[classifier]_bin.[ext]";
132+
} else {
133+
repoUrl = "https://download.oracle.com";
134+
if (jdk.getHash() != null) {
135+
// current pattern since 12.0.1
136+
artifactPattern = "java/GA/jdk"
137+
+ jdk.getBaseVersion()
138+
+ "/"
139+
+ jdk.getHash()
140+
+ "/"
141+
+ jdk.getBuild()
142+
+ "/GPL/openjdk-[revision]_[module]-[classifier]_bin.[ext]";
143+
} else {
144+
// simpler legacy pattern from JDK 9 to JDK 12 that we are advocating to Oracle to bring back
145+
artifactPattern = "java/GA/jdk"
146+
+ jdk.getMajor()
147+
+ "/"
148+
+ jdk.getBuild()
149+
+ "/GPL/openjdk-[revision]_[module]-[classifier]_bin.[ext]";
150+
}
144151
}
145152
} else if (jdk.getVendor().equals(VENDOR_ZULU)) {
146153
repoUrl = "https://cdn.azul.com";

0 commit comments

Comments
 (0)