Skip to content

Commit c0ff6d6

Browse files
authored
Merge branch 'main' into mtvr900
2 parents 25936c5 + 54d707c commit c0ff6d6

File tree

189 files changed

+5872
-1185
lines changed

Some content is hidden

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

189 files changed

+5872
-1185
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
steps:
2+
- command: .buildkite/scripts/trigger-if-java-ea-new-build.sh
3+
env:
4+
RECENT_TIME_WINDOW: "24" # time window to consider a build as new in hours
5+
agents:
6+
image: "docker.elastic.co/ci-agent-images/eck-region/buildkite-agent:1.5"
7+
memory: "4G"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
steps: []
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
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+
#!/bin/bash
11+
12+
# Allow overriding the time window (in hours) to check for new builds, defaults to 24
13+
RECENT_TIME_WINDOW=${RECENT_TIME_WINDOW:-24}
14+
15+
# Extract current JDK major version from bundled_jdk in version.properties
16+
CURRENT_JDK=$(grep "^bundled_jdk =" build-tools-internal/version.properties | cut -d'=' -f2 | tr -d ' ' | cut -d'.' -f1)
17+
TARGET_JDK=$((CURRENT_JDK + 1))
18+
19+
echo "Current JDK major version: $CURRENT_JDK"
20+
echo "Target JDK major version: $TARGET_JDK"
21+
22+
# Query Elasticsearch JDK archive for available JDKs
23+
JDK_ARCHIVE_URL="https://builds.es-jdk-archive.com/jdks/openjdk/recent.json"
24+
echo "Querying JDK archive: $JDK_ARCHIVE_URL"
25+
26+
# Fetch JDK info and filter for target major version
27+
JDK_DATA=$(curl -s "$JDK_ARCHIVE_URL")
28+
29+
if [[ -z "$JDK_DATA" ]]; then
30+
echo "Failed to fetch JDK data from archive"
31+
exit 1
32+
fi
33+
34+
# Find the latest build for the target JDK version
35+
LATEST_BUILD=$(echo "$JDK_DATA" | jq -r --arg target "$TARGET_JDK" '
36+
.majors[$target].builds |
37+
sort_by(.archived_at) |
38+
last'
39+
)
40+
41+
if [[ "$LATEST_BUILD" == "null" || -z "$LATEST_BUILD" ]]; then
42+
echo "No builds found for JDK $TARGET_JDK"
43+
exit 1
44+
fi
45+
46+
# Extract timestamp and JDK identifier
47+
TIMESTAMP=$(echo "$LATEST_BUILD" | jq -r '.archived_at')
48+
JDK_IDENTIFIER=$(echo "$LATEST_BUILD" | jq -r '.id')
49+
50+
echo "Latest JDK ${TARGET_JDK} build from ES archive:"
51+
echo " Timestamp: $TIMESTAMP"
52+
echo " JDK Identifier: $JDK_IDENTIFIER"
53+
54+
# Set variables for use in the pipeline trigger
55+
jdkbuild="$JDK_IDENTIFIER"
56+
jdk_timestamp="$TIMESTAMP"
57+
58+
# Check if timestamp is within last 24 hours
59+
CURRENT_TIME=$(date +%s)
60+
BUILD_TIME=$(date -d "$TIMESTAMP" +%s 2>/dev/null || date -j -f "%Y-%m-%dT%H:%M:%S" "${TIMESTAMP%Z}" +%s 2>/dev/null || echo "0")
61+
62+
if [[ "$BUILD_TIME" == "0" ]]; then
63+
echo "Failed to parse timestamp: $TIMESTAMP"
64+
SHOULD_TRIGGER="false"
65+
else
66+
TIME_DIFF=$((CURRENT_TIME - BUILD_TIME))
67+
TIME_WINDOW=$((RECENT_TIME_WINDOW * 60 * 60))
68+
69+
if [[ $TIME_DIFF -lt $TIME_WINDOW ]]; then
70+
echo "Build is recent (less than ${RECENT_TIME_WINDOW}h old)"
71+
SHOULD_TRIGGER="true"
72+
else
73+
echo "Build is older than ${RECENT_TIME_WINDOW} hours"
74+
SHOULD_TRIGGER="false"
75+
fi
76+
fi
77+
78+
echo "SHOULD_TRIGGER: $SHOULD_TRIGGER"
79+
80+
81+
if [[ "$SHOULD_TRIGGER" == "true" ]]; then
82+
EFFECTIVE_START_DATE=$(date -u -d "@$BUILD_TIME" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || date -u -r "$BUILD_TIME" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || echo "")
83+
echo "Triggering performance-esbench-jdk for new jdk build $JDK_IDENTIFIER"
84+
cat << EOF | buildkite-agent pipeline upload
85+
steps:
86+
- trigger: elasticsearch-performance-esbench-jdk
87+
label: Triggering performance-esbench-jdk for new jdk build $JDK_IDENTIFIER
88+
async: true
89+
build:
90+
branch: "$BUILDKITE_BRANCH"
91+
env:
92+
EFFECTIVE_START_DATE: "$EFFECTIVE_START_DATE"
93+
EXECUTION_MODE: "start-run"
94+
EOF
95+
fi

build-tools-internal/version.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ opensaml = 4.3.0
2929
# client dependencies
3030
httpclient = 4.5.14
3131
httpcore = 4.4.16
32+
httpclient5 = 5.5
33+
httpcore5 = 5.3.5
3234
httpasyncclient = 4.1.5
3335
commonslogging = 1.2
3436
commonscodec = 1.15

catalog-info.yaml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,45 @@ spec:
138138
cronline: "0 4 * * * America/New_York"
139139
message: "Run java EA tests 1x per day"
140140
---
141-
141+
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
142+
apiVersion: backstage.io/v1alpha1
143+
kind: Resource
144+
metadata:
145+
name: buildkite-pipeline-elasticsearch-java-ea-check-new-build
146+
description: Check for new jdk ea build and trigger downstream jobs
147+
links:
148+
- title: Pipeline
149+
url: https://buildkite.com/elastic/elasticsearch-java-ea-check-new-build
150+
spec:
151+
type: buildkite-pipeline
152+
system: buildkite
153+
owner: group:elasticsearch-team
154+
implementation:
155+
apiVersion: buildkite.elastic.dev/v1
156+
kind: Pipeline
157+
metadata:
158+
description: ":java: Check for new pre release jdk build and trigger downstream jobs"
159+
name: elasticsearch / java-ea / check-new-build
160+
spec:
161+
repository: elastic/elasticsearch
162+
pipeline_file: .buildkite/pipelines/java-ea-check-new-build.yml
163+
branch_configuration: main
164+
teams:
165+
elasticsearch-team: {}
166+
ml-core: {}
167+
everyone:
168+
access_level: BUILD_AND_READ
169+
provider_settings:
170+
build_branches: false
171+
build_pull_requests: false
172+
publish_commit_status: false
173+
trigger_mode: none
174+
schedules:
175+
Periodically on main:
176+
branch: main
177+
cronline: "0 6 * * * UTC"
178+
message: "Check for new java pre release build 1x per day"
179+
---
142180
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
143181
apiVersion: backstage.io/v1alpha1
144182
kind: Resource

docs/changelog/133087.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 133087
2+
summary: Esql skip null metrics
3+
area: ES|QL
4+
type: enhancement
5+
issues:
6+
- 129524

docs/changelog/134214.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 134214
2+
summary: "[Downsampling++] Add time series telemetry in xpack usage"
3+
area: Downsampling
4+
type: enhancement
5+
issues:
6+
- 133953

docs/changelog/134231.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 134231
2+
summary: Fix unnecessary determinization in index pattern conflict checks
3+
area: Indices APIs
4+
type: bug
5+
issues:
6+
- 133652

docs/reference/query-languages/esql/images/functions/knn.svg

Lines changed: 1 addition & 1 deletion
Loading

gradle/verification-metadata.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2907,16 +2907,31 @@
29072907
<sha256 value="a0a9dcd3696a6281f82e392d39aa674bf9662496605411de2a00d44435a7fb26" origin="Generated by Gradle"/>
29082908
</artifact>
29092909
</component>
2910+
<component group="org.apache.httpcomponents.client5" name="httpclient5" version="5.5">
2911+
<artifact name="httpclient5-5.5.jar">
2912+
<sha256 value="496b4b0e8d5f3a8139a5d2638486d304758bac3a9c39d76989f663cfd9354fc9" origin="Generated by Gradle"/>
2913+
</artifact>
2914+
</component>
29102915
<component group="org.apache.httpcomponents.core5" name="httpcore5" version="5.3.3">
29112916
<artifact name="httpcore5-5.3.3.jar">
29122917
<sha256 value="087b7ae9bde9d3518b4b5d06f3560d7fd0db04098655e76b64e791773847d503" origin="Generated by Gradle"/>
29132918
</artifact>
29142919
</component>
2920+
<component group="org.apache.httpcomponents.core5" name="httpcore5" version="5.3.5">
2921+
<artifact name="httpcore5-5.3.5.jar">
2922+
<sha256 value="34ce80396dcf2927406ddcd7c1c9063879220952ad0a2121c10103d3ad2cc3a4" origin="Generated by Gradle"/>
2923+
</artifact>
2924+
</component>
29152925
<component group="org.apache.httpcomponents.core5" name="httpcore5-h2" version="5.3.3">
29162926
<artifact name="httpcore5-h2-5.3.3.jar">
29172927
<sha256 value="a121f4b14ec525e54e29b9f5db7b93f4a97e088774e81c7143b5198f67d81bec" origin="Generated by Gradle"/>
29182928
</artifact>
29192929
</component>
2930+
<component group="org.apache.httpcomponents.core5" name="httpcore5-h2" version="5.3.5">
2931+
<artifact name="httpcore5-h2-5.3.5.jar">
2932+
<sha256 value="2a661d8756fb298db7d561c2dabb5e79144b0dae6676735134ef6a8f4c3125e3" origin="Generated by Gradle"/>
2933+
</artifact>
2934+
</component>
29202935
<component group="org.apache.james" name="apache-mime4j-core" version="0.8.13">
29212936
<artifact name="apache-mime4j-core-0.8.13.jar">
29222937
<sha256 value="00496c123926395d59e5dfdfc8342c607600c6c9e6e6dcab981a673b62481cdf" origin="Generated by Gradle"/>
@@ -4935,6 +4950,11 @@
49354950
<sha256 value="2f2a92d410b268139d7d63b75ed25e21995cfe4100c19bf23577cfdbc8077bda" origin="Generated by Gradle"/>
49364951
</artifact>
49374952
</component>
4953+
<component group="org.slf4j" name="slf4j-ext" version="2.0.6">
4954+
<artifact name="slf4j-ext-2.0.6.jar">
4955+
<sha256 value="0f6ef03bc0291899f3fb324baba0dee02fa8c6c1adc7b465f5b923ac70379efd" origin="Generated by Gradle"/>
4956+
</artifact>
4957+
</component>
49384958
<component group="org.slf4j" name="slf4j-log4j12" version="1.7.10">
49394959
<artifact name="slf4j-log4j12-1.7.10.jar">
49404960
<sha256 value="2e4eebc6e346c92c417aa4e662738802645ef21c5eb4435132dc78d631f2eebb" origin="Generated by Gradle"/>

0 commit comments

Comments
 (0)