Skip to content

Commit

Permalink
Merge branch 'main' into stef_slowLogs
Browse files Browse the repository at this point in the history
  • Loading branch information
shainaraskas authored Dec 23, 2024
2 parents fde0f43 + 3ecfe6b commit c28cb8b
Show file tree
Hide file tree
Showing 1,568 changed files with 42,268 additions and 11,753 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipelines/intake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ steps:
timeout_in_minutes: 300
matrix:
setup:
BWC_VERSION: ["8.15.6", "8.16.2", "8.17.0", "8.18.0", "9.0.0"]
BWC_VERSION: ["8.16.3", "8.17.1", "8.18.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
3 changes: 3 additions & 0 deletions .buildkite/pipelines/periodic-packaging.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ steps:
- debian-12
- opensuse-leap-15
- oraclelinux-8
- oraclelinux-9
- sles-15
- ubuntu-2004
- ubuntu-2204
- ubuntu-2404
- rocky-8
- rocky-9
- rhel-8
- rhel-9
- almalinux-8
- almalinux-9
agents:
provider: gcp
image: family/elasticsearch-{{matrix.image}}
Expand Down
21 changes: 12 additions & 9 deletions .buildkite/pipelines/periodic-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ steps:
- debian-12
- opensuse-leap-15
- oraclelinux-8
- oraclelinux-9
- sles-15
- ubuntu-2004
- ubuntu-2204
- ubuntu-2404
- rocky-8
- rocky-9
- rhel-8
- rhel-9
- almalinux-8
- almalinux-9
agents:
provider: gcp
image: family/elasticsearch-{{matrix.image}}
Expand Down Expand Up @@ -268,8 +271,8 @@ steps:
env:
BWC_VERSION: 8.14.3

- label: "{{matrix.image}} / 8.15.6 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.6
- label: "{{matrix.image}} / 8.15.5 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.5
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -282,10 +285,10 @@ steps:
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.15.6
BWC_VERSION: 8.15.5

- label: "{{matrix.image}} / 8.16.2 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.16.2
- label: "{{matrix.image}} / 8.16.3 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.16.3
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -298,10 +301,10 @@ steps:
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.16.2
BWC_VERSION: 8.16.3

- label: "{{matrix.image}} / 8.17.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.0
- label: "{{matrix.image}} / 8.17.1 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.1
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -314,7 +317,7 @@ steps:
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.17.0
BWC_VERSION: 8.17.1

- label: "{{matrix.image}} / 8.18.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.18.0
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/pipelines/periodic-platform-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ steps:
- debian-12
- opensuse-leap-15
- oraclelinux-8
- oraclelinux-9
- sles-15
- ubuntu-2004
- ubuntu-2204
- ubuntu-2404
- rocky-8
- rocky-9
- rhel-8
- rhel-9
- almalinux-8
- almalinux-9
agents:
provider: gcp
image: family/elasticsearch-{{matrix.image}}
Expand Down Expand Up @@ -60,6 +63,7 @@ steps:
image:
- almalinux-8-aarch64
- ubuntu-2004-aarch64
- ubuntu-2404-aarch64
GRADLE_TASK:
- checkPart1
- checkPart2
Expand Down
22 changes: 11 additions & 11 deletions .buildkite/pipelines/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.15.6 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.6#bwcTest
- label: 8.15.5 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.5#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -297,7 +297,7 @@ steps:
buildDirectory: /dev/shm/bk
preemptible: true
env:
BWC_VERSION: 8.15.6
BWC_VERSION: 8.15.5
retry:
automatic:
- exit_status: "-1"
Expand All @@ -306,8 +306,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.16.2 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.16.2#bwcTest
- label: 8.16.3 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.16.3#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -316,7 +316,7 @@ steps:
buildDirectory: /dev/shm/bk
preemptible: true
env:
BWC_VERSION: 8.16.2
BWC_VERSION: 8.16.3
retry:
automatic:
- exit_status: "-1"
Expand All @@ -325,8 +325,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.17.0 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.0#bwcTest
- label: 8.17.1 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.1#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -335,7 +335,7 @@ steps:
buildDirectory: /dev/shm/bk
preemptible: true
env:
BWC_VERSION: 8.17.0
BWC_VERSION: 8.17.1
retry:
automatic:
- exit_status: "-1"
Expand Down Expand Up @@ -448,7 +448,7 @@ steps:
setup:
ES_RUNTIME_JAVA:
- openjdk21
BWC_VERSION: ["8.15.6", "8.16.2", "8.17.0", "8.18.0", "9.0.0"]
BWC_VERSION: ["8.16.3", "8.17.1", "8.18.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down Expand Up @@ -490,7 +490,7 @@ steps:
ES_RUNTIME_JAVA:
- openjdk21
- openjdk23
BWC_VERSION: ["8.15.6", "8.16.2", "8.17.0", "8.18.0", "9.0.0"]
BWC_VERSION: ["8.16.3", "8.17.1", "8.18.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
3 changes: 3 additions & 0 deletions .buildkite/pipelines/pull-request/packaging-tests-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ steps:
- debian-12
- opensuse-leap-15
- oraclelinux-8
- oraclelinux-9
- sles-15
- ubuntu-2004
- ubuntu-2204
- ubuntu-2404
- rocky-8
- rocky-9
- rhel-8
- rhel-9
- almalinux-8
- almalinux-9
PACKAGING_TASK:
- docker
- docker-cloud-ess
Expand Down
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull-request/part-1-entitlements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
config:
allow-labels: "test-entitlements"
steps:
- label: part-1-entitlements
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart1
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
4 changes: 3 additions & 1 deletion .buildkite/pipelines/pull-request/part-1.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
steps:
- label: part-1
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed checkPart1
command: |
.buildkite/scripts/spotless.sh # This doesn't have to be part of part-1, it was just a convenient place to put it
.ci/scripts/run-gradle.sh -Dignore.tests.seed checkPart1
timeout_in_minutes: 300
agents:
provider: gcp
Expand Down
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull-request/part-2-entitlements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
config:
allow-labels: "test-entitlements"
steps:
- label: part-2-entitlements
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart2
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull-request/part-3-entitlements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
config:
allow-labels: "test-entitlements"
steps:
- label: part-3-entitlements
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart3
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull-request/part-4-entitlements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
config:
allow-labels: "test-entitlements"
steps:
- label: part-4-entitlements
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart4
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull-request/part-5-entitlements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
config:
allow-labels: "test-entitlements"
steps:
- label: part-5-entitlements
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.jvm.argline="-Des.entitlements.enabled=true" checkPart5
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
4 changes: 3 additions & 1 deletion .buildkite/pipelines/pull-request/precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ config:
skip-labels: []
steps:
- label: precommit
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed precommit
command: |
.buildkite/scripts/spotless.sh
.ci/scripts/run-gradle.sh -Dignore.tests.seed precommit
timeout_in_minutes: 300
agents:
provider: gcp
Expand Down
6 changes: 3 additions & 3 deletions .buildkite/scripts/gradle-configuration-cache-validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
set -euo pipefail

# This is a workaround for https://github.com/gradle/gradle/issues/28159
.ci/scripts/run-gradle.sh --no-daemon precommit
.ci/scripts/run-gradle.sh --no-daemon $@

.ci/scripts/run-gradle.sh --configuration-cache precommit -Dorg.gradle.configuration-cache.inputs.unsafe.ignore.file-system-checks=build/*.tar.bz2
.ci/scripts/run-gradle.sh --configuration-cache -Dorg.gradle.configuration-cache.inputs.unsafe.ignore.file-system-checks=build/*.tar.bz2 $@

# Create a temporary file
tmpOutputFile=$(mktemp)
trap "rm $tmpOutputFile" EXIT

echo "2nd run"
.ci/scripts/run-gradle.sh --configuration-cache precommit -Dorg.gradle.configuration-cache.inputs.unsafe.ignore.file-system-checks=build/*.tar.bz2 | tee $tmpOutputFile
.ci/scripts/run-gradle.sh --configuration-cache -Dorg.gradle.configuration-cache.inputs.unsafe.ignore.file-system-checks=build/*.tar.bz2 $@ | tee $tmpOutputFile

# Check if the command was successful
if grep -q "Configuration cache entry reused." $tmpOutputFile; then
Expand Down
44 changes: 44 additions & 0 deletions .buildkite/scripts/spotless.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

if [[ -z "${BUILDKITE_PULL_REQUEST:-}" ]]; then
echo "Not a pull request, skipping spotless"
exit 0
fi

if ! git diff --exit-code; then
echo "Changes are present before running spotless, not running"
git status
exit 0
fi

NEW_COMMIT_MESSAGE="[CI] Auto commit changes from spotless"
PREVIOUS_COMMIT_MESSAGE="$(git log -1 --pretty=%B)"

echo "--- Running spotless"
.ci/scripts/run-gradle.sh -Dscan.tag.NESTED spotlessApply

if git diff --exit-code; then
echo "No changes found after running spotless. Don't need to auto commit."
exit 0
fi

if [[ "$NEW_COMMIT_MESSAGE" == "$PREVIOUS_COMMIT_MESSAGE" ]]; then
echo "Changes found after running spotless"
echo "CI already attempted to commit these changes, but the file(s) seem to have changed again."
echo "Please review and fix manually."
exit 1
fi

git config --global user.name elasticsearchmachine
git config --global user.email '[email protected]'

gh pr checkout "${BUILDKITE_PULL_REQUEST}"
git add -u .
git commit -m "$NEW_COMMIT_MESSAGE"
git push

# After the git push, the new commit will trigger a new build within a few seconds and this build should get cancelled
# So, let's just sleep to give the build time to cancel itself without an error
# If it doesn't get cancelled for some reason, then exit with an error, because we don't want this build to be green (we just don't want it to generate an error either)
sleep 300
exit 1
6 changes: 3 additions & 3 deletions .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ BWC_VERSION:
- "8.12.2"
- "8.13.4"
- "8.14.3"
- "8.15.6"
- "8.16.2"
- "8.17.0"
- "8.15.5"
- "8.16.3"
- "8.17.1"
- "8.18.0"
- "9.0.0"
Loading

0 comments on commit c28cb8b

Please sign in to comment.