Skip to content

Commit 2cc57b4

Browse files
Merge branch 'main' into es-12730-linked-proj-cfg-svc-cluster-settings
2 parents 616359b + 580f734 commit 2cc57b4

File tree

882 files changed

+17881
-4585
lines changed

Some content is hidden

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

882 files changed

+17881
-4585
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
steps:
2-
- label: $FWC_VERSION / fwc
3-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v$FWC_VERSION#fwcTest -Dtests.bwc.snapshot=false
2+
- label: "{{matrix.FWC_VERSION}}" / fwc
3+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v$$FWC_VERSION#fwcTest -Dtests.bwc.snapshot=false
44
timeout_in_minutes: 300
55
agents:
66
provider: gcp
@@ -11,4 +11,4 @@ steps:
1111
setup:
1212
FWC_VERSION: $FWC_LIST
1313
env:
14-
FWC_VERSION: $FWC_VERSION
14+
FWC_VERSION: "{{matrix.FWC_VERSION}}"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is auto-generated. See .buildkite/pipelines/periodic-fwc.template.yml
22
steps:
3-
- label: $FWC_VERSION / fwc
4-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v$FWC_VERSION#fwcTest -Dtests.bwc.snapshot=false
3+
- label: "{{matrix.FWC_VERSION}}" / fwc
4+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v$$FWC_VERSION#fwcTest -Dtests.bwc.snapshot=false
55
timeout_in_minutes: 300
66
agents:
77
provider: gcp
@@ -12,4 +12,4 @@ steps:
1212
setup:
1313
FWC_VERSION: []
1414
env:
15-
FWC_VERSION: $FWC_VERSION
15+
FWC_VERSION: "{{matrix.FWC_VERSION}}"

.buildkite/pipelines/periodic-java-ea.template.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,12 @@ steps:
3030
buildDirectory: /dev/shm/bk
3131
- group: java-matrix
3232
steps:
33-
- label: "{{matrix.GRADLE_TASK}} / java-ea"
33+
- label: "{{matrix.GRADLE_TASK}} / {{matrix.image}} "
3434
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true $$GRADLE_TASK
3535
timeout_in_minutes: 300
3636
matrix:
3737
setup:
3838
image:
39-
- windows-2025
4039
- ubuntu-2404
4140
GRADLE_TASK:
4241
- checkPart1
@@ -53,6 +52,30 @@ steps:
5352
buildDirectory: /dev/shm/bk
5453
env:
5554
GRADLE_TASK: "{{matrix.GRADLE_TASK}}"
55+
- label: "{{matrix.GRADLE_TASK}} / {{matrix.image}} "
56+
command: |
57+
.\.buildkite\scripts\run-script.ps1 bash .buildkite/scripts/windows-run-gradle.sh
58+
timeout_in_minutes: 300
59+
matrix:
60+
setup:
61+
image:
62+
- windows-2025
63+
GRADLE_TASK:
64+
- checkPart1
65+
- checkPart2
66+
- checkPart3
67+
- checkPart4
68+
- checkPart5
69+
- checkPart6
70+
- checkRestCompat
71+
agents:
72+
provider: gcp
73+
image: family/elasticsearch-{{matrix.image}}
74+
machineType: n1-standard-32
75+
buildDirectory: /dev/shm/bk
76+
env:
77+
GRADLE_PARAMS: "-Druntime.java=$$JAVA_EA_VERSION"
78+
GRADLE_TASK: "{{matrix.GRADLE_TASK}}"
5679
- label: "{{matrix.BWC_VERSION}} / matrix-bwc"
5780
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v$$BWC_VERSION#bwcTest
5881
timeout_in_minutes: 300

.buildkite/pipelines/periodic-java-ea.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,13 +468,12 @@ steps:
468468
buildDirectory: /dev/shm/bk
469469
- group: java-matrix
470470
steps:
471-
- label: "{{matrix.GRADLE_TASK}} / java-ea"
471+
- label: "{{matrix.GRADLE_TASK}} / {{matrix.image}} "
472472
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true $$GRADLE_TASK
473473
timeout_in_minutes: 300
474474
matrix:
475475
setup:
476476
image:
477-
- windows-2025
478477
- ubuntu-2404
479478
GRADLE_TASK:
480479
- checkPart1
@@ -491,6 +490,30 @@ steps:
491490
buildDirectory: /dev/shm/bk
492491
env:
493492
GRADLE_TASK: "{{matrix.GRADLE_TASK}}"
493+
- label: "{{matrix.GRADLE_TASK}} / {{matrix.image}} "
494+
command: |
495+
.\.buildkite\scripts\run-script.ps1 bash .buildkite/scripts/windows-run-gradle.sh
496+
timeout_in_minutes: 300
497+
matrix:
498+
setup:
499+
image:
500+
- windows-2025
501+
GRADLE_TASK:
502+
- checkPart1
503+
- checkPart2
504+
- checkPart3
505+
- checkPart4
506+
- checkPart5
507+
- checkPart6
508+
- checkRestCompat
509+
agents:
510+
provider: gcp
511+
image: family/elasticsearch-{{matrix.image}}
512+
machineType: n1-standard-32
513+
buildDirectory: /dev/shm/bk
514+
env:
515+
GRADLE_PARAMS: "-Druntime.java=${JAVA_EA_VERSION}"
516+
GRADLE_TASK: "{{matrix.GRADLE_TASK}}"
494517
- label: "{{matrix.BWC_VERSION}} / matrix-bwc"
495518
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v$$BWC_VERSION#bwcTest
496519
timeout_in_minutes: 300

.buildkite/scripts/fwc-branches.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
# Configure FwC test branches
4+
# We do not want 7.x branch and only to run for branches that:
5+
# - have released at least one minor version (not main)
6+
# - have previous minor unreleased (not the oldest development branch)
7+
FWC_BRANCHES=()
8+
for branch in "${BRANCHES[@]}"; do
9+
if [[ ! "$branch" =~ ^7\..* ]]; then
10+
FWC_BRANCHES+=("$branch")
11+
fi
12+
done
13+
# Remove first and last element
14+
FWC_BRANCHES=("${FWC_BRANCHES[@]:1:${#FWC_BRANCHES[@]}-2}")
15+
16+
shouldRunFwcFor() {
17+
local branch=$1
18+
for fwc_branch in "${FWC_BRANCHES[@]}"; do
19+
if [[ "$fwc_branch" == "$branch" ]]; then
20+
return 0
21+
fi
22+
done
23+
return 1
24+
}

.buildkite/scripts/generate-pr-performance-benchmark.sh

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,69 @@
22

33
set -euo pipefail
44

5+
# uncomment for tests
6+
#function buildkite-agent {
7+
# local command=$1
8+
# echo "$@"
9+
# if [ "$command" == "annotate" ]; then
10+
# while read -r line; do
11+
# echo " read: $line";
12+
# done
13+
# fi
14+
#}
15+
516
env_id_baseline=$(python3 -c 'import uuid; print(uuid.uuid4())')
617
env_id_contender=$(python3 -c 'import uuid; print(uuid.uuid4())')
718
merge_base=$(git merge-base "${GITHUB_PR_TARGET_BRANCH}" HEAD)
819

20+
# PR comment
21+
buildkite-agent meta-data set pr_comment:early_comment_job_id "$BUILDKITE_JOB_ID"
922
buildkite-agent meta-data set pr_comment:custom-body:body \
10-
"This build attempted two ${GITHUB_PR_COMMENT_VAR_BENCHMARK} benchmarks to evaluate performance impact of this PR."
23+
"This build attempts two ${GITHUB_PR_COMMENT_VAR_BENCHMARK} benchmarks to evaluate performance impact of this PR. \
24+
To estimate benchmark completion time inspect previous nightly runs [here](https://buildkite.com/elastic/elasticsearch-performance-esbench-nightly/builds?branch=master)."
1125
buildkite-agent meta-data set pr_comment:custom-baseline:head \
1226
"* Baseline: ${merge_base} (env ID ${env_id_baseline})"
1327
buildkite-agent meta-data set pr_comment:custom-contender:head \
1428
"* Contender: ${GITHUB_PR_TRIGGERED_SHA} (env ID ${env_id_contender})"
1529

16-
cat << _EOF_
30+
# Buildkite annotation
31+
cat << _EOF1_ | buildkite-agent annotate --context "pr-benchmark-notification"
32+
This build attempts two ${GITHUB_PR_COMMENT_VAR_BENCHMARK} benchmarks to evaluate performance impact of PR [${GITHUB_PR_NUMBER}](https://github.com/elastic/elasticsearch/pull/${GITHUB_PR_NUMBER}).
33+
To estimate benchmark completion time inspect previous nightly runs [here](https://buildkite.com/elastic/elasticsearch-performance-esbench-nightly/builds?branch=master).
34+
* Baseline: [${merge_base:0:7}](https://github.com/elastic/elasticsearch/commit/${merge_base}) (env ID ${env_id_baseline})
35+
* Contender: [${GITHUB_PR_TRIGGERED_SHA:0:7}](https://github.com/elastic/elasticsearch/commit/${GITHUB_PR_TRIGGERED_SHA}) (env ID ${env_id_contender})
36+
_EOF1_
37+
38+
cat << _EOF2_
1739
steps:
18-
- label: Trigger baseline benchmark
40+
- label: Trigger baseline benchmark with ${merge_base:0:7}
1941
trigger: elasticsearch-performance-esbench-pr
2042
build:
21-
message: Baseline benchmark for PR${GITHUB_PR_NUMBER}
43+
message: Baseline benchmark for PR ${GITHUB_PR_NUMBER} with ${merge_base:0:7}
2244
branch: master
2345
env:
2446
CONFIGURATION_NAME: ${GITHUB_PR_COMMENT_VAR_BENCHMARK}
2547
ENV_ID: ${env_id_baseline}
2648
REVISION: ${merge_base}
27-
- label: Trigger contender benchmark
49+
- label: Trigger contender benchmark with ${GITHUB_PR_TRIGGERED_SHA:0:7}
2850
trigger: elasticsearch-performance-esbench-pr
2951
build:
30-
message: Contender benchmark for PR${GITHUB_PR_NUMBER}
52+
message: Contender benchmark for PR ${GITHUB_PR_NUMBER} with ${GITHUB_PR_TRIGGERED_SHA:0:7}
3153
branch: master
3254
env:
3355
CONFIGURATION_NAME: ${GITHUB_PR_COMMENT_VAR_BENCHMARK}
3456
ENV_ID: ${env_id_contender}
3557
ES_REPO_URL: https://github.com/${GITHUB_PR_OWNER}/${GITHUB_PR_REPO}.git
3658
REVISION: ${GITHUB_PR_TRIGGERED_SHA}
3759
- wait: ~
38-
- label: Modify PR comment
39-
command: buildkite-agent meta-data set pr_comment:custom-comparison:head "* [Benchmark results](<https://esbench-metrics.kb.us-east-2.aws.elastic-cloud.com:9243/app/dashboards#/view/d9079962-5866-49ef-b9f5-145f2141cd31?_a=(query:(language:kuery,query:'user-tags.env-id:${env_id_baseline} or user-tags.env-id:${env_id_contender}'))>)"
40-
_EOF_
60+
- label: Update PR comment and Buildkite annotation
61+
command: |
62+
buildkite-agent meta-data set pr_comment:custom-body:body "This build ran two ${GITHUB_PR_COMMENT_VAR_BENCHMARK} benchmarks to evaluate performance impact of this PR."
63+
buildkite-agent meta-data set pr_comment:custom-comparison:head "* [Benchmark results](<https://esbench-metrics.kb.us-east-2.aws.elastic-cloud.com:9243/app/dashboards#/view/d9079962-5866-49ef-b9f5-145f2141cd31?_a=(query:(language:kuery,query:'user-tags.env-id:${env_id_baseline} or user-tags.env-id:${env_id_contender}'))>)"
64+
cat << _EOF3_ | buildkite-agent annotate --context "pr-benchmark-notification"
65+
This build ran two ${GITHUB_PR_COMMENT_VAR_BENCHMARK} benchmarks to evaluate performance impact of PR [${GITHUB_PR_NUMBER}](https://github.com/elastic/elasticsearch/pull/${GITHUB_PR_NUMBER}).
66+
* Baseline: [${merge_base:0:7}](https://github.com/elastic/elasticsearch/commit/${merge_base}) (env ID ${env_id_baseline})
67+
* Contender: [${GITHUB_PR_TRIGGERED_SHA:0:7}](https://github.com/elastic/elasticsearch/commit/${GITHUB_PR_TRIGGERED_SHA}) (env ID ${env_id_contender})
68+
* [Benchmark results](<https://esbench-metrics.kb.us-east-2.aws.elastic-cloud.com:9243/app/dashboards#/view/d9079962-5866-49ef-b9f5-145f2141cd31?_a=(query:(language:kuery,query:'user-tags.env-id:${env_id_baseline} or user-tags.env-id:${env_id_contender}'))>)
69+
_EOF3_
70+
_EOF2_

.buildkite/scripts/periodic.trigger.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -euo pipefail
55
echo "steps:"
66

77
source .buildkite/scripts/branches.sh
8+
source .buildkite/scripts/fwc-branches.sh
89

910
IS_FIRST=true
1011
SKIP_DELAY="${SKIP_DELAY:-false}"
@@ -46,8 +47,7 @@ EOF
4647
branch: "$BRANCH"
4748
commit: "$LAST_GOOD_COMMIT"
4849
EOF
49-
# Include forward compatibility tests only for the bugfix branch
50-
if [[ "${BRANCH}" == "${BRANCHES[2]}" ]]; then
50+
if shouldRunFwcFor "$BRANCH"; then
5151
cat <<EOF
5252
- trigger: elasticsearch-periodic-fwc
5353
label: Trigger periodic-fwc pipeline for $BRANCH

.buildkite/scripts/windows-run-gradle.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
set -euo pipefail
44

5-
.ci/scripts/run-gradle.sh -Dbwc.checkout.align=true $GRADLE_TASK
5+
.ci/scripts/run-gradle.sh -Dbwc.checkout.align=true ${GRADLE_PARAMS:-} $GRADLE_TASK

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ x-pack/plugin/apm-data/src/yamlRestTest/resources @elastic/obs-ds-intake-service
3434
x-pack/plugin/otel-data/src/main/resources @elastic/obs-ds-intake-services
3535
x-pack/plugin/otel-data/src/yamlRestTest/resources @elastic/obs-ds-intake-services
3636

37+
# Storage Engine
38+
x-pack/plugin/otel-data/src/main/java/org/elasticsearch/xpack/oteldata/otlp @elastic/es-storage-engine
39+
x-pack/plugin/otel-data/src/test/java/org/elasticsearch/xpack/oteldata/otlp @elastic/es-storage-engine
40+
x-pack/plugin/otel-data/src/javaRestTest/java/org/elasticsearch/xpack/oteldata/otlp @elastic/es-storage-engine
41+
3742
# Delivery
3843
gradle @elastic/es-delivery
3944
build-conventions @elastic/es-delivery

benchmarks/src/main/java/org/elasticsearch/benchmark/exponentialhistogram/ExponentialHistogramMergeBench.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ private ExponentialHistogram asCompressedHistogram(ExponentialHistogram histogra
130130
CompressedExponentialHistogram.writeHistogramBytes(histoBytes, histogram.scale(), negativeBuckets, positiveBuckets);
131131
CompressedExponentialHistogram result = new CompressedExponentialHistogram();
132132
BytesRef data = histoBytes.bytes().toBytesRef();
133-
result.reset(histogram.zeroBucket().zeroThreshold(), totalCount, histogram.sum(), histogram.min(), data);
133+
result.reset(histogram.zeroBucket().zeroThreshold(), totalCount, histogram.sum(), histogram.min(), histogram.max(), data);
134134
return result;
135135
} catch (IOException e) {
136136
throw new RuntimeException(e);

0 commit comments

Comments
 (0)