Skip to content

Commit 30c8385

Browse files
Merge branch 'main' into feature/logsdb-ignore-dynamic-beyond-limit
2 parents 9da6b90 + feea0a0 commit 30c8385

File tree

353 files changed

+10149
-2226
lines changed

Some content is hidden

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

353 files changed

+10149
-2226
lines changed

.buildkite/packer_cache.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ for branch in "${branches[@]}"; do
2929
fi
3030

3131
export JAVA_HOME="$HOME/.java/$ES_BUILD_JAVA"
32-
"checkout/${branch}/gradlew" --project-dir "$CHECKOUT_DIR" --parallel -s resolveAllDependencies -Dorg.gradle.warning.mode=none -DisCI
32+
"checkout/${branch}/gradlew" --project-dir "$CHECKOUT_DIR" --parallel -s resolveAllDependencies -Dorg.gradle.warning.mode=none -DisCI --max-workers=4
33+
"checkout/${branch}/gradlew" --stop
34+
pkill -f '.*GradleDaemon.*'
3335
rm -rf "checkout/${branch}"
3436
done

.buildkite/scripts/cloud-deploy.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
set -euo pipefail
44

5-
.ci/scripts/run-gradle.sh buildCloudDockerImage
5+
.ci/scripts/run-gradle.sh buildCloudEssDockerImage
66

77
ES_VERSION=$(grep 'elasticsearch' build-tools-internal/version.properties | awk '{print $3}')
8-
DOCKER_TAG="docker.elastic.co/elasticsearch-ci/elasticsearch-cloud:${ES_VERSION}-${BUILDKITE_COMMIT:0:7}"
9-
docker tag elasticsearch-cloud:test "$DOCKER_TAG"
8+
DOCKER_TAG="docker.elastic.co/elasticsearch-ci/elasticsearch-cloud-ess:${ES_VERSION}-${BUILDKITE_COMMIT:0:7}"
9+
docker tag elasticsearch-cloud-ess:test "$DOCKER_TAG"
1010

1111
echo "$DOCKER_REGISTRY_PASSWORD" | docker login -u "$DOCKER_REGISTRY_USERNAME" --password-stdin docker.elastic.co
1212
unset DOCKER_REGISTRY_USERNAME DOCKER_REGISTRY_PASSWORD

benchmarks/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ dependencies {
4040
// us to invoke the JMH uberjar as usual.
4141
exclude group: 'net.sf.jopt-simple', module: 'jopt-simple'
4242
}
43-
api(project(':libs:elasticsearch-h3'))
43+
api(project(':libs:h3'))
4444
api(project(':modules:aggregations'))
4545
api(project(':x-pack:plugin:esql-core'))
4646
api(project(':x-pack:plugin:esql'))
4747
api(project(':x-pack:plugin:esql:compute'))
48-
implementation project(path: ':libs:elasticsearch-simdvec')
48+
implementation project(path: ':libs:simdvec')
4949
expression(project(path: ':modules:lang-expression', configuration: 'zip'))
5050
painless(project(path: ':modules:lang-painless', configuration: 'zip'))
51-
nativeLib(project(':libs:elasticsearch-native'))
51+
nativeLib(project(':libs:native'))
5252
api "org.openjdk.jmh:jmh-core:$versions.jmh"
5353
annotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:$versions.jmh"
5454
// Dependencies of JMH

build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/PublishPluginFuncTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class PublishPluginFuncTest extends AbstractGradleFuncTest {
1818

1919
def setup() {
2020
// required for JarHell to work
21-
subProject(":libs:elasticsearch-core") << "apply plugin:'java'"
21+
subProject(":libs:core") << "apply plugin:'java'"
2222

2323
configurationCacheCompatible = false
2424
}

build-tools-internal/src/main/groovy/elasticsearch.ide.gradle

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,36 @@ if (providers.systemProperty('idea.active').getOrNull() == 'true') {
122122
.findAll { it != null }
123123
}
124124

125+
// force IntelliJ to generate *.iml files for each imported module
126+
tasks.register("enableExternalConfiguration") {
127+
group = 'ide'
128+
description = 'Enable per-module *.iml files'
129+
130+
doLast {
131+
modifyXml('.idea/misc.xml') {xml ->
132+
def externalStorageConfig = xml.component.find { it.'@name' == 'ExternalStorageConfigurationManager' }
133+
if (externalStorageConfig) {
134+
xml.remove(externalStorageConfig)
135+
}
136+
}
137+
}
138+
}
139+
140+
// modifies the idea module config to enable preview features on 'elasticsearch-native' module
141+
tasks.register("enablePreviewFeatures") {
142+
group = 'ide'
143+
description = 'Enables preview features on native library module'
144+
dependsOn tasks.named("enableExternalConfiguration")
145+
146+
doLast {
147+
['main', 'test'].each { sourceSet ->
148+
modifyXml(".idea/modules/libs/native/elasticsearch.libs.elasticsearch-native.${sourceSet}.iml") { xml ->
149+
xml.component.find { it.'@name' == 'NewModuleRootManager' }?.'@LANGUAGE_LEVEL' = 'JDK_21_PREVIEW'
150+
}
151+
}
152+
}
153+
}
154+
125155
tasks.register('buildDependencyArtifacts') {
126156
group = 'ide'
127157
description = 'Builds artifacts needed as dependency for IDE modules'
@@ -131,7 +161,7 @@ if (providers.systemProperty('idea.active').getOrNull() == 'true') {
131161
':server:generateModulesList',
132162
':server:generatePluginsList',
133163
':generateProviderImpls',
134-
':libs:elasticsearch-native:elasticsearch-native-libraries:extractLibs',
164+
':libs:native:native-libraries:extractLibs',
135165
':x-pack:libs:es-opensaml-security-api:shadowJar'].collect { elasticsearchProject.right()?.task(it) ?: it })
136166
}
137167

@@ -149,7 +179,10 @@ if (providers.systemProperty('idea.active').getOrNull() == 'true') {
149179
testRunner = 'choose_per_test'
150180
}
151181
taskTriggers {
152-
afterSync tasks.named('configureIdeCheckstyle'), tasks.named('configureIdeaGradleJvm'), tasks.named('buildDependencyArtifacts')
182+
afterSync tasks.named('configureIdeCheckstyle'),
183+
tasks.named('configureIdeaGradleJvm'),
184+
tasks.named('buildDependencyArtifacts'),
185+
tasks.named('enablePreviewFeatures')
153186
}
154187
encodings {
155188
encoding = 'UTF-8'

build-tools-internal/src/main/groovy/elasticsearch.stable-api.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ BuildParams.bwcVersions.withIndexCompatible({ it.onOrAfter(Version.fromString(ex
3333
if (unreleasedVersion) {
3434
// For unreleased snapshot versions, build them from source
3535
"oldJar${baseName}"(files(project(unreleasedVersion.gradleProjectPath).tasks.named(buildBwcTaskName(project.name))))
36-
} else if(bwcVersion.onOrAfter('8.7.0') && project.name.endsWith("elasticsearch-logging")==false) {
36+
} else if(bwcVersion.onOrAfter('8.7.0') && project.name.endsWith("logging")==false) {
3737
//there was a package rename in 8.7.0, except for es-logging
38-
"oldJar${baseName}"("org.elasticsearch.plugin:${project.name}:${bwcVersion}")
38+
"oldJar${baseName}"("org.elasticsearch.plugin:elasticsearch-${project.name}:${bwcVersion}")
3939
} else {
4040
// For released versions, download it
41-
"oldJar${baseName}"("org.elasticsearch:${project.name}:${bwcVersion}")
41+
"oldJar${baseName}"("org.elasticsearch:elasticsearch-${project.name}:${bwcVersion}")
4242
}
4343
}
4444

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
@@ -24,7 +24,7 @@ public enum DockerBase {
2424
// Chainguard based wolfi image with latest jdk
2525
// This is usually updated via renovatebot
2626
// spotless:off
27-
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:bf163e1977002301f7b9fd28fe6837a8cb2dd5c83e4cd45fb67fb28d15d5d40f",
27+
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:973431347ad45f40e01afbbd010bf9de929c088a63382239b90dd84f39618bc8",
2828
"-wolfi",
2929
"apk"
3030
),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public static void configureInputNormalization(Project project) {
177177
}
178178

179179
private static void configureNativeLibraryPath(Project project) {
180-
String nativeProject = ":libs:elasticsearch-native:elasticsearch-native-libraries";
180+
String nativeProject = ":libs:native:native-libraries";
181181
Configuration nativeConfig = project.getConfigurations().create("nativeLibs");
182182
nativeConfig.defaultDependencies(deps -> {
183183
deps.add(project.getDependencies().project(Map.of("path", nativeProject, "configuration", "default")));

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,12 @@ private static void configureBwcProject(
165165
DistributionProjectArtifact stableAnalysisPluginProjectArtifact = new DistributionProjectArtifact(
166166
new File(
167167
checkoutDir.get(),
168-
relativeDir + "/build/distributions/" + stableApiProject.getName() + "-" + bwcVersion.get() + "-SNAPSHOT.jar"
168+
relativeDir
169+
+ "/build/distributions/elasticsearch-"
170+
+ stableApiProject.getName()
171+
+ "-"
172+
+ bwcVersion.get()
173+
+ "-SNAPSHOT.jar"
169174
),
170175
null
171176
);
@@ -275,7 +280,7 @@ private static List<DistributionProject> resolveArchiveProjects(File checkoutDir
275280
}
276281

277282
private static List<Project> resolveStableProjects(Project project) {
278-
Set<String> stableProjectNames = Set.of("elasticsearch-logging", "elasticsearch-plugin-api", "elasticsearch-plugin-analysis-api");
283+
Set<String> stableProjectNames = Set.of("logging", "plugin-api", "plugin-analysis-api");
279284
return project.findProject(":libs")
280285
.getSubprojects()
281286
.stream()
@@ -312,7 +317,9 @@ static void createBuildBwcTask(
312317
c.getOutputs().files(expectedOutputFile);
313318
}
314319
c.getOutputs().doNotCacheIf("BWC distribution caching is disabled for local builds", task -> BuildParams.isCi() == false);
315-
c.getArgs().add(projectPath.replace('/', ':') + ":" + assembleTaskName);
320+
c.getArgs().add("-p");
321+
c.getArgs().add(projectPath);
322+
c.getArgs().add(assembleTaskName);
316323
if (project.getGradle().getStartParameter().isBuildCacheEnabled()) {
317324
c.getArgs().add("--build-cache");
318325
}

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,6 @@ private static String distributionProjectName(ElasticsearchDistribution distribu
172172
if (distribution.getType() == InternalElasticsearchDistributionTypes.DOCKER_IRONBANK) {
173173
return projectName + "ironbank-docker" + archString + "-export";
174174
}
175-
if (distribution.getType() == InternalElasticsearchDistributionTypes.DOCKER_CLOUD) {
176-
return projectName + "cloud-docker" + archString + "-export";
177-
}
178175
if (distribution.getType() == InternalElasticsearchDistributionTypes.DOCKER_CLOUD_ESS) {
179176
return projectName + "cloud-ess-docker" + archString + "-export";
180177
}

0 commit comments

Comments
 (0)