Skip to content

Commit

Permalink
Merge branch 'main' into hot_threads_plain_text
Browse files Browse the repository at this point in the history
  • Loading branch information
idegtiarenko committed Aug 30, 2024
2 parents 0907e2a + e379c4f commit 838dc19
Show file tree
Hide file tree
Showing 4,020 changed files with 111,815 additions and 31,377 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .buildkite/pipelines/intake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ steps:
timeout_in_minutes: 300
matrix:
setup:
BWC_VERSION: ["7.17.23", "8.14.4", "8.15.0", "8.16.0"]
BWC_VERSION: ["7.17.24", "8.15.1", "8.16.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
18 changes: 9 additions & 9 deletions .buildkite/pipelines/periodic-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ steps:
env:
BWC_VERSION: 7.16.3

- label: "{{matrix.image}} / 7.17.23 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v7.17.23
- label: "{{matrix.image}} / 7.17.24 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v7.17.24
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -337,7 +337,7 @@ steps:
buildDirectory: /dev/shm/bk
diskSizeGb: 250
env:
BWC_VERSION: 7.17.23
BWC_VERSION: 7.17.24

- label: "{{matrix.image}} / 8.0.1 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.0.1
Expand Down Expand Up @@ -577,8 +577,8 @@ steps:
env:
BWC_VERSION: 8.13.4

- label: "{{matrix.image}} / 8.14.4 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.14.4
- label: "{{matrix.image}} / 8.14.3 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.14.3
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -592,10 +592,10 @@ steps:
buildDirectory: /dev/shm/bk
diskSizeGb: 250
env:
BWC_VERSION: 8.14.4
BWC_VERSION: 8.14.3

- label: "{{matrix.image}} / 8.15.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.0
- label: "{{matrix.image}} / 8.15.1 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.1
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -609,7 +609,7 @@ steps:
buildDirectory: /dev/shm/bk
diskSizeGb: 250
env:
BWC_VERSION: 8.15.0
BWC_VERSION: 8.15.1

- label: "{{matrix.image}} / 8.16.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.16.0
Expand Down
22 changes: 11 additions & 11 deletions .buildkite/pipelines/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 7.17.23 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v7.17.23#bwcTest
- label: 7.17.24 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v7.17.24#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -353,7 +353,7 @@ steps:
preemptible: true
diskSizeGb: 250
env:
BWC_VERSION: 7.17.23
BWC_VERSION: 7.17.24
retry:
automatic:
- exit_status: "-1"
Expand Down Expand Up @@ -642,8 +642,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.14.4 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.14.4#bwcTest
- label: 8.14.3 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.14.3#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -653,7 +653,7 @@ steps:
preemptible: true
diskSizeGb: 250
env:
BWC_VERSION: 8.14.4
BWC_VERSION: 8.14.3
retry:
automatic:
- exit_status: "-1"
Expand All @@ -662,8 +662,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.15.0 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.0#bwcTest
- label: 8.15.1 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.1#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -673,7 +673,7 @@ steps:
preemptible: true
diskSizeGb: 250
env:
BWC_VERSION: 8.15.0
BWC_VERSION: 8.15.1
retry:
automatic:
- exit_status: "-1"
Expand Down Expand Up @@ -771,7 +771,7 @@ steps:
setup:
ES_RUNTIME_JAVA:
- openjdk17
BWC_VERSION: ["7.17.23", "8.14.4", "8.15.0", "8.16.0"]
BWC_VERSION: ["7.17.24", "8.15.1", "8.16.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down Expand Up @@ -821,7 +821,7 @@ steps:
- openjdk21
- openjdk22
- openjdk23
BWC_VERSION: ["7.17.23", "8.14.4", "8.15.0", "8.16.0"]
BWC_VERSION: ["7.17.24", "8.15.1", "8.16.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
80 changes: 80 additions & 0 deletions .buildkite/scripts/gradle-build-cache-validation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#!/bin/bash

set -euo pipefail

VALIDATION_SCRIPTS_VERSION=2.5.1
GRADLE_ENTERPRISE_ACCESS_KEY=$(vault kv get -field=value secret/ci/elastic-elasticsearch/gradle-enterprise-api-key)
export GRADLE_ENTERPRISE_ACCESS_KEY

curl -s -L -O https://github.com/gradle/gradle-enterprise-build-validation-scripts/releases/download/v$VALIDATION_SCRIPTS_VERSION/gradle-enterprise-gradle-build-validation-$VALIDATION_SCRIPTS_VERSION.zip && unzip -q -o gradle-enterprise-gradle-build-validation-$VALIDATION_SCRIPTS_VERSION.zip

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

set +e
gradle-enterprise-gradle-build-validation/03-validate-local-build-caching-different-locations.sh -r https://github.com/elastic/elasticsearch.git -b $BUILDKITE_BRANCH --gradle-enterprise-server https://gradle-enterprise.elastic.co -t precommit --fail-if-not-fully-cacheable | tee $tmpOutputFile
# Capture the return value
retval=$?
set -e

# Now read the content from the temporary file into a variable
perfOutput=$(cat $tmpOutputFile | sed -n '/Performance Characteristics/,/See https:\/\/gradle.com\/bvs\/main\/Gradle.md#performance-characteristics for details./p' | sed '$d' | sed 's/\x1b\[[0-9;]*m//g')
investigationOutput=$(cat $tmpOutputFile | sed -n '/Investigation Quick Links/,$p' | sed 's/\x1b\[[0-9;]*m//g')

# Initialize HTML output variable
summaryHtml="<h4>Build Cache Performance Characteristics</h4>"
summaryHtml+="<ul>"

# Process each line of the string
while IFS=: read -r label value; do
if [[ -n "$label" && -n "$value" ]]; then
# Trim whitespace from label and value
trimmed_label=$(echo "$label" | xargs)
trimmed_value=$(echo "$value" | xargs)

# Append to HTML output variable
summaryHtml+="<li><strong>$trimmed_label:</strong> $trimmed_value</li>"
fi
done <<< "$perfOutput"

summaryHtml+="</ul>"

# generate html for links
summaryHtml+="<h4>Investigation Links</h4>"
summaryHtml+="<ul>"

# Process each line of the string
while IFS= read -r line; do
if [[ "$line" =~ http.* ]]; then
# Extract URL and description using awk
url=$(echo "$line" | awk '{print $NF}')
description=$(echo "$line" | sed -e "s/:.*//")

# Append to HTML output variable
summaryHtml+=" <li><a href=\"$url\">$description</a></li>"
fi
done <<< "$investigationOutput"

# End of the HTML content
summaryHtml+="</ul>"

cat << EOF | buildkite-agent annotate --context "ctx-validation-summary" --style "info"
$summaryHtml
EOF

# Check if the command was successful
if [ $retval -eq 0 ]; then
echo "Experiment completed successfully"
elif [ $retval -eq 1 ]; then
echo "An invalid input was provided while attempting to run the experiment"
elif [ $retval -eq 2 ]; then
echo "One of the builds that is part of the experiment failed"
elif [ $retval -eq 3 ]; then
echo "The build was not fully cacheable for the given task graph"
elif [ $retval -eq 3 ]; then
echo "An unclassified, fatal error happened while running the experiment"
fi

exit $retval

79 changes: 0 additions & 79 deletions .buildkite/scripts/gradle-cache-validation.sh

This file was deleted.

27 changes: 27 additions & 0 deletions .buildkite/scripts/gradle-configuration-cache-validation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

set -euo pipefail

# TODO/ FIXIT without a full resolved gradle home, we see issues configuration cache reuse
./gradlew --max-workers=8 --parallel --scan --no-daemon precommit

./gradlew --max-workers=8 --parallel --scan --configuration-cache precommit -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"
# TODO run-gradle.sh script causes issues because of init script handling
./gradlew --max-workers=8 --parallel --scan --configuration-cache precommit -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
echo "Gradle configuration cache reused"
exit 0
else
echo "Failed to reuse Gradle configuration cache."
exit 1
fi


10 changes: 5 additions & 5 deletions .buildkite/scripts/lucene-snapshot/update-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

set -euo pipefail

if [[ "$BUILDKITE_BRANCH" != "lucene_snapshot" ]]; then
echo "Error: This script should only be run on the lucene_snapshot branch"
if [[ "$BUILDKITE_BRANCH" != "lucene_snapshot"* ]]; then
echo "Error: This script should only be run on lucene_snapshot branches"
exit 1
fi

echo --- Updating lucene_snapshot branch with main
echo --- Updating "$BUILDKITE_BRANCH" branch with main

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

git checkout lucene_snapshot
git checkout "$BUILDKITE_BRANCH"
git fetch origin main
git merge --no-edit origin/main
git push origin lucene_snapshot
git push origin "$BUILDKITE_BRANCH"
4 changes: 2 additions & 2 deletions .buildkite/scripts/lucene-snapshot/update-es-snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -euo pipefail

if [[ "$BUILDKITE_BRANCH" != "lucene_snapshot" ]]; then
echo "Error: This script should only be run on the lucene_snapshot branch"
if [[ "$BUILDKITE_BRANCH" != "lucene_snapshot"* ]]; then
echo "Error: This script should only be run on the lucene_snapshot branches"
exit 1
fi

Expand Down
6 changes: 3 additions & 3 deletions .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ BWC_VERSION:
- "7.14.2"
- "7.15.2"
- "7.16.3"
- "7.17.23"
- "7.17.24"
- "8.0.1"
- "8.1.3"
- "8.2.3"
Expand All @@ -31,6 +31,6 @@ BWC_VERSION:
- "8.11.4"
- "8.12.2"
- "8.13.4"
- "8.14.4"
- "8.15.0"
- "8.14.3"
- "8.15.1"
- "8.16.0"
5 changes: 2 additions & 3 deletions .ci/snapshotBwcVersions
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
BWC_VERSION:
- "7.17.23"
- "8.14.4"
- "8.15.0"
- "7.17.24"
- "8.15.1"
- "8.16.0"
Loading

0 comments on commit 838dc19

Please sign in to comment.