Skip to content

Commit 95da70e

Browse files
Merge branch 'main' into inferenceUpgradeApi
2 parents d59aeec + db8a2d2 commit 95da70e

File tree

559 files changed

+19463
-5526
lines changed

Some content is hidden

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

559 files changed

+19463
-5526
lines changed

.buildkite/pipelines/dra-workflow.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ steps:
22
- command: .buildkite/scripts/dra-workflow.sh
33
env:
44
USE_DRA_CREDENTIALS: "true"
5+
USE_PROD_DOCKER_CREDENTIALS: "true"
56
agents:
67
provider: gcp
78
image: family/elasticsearch-ubuntu-2204
@@ -18,4 +19,5 @@ steps:
1819
branch: "${BUILDKITE_BRANCH}"
1920
env:
2021
DRA_WORKFLOW: staging
22+
USE_PROD_DOCKER_CREDENTIALS: "true"
2123
if: build.env('DRA_WORKFLOW') == 'staging'

.buildkite/pipelines/periodic-packaging.template.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ steps:
2727
image: family/elasticsearch-{{matrix.image}}
2828
diskSizeGb: 350
2929
machineType: n1-standard-8
30-
env: {}
30+
env:
31+
USE_PROD_DOCKER_CREDENTIALS: "true"
3132
- group: packaging-tests-upgrade
3233
steps: $BWC_STEPS
3334
- group: packaging-tests-windows

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ steps:
2828
image: family/elasticsearch-{{matrix.image}}
2929
diskSizeGb: 350
3030
machineType: n1-standard-8
31-
env: {}
31+
env:
32+
USE_PROD_DOCKER_CREDENTIALS: "true"
3233
- group: packaging-tests-upgrade
3334
steps:
3435
- label: "{{matrix.image}} / 8.0.1 / packaging-tests-upgrade"

.buildkite/pipelines/pull-request/packaging-tests-unix-sample.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ steps:
2424
diskSizeGb: 350
2525
machineType: custom-16-32768
2626
env:
27+
USE_PROD_DOCKER_CREDENTIALS: "true"
2728
PACKAGING_TASK: "{{matrix.PACKAGING_TASK}}"

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
@@ -31,7 +31,7 @@ public enum DockerBase {
3131
// Chainguard based wolfi image with latest jdk
3232
// This is usually updated via renovatebot
3333
// spotless:off
34-
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:90888b190da54062f67f3fef1372eb0ae7d81ea55f5a1f56d748b13e4853d984",
34+
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:c16d3ad6cebf387e8dd2ad769f54320c4819fbbaa21e729fad087c7ae223b4d0",
3535
"-wolfi",
3636
"apk"
3737
),

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,13 @@ public void execute(BuildFinishedFlowAction.Parameters parameters) throws FileNo
163163
// So, if you change this such that the artifact will have a slash/directory in it, you'll need to update the logic
164164
// below as well
165165
pb.directory(uploadFileDir);
166-
pb.start().waitFor();
166+
try {
167+
// we are very generious here, as the upload can take
168+
// a long time depending on its size
169+
pb.start().waitFor(30, java.util.concurrent.TimeUnit.MINUTES);
170+
} catch (InterruptedException e) {
171+
System.out.println("Failed to upload buildkite artifact " + e.getMessage());
172+
}
167173

168174
System.out.println("Generating buildscan link for artifact...");
169175

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ public void execute(Task t) {
185185
});
186186

187187
if (OS.current().equals(OS.WINDOWS) && System.getProperty("tests.timeoutSuite") == null) {
188-
// override the suite timeout to 30 mins for windows, because it has the most inefficient filesystem known to man
189-
test.systemProperty("tests.timeoutSuite", "2400000!");
188+
// override the suite timeout to 60 mins for windows, because it has the most inefficient filesystem known to man
189+
test.systemProperty("tests.timeoutSuite", "3600000!");
190190
}
191191

192192
/*

build-tools-internal/src/main/resources/changelog-schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@
284284
"Cluster and node setting",
285285
"Command line tool",
286286
"CRUD",
287+
"ES|QL",
287288
"Index setting",
288289
"Ingest",
289290
"JVM option",

distribution/tools/entitlement-agent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Entitlement Agent
22

3-
This is a java agent that instruments sensitive class library methods with calls into the `entitlement-runtime` module to check for permissions granted under the _entitlements_ system.
3+
This is a java agent that instruments sensitive class library methods with calls into the `entitlement-bridge` module to check for permissions granted under the _entitlements_ system.
44

55
The entitlements system provides an alternative to the legacy `SecurityManager` system, which is deprecated for removal.
66
With this agent, the Elasticsearch server can retain some control over which class library methods can be invoked by which callers.

distribution/tools/entitlement-agent/build.gradle

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

10+
import static java.util.stream.Collectors.joining
11+
1012
apply plugin: 'elasticsearch.build'
13+
apply plugin: 'elasticsearch.embedded-providers'
14+
15+
embeddedProviders {
16+
impl 'entitlement-agent', project(':distribution:tools:entitlement-agent:impl')
17+
}
1118

1219
configurations {
13-
entitlementRuntime
20+
entitlementBridge
1421
}
1522

1623
dependencies {
17-
entitlementRuntime project(":libs:elasticsearch-entitlement-runtime")
18-
implementation project(":libs:elasticsearch-entitlement-runtime")
24+
entitlementBridge project(":distribution:tools:entitlement-bridge")
25+
compileOnly project(":libs:elasticsearch-core")
26+
compileOnly project(":distribution:tools:entitlement-runtime")
1927
testImplementation project(":test:framework")
28+
testImplementation project(":distribution:tools:entitlement-bridge")
29+
testImplementation project(":distribution:tools:entitlement-agent:impl")
2030
}
2131

2232
tasks.named('test').configure {
33+
systemProperty "tests.security.manager", "false"
2334
dependsOn('jar')
24-
jvmArgs "-javaagent:${ tasks.named('jar').flatMap{ it.archiveFile }.get()}"
35+
36+
// Register an argument provider to avoid eager resolution of configurations
37+
jvmArgumentProviders.add(new CommandLineArgumentProvider() {
38+
@Override
39+
Iterable<String> asArguments() {
40+
return ["-javaagent:${tasks.jar.archiveFile.get()}", "-Des.entitlements.bridgeJar=${configurations.entitlementBridge.singleFile}"]
41+
}
42+
})
43+
44+
45+
// The Elasticsearch build plugin automatically adds all compileOnly deps as testImplementation.
46+
// We must not add the bridge this way because it is also on the boot classpath, and that would lead to jar hell.
47+
classpath -= files(configurations.entitlementBridge)
2548
}
2649

2750
tasks.named('jar').configure {

0 commit comments

Comments
 (0)