Skip to content

Commit 1f656c0

Browse files
authored
Merge branch 'main' into fix/133135-1
2 parents dc8e449 + 0c2d8bb commit 1f656c0

File tree

12 files changed

+126
-129
lines changed

12 files changed

+126
-129
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.yml

Lines changed: 5 additions & 5 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

.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"

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/transport/ValidateTransportVersionResourcesTask.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ public void validateTransportVersions() throws IOException {
8585
for (var upperBound : upperBounds.values()) {
8686
validateUpperBound(upperBound, allDefinitions, idsByBase);
8787
}
88+
89+
validateLargestIdIsUsed(upperBounds, allDefinitions);
8890
}
8991

9092
private Map<String, TransportVersionDefinition> collectAllDefinitions(
@@ -255,6 +257,27 @@ private void validateBase(int base, List<IdAndDefinition> ids) {
255257
}
256258
}
257259

260+
private void validateLargestIdIsUsed(
261+
Map<String, TransportVersionUpperBound> upperBounds,
262+
Map<String, TransportVersionDefinition> allDefinitions
263+
) {
264+
// first id is always the highest within a definition, and validated earlier
265+
// note we use min instead of max because the id comparator is in descending order
266+
var highestDefinition = allDefinitions.values().stream().min(Comparator.comparing(d -> d.ids().get(0))).get();
267+
var highestId = highestDefinition.ids().get(0);
268+
269+
for (var upperBound : upperBounds.values()) {
270+
if (upperBound.id().equals(highestId)) {
271+
return;
272+
}
273+
}
274+
275+
throwDefinitionFailure(
276+
highestDefinition,
277+
"has the highest transport version id [" + highestId + "] but is not present in any upper bounds files"
278+
);
279+
}
280+
258281
private void throwDefinitionFailure(TransportVersionDefinition definition, String message) {
259282
Path relativePath = getResources().get().getReferableDefinitionRepositoryPath(definition);
260283
throw new VerificationException("Transport version definition file [" + relativePath + "] " + message);

0 commit comments

Comments
 (0)