Skip to content

Commit b902ae3

Browse files
authored
Merge branch '9.0' into backport/9.0/pr-133526
2 parents cb2c2ac + c30fb79 commit b902ae3

File tree

69 files changed

+822
-436
lines changed

Some content is hidden

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

69 files changed

+822
-436
lines changed

.backportrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"targetBranchChoices" : [ "main", "9.0", "8.18", "8.17", "8.16", "8.15", "8.14", "8.13", "8.12", "8.11", "8.10", "8.9", "8.8", "8.7", "8.6", "8.5", "8.4", "8.3", "8.2", "8.1", "8.0", "7.17", "6.8" ],
44
"targetPRLabels" : [ "backport" ],
55
"branchLabelMapping" : {
6-
"^v9.0.6$" : "main",
6+
"^v9.0.7$" : "main",
77
"^v(\\d+).(\\d+).\\d+(?:-(?:alpha|beta|rc)\\d+)?$" : "$1.$2"
88
}
99
}

.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: ["8.17.10", "8.18.6", "9.0.6"]
59+
BWC_VERSION: ["8.18.7", "9.0.7"]
6060
agents:
6161
provider: gcp
6262
image: family/elasticsearch-ubuntu-2404

.buildkite/pipelines/periodic-fwc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ steps:
1010
buildDirectory: /dev/shm/bk
1111
matrix:
1212
setup:
13-
FWC_VERSION: ["9.0.0", "9.0.1", "9.0.2", "9.0.3", "9.0.4", "9.0.5"]
13+
FWC_VERSION: ["9.0.0", "9.0.1", "9.0.2", "9.0.3", "9.0.4", "9.0.5", "9.0.6"]
1414
env:
1515
FWC_VERSION: $FWC_VERSION

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ steps:
318318
env:
319319
BWC_VERSION: 8.17.10
320320

321-
- label: "{{matrix.image}} / 8.18.6 / packaging-tests-upgrade"
322-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.18.6
321+
- label: "{{matrix.image}} / 8.18.7 / packaging-tests-upgrade"
322+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.18.7
323323
timeout_in_minutes: 300
324324
matrix:
325325
setup:
@@ -332,10 +332,10 @@ steps:
332332
machineType: custom-16-32768
333333
buildDirectory: /dev/shm/bk
334334
env:
335-
BWC_VERSION: 8.18.6
335+
BWC_VERSION: 8.18.7
336336

337-
- label: "{{matrix.image}} / 9.0.6 / packaging-tests-upgrade"
338-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.0.6
337+
- label: "{{matrix.image}} / 9.0.7 / packaging-tests-upgrade"
338+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.0.7
339339
timeout_in_minutes: 300
340340
matrix:
341341
setup:
@@ -348,7 +348,7 @@ steps:
348348
machineType: custom-16-32768
349349
buildDirectory: /dev/shm/bk
350350
env:
351-
BWC_VERSION: 9.0.6
351+
BWC_VERSION: 9.0.7
352352

353353
- group: packaging-tests-windows
354354
steps:

.buildkite/pipelines/periodic.template.yml

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

.buildkite/pipelines/periodic.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ steps:
344344
- signal_reason: agent_stop
345345
limit: 3
346346

347-
- label: 8.18.6 / bwc
348-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.18.6#bwcTest
347+
- label: 8.18.7 / bwc
348+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.18.7#bwcTest
349349
timeout_in_minutes: 300
350350
agents:
351351
provider: gcp
@@ -354,7 +354,7 @@ steps:
354354
buildDirectory: /dev/shm/bk
355355
preemptible: true
356356
env:
357-
BWC_VERSION: 8.18.6
357+
BWC_VERSION: 8.18.7
358358
retry:
359359
automatic:
360360
- exit_status: "-1"
@@ -363,8 +363,8 @@ steps:
363363
- signal_reason: agent_stop
364364
limit: 3
365365

366-
- label: 9.0.6 / bwc
367-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.0.6#bwcTest
366+
- label: 9.0.7 / bwc
367+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.0.7#bwcTest
368368
timeout_in_minutes: 300
369369
agents:
370370
provider: gcp
@@ -373,7 +373,7 @@ steps:
373373
buildDirectory: /dev/shm/bk
374374
preemptible: true
375375
env:
376-
BWC_VERSION: 9.0.6
376+
BWC_VERSION: 9.0.7
377377
retry:
378378
automatic:
379379
- exit_status: "-1"
@@ -448,7 +448,7 @@ steps:
448448
setup:
449449
ES_RUNTIME_JAVA:
450450
- openjdk21
451-
BWC_VERSION: ["8.17.10", "8.18.6", "9.0.6"]
451+
BWC_VERSION: ["8.18.7", "9.0.7"]
452452
agents:
453453
provider: gcp
454454
image: family/elasticsearch-ubuntu-2404
@@ -490,7 +490,7 @@ steps:
490490
ES_RUNTIME_JAVA:
491491
- openjdk21
492492
- openjdk23
493-
BWC_VERSION: ["8.17.10", "8.18.6", "9.0.6"]
493+
BWC_VERSION: ["8.18.7", "9.0.7"]
494494
agents:
495495
provider: gcp
496496
image: family/elasticsearch-ubuntu-2404
@@ -613,7 +613,7 @@ steps:
613613
image: family/elasticsearch-ubuntu-2404
614614
machineType: n2-standard-8
615615
buildDirectory: /dev/shm/bk
616-
if: build.branch == "main" || build.branch == "9.1" || build.branch == "9.0" || build.branch == "8.19" || build.branch == "8.18" || build.branch == "7.17"
616+
if: build.branch =~ /^(main|\d+\.\d+|\d+\.x)$/
617617
- label: check-branch-consistency
618618
command: .ci/scripts/run-gradle.sh branchConsistency
619619
timeout_in_minutes: 15

.ci/bwcVersions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ BWC_VERSION:
1717
- "8.15.5"
1818
- "8.16.6"
1919
- "8.17.10"
20-
- "8.18.6"
21-
- "9.0.6"
20+
- "8.18.7"
21+
- "9.0.7"

.ci/snapshotBwcVersions

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
BWC_VERSION:
2-
- "8.17.10"
3-
- "8.18.6"
4-
- "9.0.6"
2+
- "8.18.7"
3+
- "9.0.7"

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
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
package org.elasticsearch.gradle.internal;
11+
12+
import org.gradle.api.Project;
13+
import org.gradle.api.provider.Provider;
14+
import org.gradle.api.provider.ProviderFactory;
15+
import org.gradle.api.services.BuildService;
16+
import org.gradle.api.services.BuildServiceParameters;
17+
18+
import java.util.Collection;
19+
import java.util.HashMap;
20+
import java.util.Map;
21+
22+
import javax.inject.Inject;
23+
24+
public abstract class ProjectSubscribeBuildService implements BuildService<BuildServiceParameters.None> {
25+
26+
private final ProviderFactory providerFactory;
27+
28+
/**
29+
* The filling of this map depends on the order of #registerProjectForTopic being called.
30+
* This is usually done during configuration phase, but we do not enforce yet the time of this method call.
31+
* The values are LinkedHashSet to preserve the order of registration mostly to provide a predicatable order
32+
* when running consecutive builds.
33+
* */
34+
private final Map<String, Collection<String>> versionsByTopic = new HashMap<>();
35+
36+
@Inject
37+
public ProjectSubscribeBuildService(ProviderFactory providerFactory) {
38+
this.providerFactory = providerFactory;
39+
}
40+
41+
/**
42+
* Returning a provider so the evaluation of the map value is deferred to when the provider is queried.
43+
* */
44+
public Provider<Collection<String>> getProjectsByTopic(String topic) {
45+
return providerFactory.provider(() -> versionsByTopic.computeIfAbsent(topic, k -> new java.util.LinkedHashSet<>()));
46+
}
47+
48+
public void registerProjectForTopic(String topic, Project project) {
49+
versionsByTopic.computeIfAbsent(topic, k -> new java.util.LinkedHashSet<>()).add(project.getPath());
50+
}
51+
}

0 commit comments

Comments
 (0)