Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into fix-template-merging-…
Browse files Browse the repository at this point in the history
…regression
  • Loading branch information
felixbarny committed Mar 8, 2024
2 parents cb28cdb + 49e9333 commit 9c5541a
Show file tree
Hide file tree
Showing 94 changed files with 1,741 additions and 387 deletions.
36 changes: 35 additions & 1 deletion .buildkite/pipelines/periodic.template.yml
Expand Up @@ -49,7 +49,6 @@ steps:
- checkPart1
- checkPart2
- checkPart3
- bwcTestSnapshots
- checkRestCompat
agents:
provider: gcp
Expand All @@ -59,6 +58,22 @@ steps:
env:
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
GRADLE_TASK: "{{matrix.GRADLE_TASK}}"
- label: "{{matrix.ES_RUNTIME_JAVA}} / {{matrix.BWC_VERSION}} / java-fips-matrix-bwc"
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dtests.fips.enabled=true v$$BWC_VERSION#bwcTest
timeout_in_minutes: 300
matrix:
setup:
ES_RUNTIME_JAVA:
- openjdk17
BWC_VERSION: $BWC_LIST
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: n1-standard-32
buildDirectory: /dev/shm/bk
env:
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
BWC_VERSION: "{{matrix.BWC_VERSION}}"
- group: java-matrix
steps:
- label: "{{matrix.ES_RUNTIME_JAVA}} / {{matrix.GRADLE_TASK}} / java-matrix"
Expand All @@ -85,6 +100,25 @@ steps:
env:
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
GRADLE_TASK: "{{matrix.GRADLE_TASK}}"
- label: "{{matrix.ES_RUNTIME_JAVA}} / {{matrix.BWC_VERSION}} / java-matrix-bwc"
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v$$BWC_VERSION#bwcTest
timeout_in_minutes: 300
matrix:
setup:
ES_RUNTIME_JAVA:
- graalvm-ce17
- openjdk17
- openjdk21
- openjdk22
BWC_VERSION: $BWC_LIST
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: n1-standard-32
buildDirectory: /dev/shm/bk
env:
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
BWC_VERSION: "{{matrix.BWC_VERSION}}"
- label: release-tests
command: .buildkite/scripts/release-tests.sh
timeout_in_minutes: 360
Expand Down
36 changes: 35 additions & 1 deletion .buildkite/pipelines/periodic.yml
Expand Up @@ -1230,7 +1230,6 @@ steps:
- checkPart1
- checkPart2
- checkPart3
- bwcTestSnapshots
- checkRestCompat
agents:
provider: gcp
Expand All @@ -1240,6 +1239,22 @@ steps:
env:
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
GRADLE_TASK: "{{matrix.GRADLE_TASK}}"
- label: "{{matrix.ES_RUNTIME_JAVA}} / {{matrix.BWC_VERSION}} / java-fips-matrix-bwc"
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dtests.fips.enabled=true v$$BWC_VERSION#bwcTest
timeout_in_minutes: 300
matrix:
setup:
ES_RUNTIME_JAVA:
- openjdk17
BWC_VERSION: ["7.17.19", "8.12.3", "8.13.0", "8.14.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: n1-standard-32
buildDirectory: /dev/shm/bk
env:
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
BWC_VERSION: "{{matrix.BWC_VERSION}}"
- group: java-matrix
steps:
- label: "{{matrix.ES_RUNTIME_JAVA}} / {{matrix.GRADLE_TASK}} / java-matrix"
Expand All @@ -1266,6 +1281,25 @@ steps:
env:
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
GRADLE_TASK: "{{matrix.GRADLE_TASK}}"
- label: "{{matrix.ES_RUNTIME_JAVA}} / {{matrix.BWC_VERSION}} / java-matrix-bwc"
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v$$BWC_VERSION#bwcTest
timeout_in_minutes: 300
matrix:
setup:
ES_RUNTIME_JAVA:
- graalvm-ce17
- openjdk17
- openjdk21
- openjdk22
BWC_VERSION: ["7.17.19", "8.12.3", "8.13.0", "8.14.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: n1-standard-32
buildDirectory: /dev/shm/bk
env:
ES_RUNTIME_JAVA: "{{matrix.ES_RUNTIME_JAVA}}"
BWC_VERSION: "{{matrix.BWC_VERSION}}"
- label: release-tests
command: .buildkite/scripts/release-tests.sh
timeout_in_minutes: 360
Expand Down
63 changes: 46 additions & 17 deletions build.gradle
Expand Up @@ -64,6 +64,17 @@ ext.testArtifact = { p, String name = "test" ->
};
}

class StepExpansion {
String templatePath
List<Version> versions
String variable
}

class ListExpansion {
List<Version> versions
String variable
}

tasks.register("updateCIBwcVersions") {
def writeVersions = { File file, List<Version> versions ->
file.text = ""
Expand All @@ -73,42 +84,60 @@ tasks.register("updateCIBwcVersions") {
}
}

def writeBuildkiteList = { String outputFilePath, String pipelineTemplatePath, List<Version> versions ->
def writeBuildkitePipeline = { String outputFilePath, String pipelineTemplatePath, List<ListExpansion> listExpansions, List<StepExpansion> stepExpansions = [] ->
def outputFile = file(outputFilePath)
def pipelineTemplate = file(pipelineTemplatePath)

def listString = "[" + versions.collect { "\"${it}\"" }.join(", ") + "]"
outputFile.text = "# This file is auto-generated. See ${pipelineTemplatePath}\n" + pipelineTemplate.text.replaceAll('\\$BWC_LIST', listString)
}
def pipeline = pipelineTemplate.text

def writeBuildkiteSteps = { String outputFilePath, String pipelineTemplatePath, String stepTemplatePath, List<Version> versions ->
def outputFile = file(outputFilePath)
def pipelineTemplate = file(pipelineTemplatePath)
def stepTemplate = file(stepTemplatePath)
listExpansions.each { expansion ->
def listString = "[" + expansion.versions.collect { "\"${it}\"" }.join(", ") + "]"
pipeline = pipeline.replaceAll('\\$' + expansion.variable, listString)
}

def steps = ""
versions.each {
steps += "\n" + stepTemplate.text.replaceAll('\\$BWC_VERSION', it.toString())
stepExpansions.each { expansion ->
def steps = ""
expansion.versions.each {
steps += "\n" + file(expansion.templatePath).text.replaceAll('\\$BWC_VERSION', it.toString())
}
pipeline = pipeline.replaceAll(' *\\$' + expansion.variable, steps)
}

outputFile.text = "# This file is auto-generated. See ${pipelineTemplatePath}\n" + pipelineTemplate.text.replaceAll(' *\\$BWC_STEPS', steps)
outputFile.text = "# This file is auto-generated. See ${pipelineTemplatePath}\n" + pipeline
}

// Writes a Buildkite pipelime from a template, and replaces $BWC_LIST with an array of versions
// Useful for writing a list of versions in a matrix configuration
def expandBwcList = { String outputFilePath, String pipelineTemplatePath, List<Version> versions ->
writeBuildkitePipeline(outputFilePath, pipelineTemplatePath, [new ListExpansion(versions: versions, variable: "BWC_LIST")])
}

// Writes a Buildkite pipeline from a template, and replaces $BWC_STEPS with a list of steps, one for each version
// Useful when you need to configure more versions than are allowed in a matrix configuration
def expandBwcSteps = { String outputFilePath, String pipelineTemplatePath, String stepTemplatePath, List<Version> versions ->
writeBuildkitePipeline(outputFilePath, pipelineTemplatePath, [], [new StepExpansion(templatePath: stepTemplatePath, versions: versions, variable: "BWC_STEPS")])
}

doLast {
writeVersions(file(".ci/bwcVersions"), BuildParams.bwcVersions.allIndexCompatible)
writeVersions(file(".ci/snapshotBwcVersions"), BuildParams.bwcVersions.unreleasedIndexCompatible)
writeBuildkiteList(
expandBwcList(
".buildkite/pipelines/intake.yml",
".buildkite/pipelines/intake.template.yml",
BuildParams.bwcVersions.unreleasedIndexCompatible
)
writeBuildkiteSteps(
writeBuildkitePipeline(
".buildkite/pipelines/periodic.yml",
".buildkite/pipelines/periodic.template.yml",
".buildkite/pipelines/periodic.bwc.template.yml",
BuildParams.bwcVersions.allIndexCompatible
[
new ListExpansion(versions: BuildParams.bwcVersions.unreleasedIndexCompatible, variable: "BWC_LIST"),
],
[
new StepExpansion(templatePath: ".buildkite/pipelines/periodic.bwc.template.yml", versions: BuildParams.bwcVersions.allIndexCompatible, variable: "BWC_STEPS"),
]
)
writeBuildkiteSteps(

expandBwcSteps(
".buildkite/pipelines/periodic-packaging.yml",
".buildkite/pipelines/periodic-packaging.template.yml",
".buildkite/pipelines/periodic-packaging.bwc.template.yml",
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog/105779.yaml
@@ -0,0 +1,5 @@
pr: 105779
summary: "[Profiling] Speed up serialization of flamegraph"
area: Application
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/105893.yaml
@@ -0,0 +1,5 @@
pr: 105893
summary: Specialize serialization for `ArrayVectors`
area: ES|QL
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/106053.yaml
@@ -0,0 +1,5 @@
pr: 106053
summary: Speed up serialization of `BytesRefArray`
area: ES|QL
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/106057.yaml
@@ -0,0 +1,5 @@
pr: 106057
summary: Avoid computing `currentInferenceProcessors` on every cluster state
area: Machine Learning
type: bug
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/106060.yaml
@@ -0,0 +1,5 @@
pr: 106060
summary: "[Connector API] Fix serialisation of script params in connector index service"
area: Application
type: bug
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/106063.yaml
@@ -0,0 +1,5 @@
pr: 106063
summary: Consider `ShardRouting` roles when calculating shard copies in shutdown status
area: Infra/Node Lifecycle
type: bug
issues: []

0 comments on commit 9c5541a

Please sign in to comment.