Skip to content

Commit f16c2e0

Browse files
committed
Merge remote-tracking branch 'upstream/main' into ps250613-integrateProjectGlobalBlocks
2 parents a99cea1 + e7409a8 commit f16c2e0

File tree

142 files changed

+6599
-1064
lines changed

Some content is hidden

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

142 files changed

+6599
-1064
lines changed

.buildkite/pipelines/intake.template.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ steps:
7272
buildDirectory: /dev/shm/bk
7373
env:
7474
BWC_VERSION: "{{matrix.BWC_VERSION}}"
75+
- label: bc-upgrade
76+
command: ".buildkite/scripts/run-bc-upgrade-tests.sh"
7577
- group: lucene-compat
7678
steps:
7779
- label: "{{matrix.LUCENE_VERSION}} / lucene-compat"

.buildkite/pipelines/intake.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ steps:
7272
buildDirectory: /dev/shm/bk
7373
env:
7474
BWC_VERSION: "{{matrix.BWC_VERSION}}"
75+
- label: bc-upgrade
76+
command: ".buildkite/scripts/run-bc-upgrade-tests.sh"
77+
agents:
78+
image: "docker.elastic.co/ci-agent-images/eck-region/buildkite-agent:1.5"
79+
memory: "4G"
7580
- group: lucene-compat
7681
steps:
7782
- label: "{{matrix.LUCENE_VERSION}} / lucene-compat"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
steps:
2+
- label: pr-upgrade
3+
command: ".buildkite/scripts/run-pr-upgrade-tests.sh"
4+
agents:
5+
image: "docker.elastic.co/ci-agent-images/eck-region/buildkite-agent:1.5"
6+
memory: "4G"
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/bin/bash
2+
3+
#
4+
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5+
# or more contributor license agreements. Licensed under the "Elastic License
6+
# 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
7+
# Public License v 1"; you may not use this file except in compliance with, at
8+
# your election, the "Elastic License 2.0", the "GNU Affero General Public
9+
# License v3.0 only", or the "Server Side Public License, v 1".
10+
#
11+
12+
set -euo pipefail
13+
14+
# Select the most recent build from the current branch.
15+
# We collect snapshots, order by date, then collect BCs, order by date, and concat them; then we select the last.
16+
# So if we have one (or more) BC, we will always prefer to use that. Otherwise we will use the latest snapshot.
17+
MANIFEST_URL="$(curl -s https://artifacts.elastic.co/releases/TfEVhiaBGqR64ie0g0r0uUwNAbEQMu1Z/future-releases/stack.json |
18+
jq ".releases[] |
19+
select(.branch == \"$BUILDKITE_BRANCH\") |
20+
select(.active_release == true) |
21+
((.snapshots | to_entries | sort_by(.value.completed_at)) +
22+
(.build_candidates | to_entries | sort_by(.value.completed_at))) |
23+
last | .value.manifest_url")"
24+
25+
if [[ -z "$MANIFEST_URL" ]]; then
26+
echo "No snapshots or build candidates for branch [$BUILDKITE_BRANCH]."
27+
echo "Skipping BC upgrade tests."
28+
exit 0
29+
fi
30+
31+
MANIFEST="$(curl -s "$MANIFEST_URL")"
32+
if [[ -z "$MANIFEST" ]]; then
33+
echo "Cannot get the build manifest from [$MANIFEST_URL]"
34+
exit 1
35+
fi
36+
37+
CURRENT_VERSION=$(sed -n 's/^elasticsearch[[:space:]]*=[[:space:]]*\(.*\)/\1/p' build-tools-internal/version.properties)
38+
39+
BC_VERSION=$(echo "$MANIFEST" | jq -r .version)
40+
BC_BUILD_ID=$(echo "$MANIFEST" | jq -r .build_id)
41+
BC_COMMIT_HASH=$(echo "$MANIFEST" | jq -r .projects.elasticsearch.commit_hash)
42+
43+
if [ "$CURRENT_VERSION-SNAPSHOT" != "$BC_VERSION" ]; then
44+
echo "Version [$BC_VERSION] of BC (or snapshot) does not match current version [$CURRENT_VERSION] of branch [$BUILDKITE_BRANCH]."
45+
echo "Skipping BC upgrade tests."
46+
exit 0
47+
fi
48+
49+
echo "Running BC upgrade tests on $BUILDKITE_BRANCH [$BC_VERSION] using BC (or snapshot) build of commit [$BC_COMMIT_HASH] with build id [$BC_BUILD_ID]."
50+
51+
cat <<EOF | buildkite-agent pipeline upload
52+
steps:
53+
- label: bc-upgrade $BC_BUILD_ID -> $BUILDKITE_BRANCH
54+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dorg.elasticsearch.build.cache.push=true -Dignore.tests.seed -Dscan.capture-file-fingerprints -Dtests.bwc.main.version=${BC_VERSION} -Dtests.bwc.refspec.main=${BC_COMMIT_HASH} bcUpgradeTest -Dtests.jvm.argline="-Des.serverless_transport=true"
55+
timeout_in_minutes: 300
56+
agents:
57+
provider: gcp
58+
image: family/elasticsearch-ubuntu-2004
59+
machineType: n1-standard-32
60+
buildDirectory: /dev/shm/bk
61+
preemptible: true
62+
retry:
63+
automatic:
64+
- exit_status: "-1"
65+
limit: 3
66+
signal_reason: none
67+
- signal_reason: agent_stop
68+
limit: 3
69+
EOF
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
3+
#
4+
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5+
# or more contributor license agreements. Licensed under the "Elastic License
6+
# 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
7+
# Public License v 1"; you may not use this file except in compliance with, at
8+
# your election, the "Elastic License 2.0", the "GNU Affero General Public
9+
# License v3.0 only", or the "Server Side Public License, v 1".
10+
#
11+
12+
set -euo pipefail
13+
14+
if [[ -z "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" ]]; then
15+
echo "Not a pull request, skipping PR upgrade tests."
16+
exit 0
17+
fi
18+
19+
# Identify the merge base of the current commit (branch) and the base branch of the pull request.
20+
# PR upgrade tests are run from the merge base to the current commit.
21+
BASE_COMMIT=$(git merge-base $BUILDKITE_PULL_REQUEST_BASE_BRANCH $BUILDKITE_COMMIT)
22+
23+
VERSION=$(sed -n 's/^elasticsearch[[:space:]]*=[[:space:]]*\(.*\)/\1/p' build-tools-internal/version.properties)
24+
25+
echo "Running PR upgrade tests from $BUILDKITE_PULL_REQUEST_BASE_BRANCH [$BASE_COMMIT] to $BUILDKITE_BRANCH [$BUILDKITE_COMMIT]."
26+
27+
cat <<EOF | buildkite-agent pipeline upload
28+
steps:
29+
- label: pr-upgrade $BUILDKITE_PULL_REQUEST_BASE_BRANCH -> $BUILDKITE_BRANCH
30+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dorg.elasticsearch.build.cache.push=true -Dignore.tests.seed -Dscan.capture-file-fingerprints -Dtests.bwc.main.version=${VERSION}-SNAPSHOT -Dtests.bwc.refspec.main=${BASE_COMMIT} bcUpgradeTest -Dtests.jvm.argline="-Des.serverless_transport=true"
31+
timeout_in_minutes: 300
32+
agents:
33+
provider: gcp
34+
image: family/elasticsearch-ubuntu-2004
35+
machineType: n1-standard-32
36+
buildDirectory: /dev/shm/bk
37+
preemptible: true
38+
retry:
39+
automatic:
40+
- exit_status: "-1"
41+
limit: 3
42+
signal_reason: none
43+
- signal_reason: agent_stop
44+
limit: 3
45+
EOF
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: "Docs preview comment"
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened, synchronize]
6+
7+
permissions:
8+
contents: read
9+
issues: write
10+
pull-requests: write
11+
12+
jobs:
13+
preview-links:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Comment preview links for changed docs
17+
uses: actions/github-script@v7
18+
with:
19+
github-token: ${{ secrets.GITHUB_TOKEN }}
20+
script: |
21+
const pr = context.payload.pull_request;
22+
const prNum = pr.number;
23+
const owner = context.repo.owner;
24+
const repo = context.repo.repo;
25+
const base = `https://docs-v3-preview.elastic.dev/${owner}/${repo}/pull/${prNum}`;
26+
// 1) List all files in this PR
27+
const { data: files } = await github.rest.pulls.listFiles({
28+
owner, repo, pull_number: prNum
29+
});
30+
// 2) Filter to only added/modified .md files (skip removed and _snippets/)
31+
const links = files
32+
.filter(f =>
33+
f.status !== 'removed' &&
34+
/\.md$/i.test(f.filename) &&
35+
!/(^|\/)_snippets\//i.test(f.filename)
36+
)
37+
.map(f => {
38+
let p = f.filename.replace(/\/index\.md$/i, '/');
39+
if (p === f.filename) p = p.replace(/\.md$/i, '');
40+
return `- [\`${f.filename}\`](${base}/${p})`;
41+
});
42+
if (!links.length) return; // nothing to do
43+
// 3) Build the comment body
44+
const body = [
45+
"🔍 **Preview links for changed docs:**",
46+
"",
47+
...links,
48+
"",
49+
"🔔 *The preview site may take up to **3 minutes** to finish building. These links will become live once it completes.*"
50+
].join("\n");
51+
// 4) Post or update a single bot comment
52+
const { data: comments } = await github.rest.issues.listComments({
53+
owner, repo, issue_number: prNum
54+
});
55+
const existing = comments.find(c =>
56+
c.user.type === 'Bot' &&
57+
c.body.startsWith("🔍 **Preview links for changed docs:**")
58+
);
59+
if (existing) {
60+
await github.rest.issues.updateComment({
61+
owner, repo,
62+
comment_id: existing.id,
63+
body
64+
});
65+
} else {
66+
await github.rest.issues.createComment({
67+
owner, repo,
68+
issue_number: prNum,
69+
body
70+
});
71+
}

build-tools-internal/src/main/resources/forbidden/es-server-signatures.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ org.elasticsearch.cluster.ClusterFeatures#clusterHasFeature(org.elasticsearch.cl
160160

161161
@defaultMessage Do not construct this records outside the source files they are declared in
162162
org.elasticsearch.cluster.SnapshotsInProgress$ShardSnapshotStatus#<init>(java.lang.String, org.elasticsearch.cluster.SnapshotsInProgress$ShardState, org.elasticsearch.repositories.ShardGeneration, java.lang.String, org.elasticsearch.repositories.ShardSnapshotResult)
163-
org.elasticsearch.cluster.SnapshotDeletionsInProgress$Entry#<init>(java.lang.String, java.util.List, long, long, org.elasticsearch.cluster.SnapshotDeletionsInProgress$State, java.lang.String)
163+
org.elasticsearch.cluster.SnapshotDeletionsInProgress$Entry#<init>(org.elasticsearch.cluster.metadata.ProjectId, java.lang.String, java.util.List, long, long, org.elasticsearch.cluster.SnapshotDeletionsInProgress$State, java.lang.String)
164164

165165
@defaultMessage Use a Thread constructor with a name, anonymous threads are more difficult to debug
166166
java.lang.Thread#<init>(java.lang.Runnable)

docs/changelog/128361.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 128361
2+
summary: The follower index should wait until the time series end time passes before unfollowing the leader index.
3+
area: ILM+SLM
4+
type: bug
5+
issues:
6+
- 128129

docs/changelog/128635.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 128635
2+
summary: Add `state` query param to Get snapshots API
3+
area: Snapshot/Restore
4+
type: enhancement
5+
issues:
6+
- 97446

docs/changelog/129170.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 129170
2+
summary: Add Support for LIKE (LIST)
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

0 commit comments

Comments
 (0)