Skip to content

Commit 8775db4

Browse files
Merge branch 'lucene_snapshot' into rename-security-automatons-methods
2 parents aee7c9d + 17c11ec commit 8775db4

File tree

558 files changed

+12086
-4701
lines changed

Some content is hidden

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

558 files changed

+12086
-4701
lines changed

.backportrc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"upstream" : "elastic/elasticsearch",
3-
"targetBranchChoices" : [ "main", "8.x", "8.15", "8.14", "8.13", "8.12", "8.11", "8.10", "8.9", "8.8", "8.7", "8.6", "8.5", "8.4", "8.3", "8.2", "8.1", "8.0", "7.17", "6.8" ],
3+
"targetBranchChoices" : [ "main", "8.x", "8.16", "8.15", "8.14", "8.13", "8.12", "8.11", "8.10", "8.9", "8.8", "8.7", "8.6", "8.5", "8.4", "8.3", "8.2", "8.1", "8.0", "7.17", "6.8" ],
44
"targetPRLabels" : [ "backport" ],
55
"branchLabelMapping" : {
66
"^v9.0.0$" : "main",
7-
"^v8.16.0$" : "8.x",
7+
"^v8.17.0$" : "8.x",
88
"^v(\\d+).(\\d+).\\d+(?:-(?:alpha|beta|rc)\\d+)?$" : "$1.$2"
99
}
1010
}

.buildkite/hooks/pre-command

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ export COMPOSE_HTTP_TIMEOUT
1616
JOB_BRANCH="$BUILDKITE_BRANCH"
1717
export JOB_BRANCH
1818

19-
GRADLEW="./gradlew --parallel --scan --build-cache --no-watch-fs -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/"
19+
GRADLEW="./gradlew --console=plain --parallel --scan --build-cache --no-watch-fs -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/"
2020
export GRADLEW
2121

22-
GRADLEW_BAT="./gradlew.bat --parallel --scan --build-cache --no-watch-fs -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/"
22+
GRADLEW_BAT="./gradlew.bat --console=plain --parallel --scan --build-cache --no-watch-fs -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/"
2323
export GRADLEW_BAT
2424

2525
export $(cat .ci/java-versions.properties | grep '=' | xargs)

.buildkite/pipelines/intake.template.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ steps:
7575
- trigger: elasticsearch-dra-workflow
7676
label: Trigger DRA snapshot workflow
7777
async: true
78+
branches: "main 8.* 7.17"
7879
build:
7980
branch: "$BUILDKITE_BRANCH"
8081
commit: "$BUILDKITE_COMMIT"

.buildkite/pipelines/intake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ steps:
5656
timeout_in_minutes: 300
5757
matrix:
5858
setup:
59-
BWC_VERSION: ["8.15.3", "8.16.0", "9.0.0"]
59+
BWC_VERSION: ["8.15.4", "8.16.0", "8.17.0", "9.0.0"]
6060
agents:
6161
provider: gcp
6262
image: family/elasticsearch-ubuntu-2004

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ steps:
272272
env:
273273
BWC_VERSION: 8.14.3
274274

275-
- label: "{{matrix.image}} / 8.15.3 / packaging-tests-upgrade"
276-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.3
275+
- label: "{{matrix.image}} / 8.15.4 / packaging-tests-upgrade"
276+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.4
277277
timeout_in_minutes: 300
278278
matrix:
279279
setup:
@@ -286,7 +286,7 @@ steps:
286286
machineType: custom-16-32768
287287
buildDirectory: /dev/shm/bk
288288
env:
289-
BWC_VERSION: 8.15.3
289+
BWC_VERSION: 8.15.4
290290

291291
- label: "{{matrix.image}} / 8.16.0 / packaging-tests-upgrade"
292292
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.16.0
@@ -304,6 +304,22 @@ steps:
304304
env:
305305
BWC_VERSION: 8.16.0
306306

307+
- label: "{{matrix.image}} / 8.17.0 / packaging-tests-upgrade"
308+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.0
309+
timeout_in_minutes: 300
310+
matrix:
311+
setup:
312+
image:
313+
- rocky-8
314+
- ubuntu-2004
315+
agents:
316+
provider: gcp
317+
image: family/elasticsearch-{{matrix.image}}
318+
machineType: custom-16-32768
319+
buildDirectory: /dev/shm/bk
320+
env:
321+
BWC_VERSION: 8.17.0
322+
307323
- label: "{{matrix.image}} / 9.0.0 / packaging-tests-upgrade"
308324
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.0.0
309325
timeout_in_minutes: 300

.buildkite/pipelines/periodic.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ steps:
287287
- signal_reason: agent_stop
288288
limit: 3
289289

290-
- label: 8.15.3 / bwc
291-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.3#bwcTest
290+
- label: 8.15.4 / bwc
291+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.4#bwcTest
292292
timeout_in_minutes: 300
293293
agents:
294294
provider: gcp
@@ -297,7 +297,7 @@ steps:
297297
buildDirectory: /dev/shm/bk
298298
preemptible: true
299299
env:
300-
BWC_VERSION: 8.15.3
300+
BWC_VERSION: 8.15.4
301301
retry:
302302
automatic:
303303
- exit_status: "-1"
@@ -325,6 +325,25 @@ steps:
325325
- signal_reason: agent_stop
326326
limit: 3
327327

328+
- label: 8.17.0 / bwc
329+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.0#bwcTest
330+
timeout_in_minutes: 300
331+
agents:
332+
provider: gcp
333+
image: family/elasticsearch-ubuntu-2004
334+
machineType: n1-standard-32
335+
buildDirectory: /dev/shm/bk
336+
preemptible: true
337+
env:
338+
BWC_VERSION: 8.17.0
339+
retry:
340+
automatic:
341+
- exit_status: "-1"
342+
limit: 3
343+
signal_reason: none
344+
- signal_reason: agent_stop
345+
limit: 3
346+
328347
- label: 9.0.0 / bwc
329348
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.0.0#bwcTest
330349
timeout_in_minutes: 300
@@ -410,7 +429,7 @@ steps:
410429
setup:
411430
ES_RUNTIME_JAVA:
412431
- openjdk21
413-
BWC_VERSION: ["8.15.3", "8.16.0", "9.0.0"]
432+
BWC_VERSION: ["8.15.4", "8.16.0", "8.17.0", "9.0.0"]
414433
agents:
415434
provider: gcp
416435
image: family/elasticsearch-ubuntu-2004
@@ -452,7 +471,7 @@ steps:
452471
ES_RUNTIME_JAVA:
453472
- openjdk21
454473
- openjdk23
455-
BWC_VERSION: ["8.15.3", "8.16.0", "9.0.0"]
474+
BWC_VERSION: ["8.15.4", "8.16.0", "8.17.0", "9.0.0"]
456475
agents:
457476
provider: gcp
458477
image: family/elasticsearch-ubuntu-2004
@@ -554,7 +573,7 @@ steps:
554573
image: family/elasticsearch-ubuntu-2004
555574
machineType: n2-standard-8
556575
buildDirectory: /dev/shm/bk
557-
if: build.branch == "main" || build.branch == "7.17"
576+
if: build.branch == "main" || build.branch == "8.x" || build.branch == "7.17"
558577
- label: check-branch-consistency
559578
command: .ci/scripts/run-gradle.sh branchConsistency
560579
timeout_in_minutes: 15

.buildkite/scripts/dra-workflow.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,18 @@ if [[ "$BRANCH" == "main" ]]; then
2222
fi
2323

2424
ES_VERSION=$(grep elasticsearch build-tools-internal/version.properties | sed "s/elasticsearch *= *//g")
25+
echo "ES_VERSION=$ES_VERSION"
2526

2627
VERSION_SUFFIX=""
2728
if [[ "$WORKFLOW" == "snapshot" ]]; then
2829
VERSION_SUFFIX="-SNAPSHOT"
2930
fi
3031

3132
BEATS_BUILD_ID="$(./.ci/scripts/resolve-dra-manifest.sh beats "$RM_BRANCH" "$ES_VERSION" "$WORKFLOW")"
33+
echo "BEATS_BUILD_ID=$BEATS_BUILD_ID"
34+
3235
ML_CPP_BUILD_ID="$(./.ci/scripts/resolve-dra-manifest.sh ml-cpp "$RM_BRANCH" "$ES_VERSION" "$WORKFLOW")"
36+
echo "ML_CPP_BUILD_ID=$ML_CPP_BUILD_ID"
3337

3438
LICENSE_KEY_ARG=""
3539
BUILD_SNAPSHOT_ARG=""

.ci/bwcVersions

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ BWC_VERSION:
1414
- "8.12.2"
1515
- "8.13.4"
1616
- "8.14.3"
17-
- "8.15.3"
17+
- "8.15.4"
1818
- "8.16.0"
19+
- "8.17.0"
1920
- "9.0.0"

.ci/scripts/packaging-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@ sudo -E env \
7878
--unset=JAVA_HOME \
7979
SYSTEM_JAVA_HOME=`readlink -f -n $BUILD_JAVA_HOME` \
8080
DOCKER_CONFIG="${HOME}/.docker" \
81-
./gradlew -g $HOME/.gradle --scan --parallel --build-cache -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/ --continue $@
81+
./gradlew -g $HOME/.gradle --console=plain --scan --parallel --build-cache -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/ --continue $@
8282

.ci/snapshotBwcVersions

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
BWC_VERSION:
2-
- "8.15.3"
2+
- "8.15.4"
33
- "8.16.0"
4+
- "8.17.0"
45
- "9.0.0"

benchmarks/src/main/java/org/elasticsearch/benchmark/index/codec/tsdb/internal/AbstractDocValuesForUtilBenchmark.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public abstract class AbstractDocValuesForUtilBenchmark {
2121
protected final int blockSize;
2222

2323
public AbstractDocValuesForUtilBenchmark() {
24-
this.forUtil = new DocValuesForUtil();
24+
this.forUtil = new DocValuesForUtil(ES87TSDBDocValuesFormat.NUMERIC_BLOCK_SIZE);
2525
this.blockSize = ES87TSDBDocValuesFormat.NUMERIC_BLOCK_SIZE;
2626
}
2727

benchmarks/src/main/java/org/elasticsearch/benchmark/index/codec/tsdb/internal/DecodeBenchmark.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import org.apache.lucene.store.ByteArrayDataInput;
1313
import org.apache.lucene.store.ByteArrayDataOutput;
1414
import org.apache.lucene.store.DataOutput;
15-
import org.elasticsearch.index.codec.tsdb.DocValuesForUtil;
1615
import org.openjdk.jmh.infra.Blackhole;
1716

1817
import java.io.IOException;
@@ -44,7 +43,7 @@ public void setupInvocation(int bitsPerValue) {
4443

4544
@Override
4645
public void benchmark(int bitsPerValue, Blackhole bh) throws IOException {
47-
DocValuesForUtil.decode(bitsPerValue, this.dataInput, this.output);
46+
forUtil.decode(bitsPerValue, this.dataInput, this.output);
4847
bh.consume(this.output);
4948
}
5049
}

branches.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
{
55
"branch": "main"
66
},
7+
{
8+
"branch": "8.16"
9+
},
710
{
811
"branch": "8.x"
912
},

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/DockerBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public enum DockerBase {
2727
// Chainguard based wolfi image with latest jdk
2828
// This is usually updated via renovatebot
2929
// spotless:off
30-
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:277ebb42c458ef39cb4028f9204f0b3d51d8cd628ea737a65696a1143c3e42fe",
30+
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:bf163e1977002301f7b9fd28fe6837a8cb2dd5c83e4cd45fb67fb28d15d5d40f",
3131
"-wolfi",
3232
"apk"
3333
),

distribution/tools/entitlement-runtime/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@ apply plugin: 'elasticsearch.publish'
1111

1212
dependencies {
1313
compileOnly project(':libs:elasticsearch-core') // For @SuppressForbidden
14+
compileOnly project(":libs:elasticsearch-x-content") // for parsing policy files
1415
compileOnly project(':server') // To access the main server module for special permission checks
1516
compileOnly project(':distribution:tools:entitlement-bridge')
16-
1717
testImplementation project(":test:framework")
1818
}
1919

2020
tasks.named('forbiddenApisMain').configure {
2121
replaceSignatureFiles 'jdk-signatures'
2222
}
23-
24-
tasks.named('forbiddenApisMain').configure {
25-
replaceSignatureFiles 'jdk-signatures'
26-
}

distribution/tools/entitlement-runtime/src/main/java/module-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
module org.elasticsearch.entitlement.runtime {
1111
requires org.elasticsearch.entitlement.bridge;
12+
requires org.elasticsearch.xcontent;
1213
requires org.elasticsearch.server;
1314

1415
exports org.elasticsearch.entitlement.runtime.api;

server/src/main/java/org/elasticsearch/action/search/VersionMismatchException.java renamed to distribution/tools/entitlement-runtime/src/main/java/org/elasticsearch/entitlement/runtime/policy/Entitlement.java

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,13 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
package org.elasticsearch.action.search;
10+
package org.elasticsearch.entitlement.runtime.policy;
1111

12-
import org.elasticsearch.ElasticsearchException;
13-
import org.elasticsearch.common.io.stream.StreamInput;
14-
15-
import java.io.IOException;
16-
17-
public class VersionMismatchException extends ElasticsearchException {
18-
19-
public VersionMismatchException(String msg, Object... args) {
20-
super(msg, args);
21-
}
22-
23-
public VersionMismatchException(StreamInput in) throws IOException {
24-
super(in);
25-
}
12+
/**
13+
* Marker interface to ensure that only {@link Entitlement} are
14+
* part of a {@link Policy}. All entitlement classes should implement
15+
* this.
16+
*/
17+
public interface Entitlement {
2618

2719
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
package org.elasticsearch.entitlement.runtime.policy;
11+
12+
import java.lang.annotation.ElementType;
13+
import java.lang.annotation.Retention;
14+
import java.lang.annotation.RetentionPolicy;
15+
import java.lang.annotation.Target;
16+
17+
/**
18+
* This annotation indicates an {@link Entitlement} is available
19+
* to "external" classes such as those used in plugins. Any {@link Entitlement}
20+
* using this annotation is considered parseable as part of a policy file
21+
* for entitlements.
22+
*/
23+
@Target(ElementType.CONSTRUCTOR)
24+
@Retention(RetentionPolicy.RUNTIME)
25+
public @interface ExternalEntitlement {
26+
27+
/**
28+
* This is the list of parameter names that are
29+
* parseable in {@link PolicyParser#parseEntitlement(String, String)}.
30+
* The number and order of parameter names much match the number and order
31+
* of constructor parameters as this is how the parser will pass in the
32+
* parsed values from a policy file. However, the names themselves do NOT
33+
* have to match the parameter names of the constructor.
34+
*/
35+
String[] parameterNames() default {};
36+
}

0 commit comments

Comments
 (0)