Skip to content

Commit

Permalink
Merge branch 'main' into endpoint_validation4
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-rubinstein authored Nov 6, 2024
2 parents 26fbda2 + 8db9181 commit e31044f
Show file tree
Hide file tree
Showing 2,532 changed files with 66,539 additions and 38,548 deletions.
4 changes: 2 additions & 2 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export COMPOSE_HTTP_TIMEOUT
JOB_BRANCH="$BUILDKITE_BRANCH"
export JOB_BRANCH

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

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

export $(cat .ci/java-versions.properties | grep '=' | xargs)
Expand Down
4 changes: 3 additions & 1 deletion .buildkite/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ for branch in "${branches[@]}"; do
fi

export JAVA_HOME="$HOME/.java/$ES_BUILD_JAVA"
"checkout/${branch}/gradlew" --project-dir "$CHECKOUT_DIR" --parallel -s resolveAllDependencies -Dorg.gradle.warning.mode=none -DisCI
"checkout/${branch}/gradlew" --project-dir "$CHECKOUT_DIR" --parallel -s resolveAllDependencies -Dorg.gradle.warning.mode=none -DisCI --max-workers=4
"checkout/${branch}/gradlew" --stop
pkill -f '.*GradleDaemon.*'
rm -rf "checkout/${branch}"
done
2 changes: 1 addition & 1 deletion .buildkite/pipelines/intake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ steps:
timeout_in_minutes: 300
matrix:
setup:
BWC_VERSION: ["8.15.3", "8.16.0", "8.17.0", "9.0.0"]
BWC_VERSION: ["8.15.4", "8.16.0", "8.17.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
1 change: 0 additions & 1 deletion .buildkite/pipelines/lucene-snapshot/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ steps:
matrix:
setup:
BWC_VERSION:
- 7.17.13
- 8.9.1
- 8.10.0
agents:
Expand Down
2 changes: 0 additions & 2 deletions .buildkite/pipelines/periodic-packaging.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ steps:
matrix:
setup:
image:
- windows-2016
- windows-2019
- windows-2022
agents:
provider: gcp
Expand Down
8 changes: 3 additions & 5 deletions .buildkite/pipelines/periodic-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ steps:
env:
BWC_VERSION: 8.14.3

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

- label: "{{matrix.image}} / 8.16.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.16.0
Expand Down Expand Up @@ -345,8 +345,6 @@ steps:
matrix:
setup:
image:
- windows-2016
- windows-2019
- windows-2022
agents:
provider: gcp
Expand Down
2 changes: 0 additions & 2 deletions .buildkite/pipelines/periodic-platform-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ steps:
matrix:
setup:
image:
- windows-2016
- windows-2019
- windows-2022
GRADLE_TASK:
- checkPart1
Expand Down
10 changes: 5 additions & 5 deletions .buildkite/pipelines/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.15.3 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.3#bwcTest
- label: 8.15.4 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.4#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -297,7 +297,7 @@ steps:
buildDirectory: /dev/shm/bk
preemptible: true
env:
BWC_VERSION: 8.15.3
BWC_VERSION: 8.15.4
retry:
automatic:
- exit_status: "-1"
Expand Down Expand Up @@ -429,7 +429,7 @@ steps:
setup:
ES_RUNTIME_JAVA:
- openjdk21
BWC_VERSION: ["8.15.3", "8.16.0", "8.17.0", "9.0.0"]
BWC_VERSION: ["8.15.4", "8.16.0", "8.17.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down Expand Up @@ -471,7 +471,7 @@ steps:
ES_RUNTIME_JAVA:
- openjdk21
- openjdk23
BWC_VERSION: ["8.15.3", "8.16.0", "8.17.0", "9.0.0"]
BWC_VERSION: ["8.15.4", "8.16.0", "8.17.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ steps:
matrix:
setup:
image:
- windows-2019
- windows-2022
PACKAGING_TASK:
- default-windows-archive
agents:
Expand Down
2 changes: 0 additions & 2 deletions .buildkite/pipelines/pull-request/packaging-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ steps:
matrix:
setup:
image:
- windows-2016
- windows-2019
- windows-2022
PACKAGING_TASK:
- default-windows-archive
Expand Down
6 changes: 3 additions & 3 deletions .buildkite/scripts/cloud-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

set -euo pipefail

.ci/scripts/run-gradle.sh buildCloudDockerImage
.ci/scripts/run-gradle.sh buildCloudEssDockerImage

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

echo "$DOCKER_REGISTRY_PASSWORD" | docker login -u "$DOCKER_REGISTRY_USERNAME" --password-stdin docker.elastic.co
unset DOCKER_REGISTRY_USERNAME DOCKER_REGISTRY_PASSWORD
Expand Down
2 changes: 1 addition & 1 deletion .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ BWC_VERSION:
- "8.12.2"
- "8.13.4"
- "8.14.3"
- "8.15.3"
- "8.15.4"
- "8.16.0"
- "8.17.0"
- "9.0.0"
2 changes: 1 addition & 1 deletion .ci/scripts/packaging-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@ sudo -E env \
--unset=JAVA_HOME \
SYSTEM_JAVA_HOME=`readlink -f -n $BUILD_JAVA_HOME` \
DOCKER_CONFIG="${HOME}/.docker" \
./gradlew -g $HOME/.gradle --scan --parallel --build-cache -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/ --continue $@
./gradlew -g $HOME/.gradle --console=plain --scan --parallel --build-cache -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/ --continue $@

2 changes: 1 addition & 1 deletion .ci/snapshotBwcVersions
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BWC_VERSION:
- "8.15.3"
- "8.15.4"
- "8.16.0"
- "8.17.0"
- "9.0.0"
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ gradle @elastic/es-delivery
build-conventions @elastic/es-delivery
build-tools @elastic/es-delivery
build-tools-internal @elastic/es-delivery
*.gradle @elastic/es-delivery
.buildkite @elastic/es-delivery
.ci @elastic/es-delivery
.idea @elastic/es-delivery
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/sync-main-to-jdk-branch.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Quickly set up Elasticsearch and Kibana in Docker for local development or testi
- If you're using Microsoft Windows, then install https://learn.microsoft.com/en-us/windows/wsl/install[Windows Subsystem for Linux (WSL)].

==== Trial license
This setup comes with a one-month trial license that includes all Elastic features.

This setup comes with a one-month trial of the Elastic *Platinum* license.
After the trial period, the license reverts to *Free and open - Basic*.
Refer to https://www.elastic.co/subscriptions[Elastic subscriptions] for more information.

Expand Down
6 changes: 3 additions & 3 deletions benchmarks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ dependencies {
// us to invoke the JMH uberjar as usual.
exclude group: 'net.sf.jopt-simple', module: 'jopt-simple'
}
api(project(':libs:elasticsearch-h3'))
api(project(':libs:h3'))
api(project(':modules:aggregations'))
api(project(':x-pack:plugin:esql-core'))
api(project(':x-pack:plugin:esql'))
api(project(':x-pack:plugin:esql:compute'))
implementation project(path: ':libs:elasticsearch-simdvec')
implementation project(path: ':libs:simdvec')
expression(project(path: ':modules:lang-expression', configuration: 'zip'))
painless(project(path: ':modules:lang-painless', configuration: 'zip'))
nativeLib(project(':libs:elasticsearch-native'))
nativeLib(project(':libs:native'))
api "org.openjdk.jmh:jmh-core:$versions.jmh"
annotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:$versions.jmh"
// Dependencies of JMH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public abstract class AbstractDocValuesForUtilBenchmark {
protected final int blockSize;

public AbstractDocValuesForUtilBenchmark() {
this.forUtil = new DocValuesForUtil();
this.forUtil = new DocValuesForUtil(ES87TSDBDocValuesFormat.NUMERIC_BLOCK_SIZE);
this.blockSize = ES87TSDBDocValuesFormat.NUMERIC_BLOCK_SIZE;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.apache.lucene.store.ByteArrayDataInput;
import org.apache.lucene.store.ByteArrayDataOutput;
import org.apache.lucene.store.DataOutput;
import org.elasticsearch.index.codec.tsdb.DocValuesForUtil;
import org.openjdk.jmh.infra.Blackhole;

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

@Override
public void benchmark(int bitsPerValue, Blackhole bh) throws IOException {
DocValuesForUtil.decode(bitsPerValue, this.dataInput, this.output);
forUtil.decode(bitsPerValue, this.dataInput, this.output);
bh.consume(this.output);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.apache.lucene.store.MMapDirectory;
import org.apache.lucene.util.hnsw.RandomVectorScorer;
import org.apache.lucene.util.hnsw.RandomVectorScorerSupplier;
import org.apache.lucene.util.quantization.RandomAccessQuantizedByteVectorValues;
import org.apache.lucene.util.quantization.QuantizedByteVectorValues;
import org.apache.lucene.util.quantization.ScalarQuantizer;
import org.elasticsearch.common.logging.LogConfigurator;
import org.elasticsearch.core.IOUtils;
Expand Down Expand Up @@ -217,19 +217,17 @@ public float squareDistanceScalar() {
return 1 / (1f + adjustedDistance);
}

RandomAccessQuantizedByteVectorValues vectorValues(int dims, int size, IndexInput in, VectorSimilarityFunction sim) throws IOException {
QuantizedByteVectorValues vectorValues(int dims, int size, IndexInput in, VectorSimilarityFunction sim) throws IOException {
var sq = new ScalarQuantizer(0.1f, 0.9f, (byte) 7);
var slice = in.slice("values", 0, in.length());
return new OffHeapQuantizedByteVectorValues.DenseOffHeapVectorValues(dims, size, sq, false, sim, null, slice);
}

RandomVectorScorerSupplier luceneScoreSupplier(RandomAccessQuantizedByteVectorValues values, VectorSimilarityFunction sim)
throws IOException {
RandomVectorScorerSupplier luceneScoreSupplier(QuantizedByteVectorValues values, VectorSimilarityFunction sim) throws IOException {
return new Lucene99ScalarQuantizedVectorScorer(null).getRandomVectorScorerSupplier(sim, values);
}

RandomVectorScorer luceneScorer(RandomAccessQuantizedByteVectorValues values, VectorSimilarityFunction sim, float[] queryVec)
throws IOException {
RandomVectorScorer luceneScorer(QuantizedByteVectorValues values, VectorSimilarityFunction sim, float[] queryVec) throws IOException {
return new Lucene99ScalarQuantizedVectorScorer(null).getRandomVectorScorer(sim, values, queryVec);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PublishPluginFuncTest extends AbstractGradleFuncTest {

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

configurationCacheCompatible = false
}
Expand Down
37 changes: 35 additions & 2 deletions build-tools-internal/src/main/groovy/elasticsearch.ide.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,36 @@ if (providers.systemProperty('idea.active').getOrNull() == 'true') {
.findAll { it != null }
}

// force IntelliJ to generate *.iml files for each imported module
tasks.register("enableExternalConfiguration") {
group = 'ide'
description = 'Enable per-module *.iml files'

doLast {
modifyXml('.idea/misc.xml') {xml ->
def externalStorageConfig = xml.component.find { it.'@name' == 'ExternalStorageConfigurationManager' }
if (externalStorageConfig) {
xml.remove(externalStorageConfig)
}
}
}
}

// modifies the idea module config to enable preview features on ':libs:native' module
tasks.register("enablePreviewFeatures") {
group = 'ide'
description = 'Enables preview features on native library module'
dependsOn tasks.named("enableExternalConfiguration")

doLast {
['main', 'test'].each { sourceSet ->
modifyXml(".idea/modules/libs/native/elasticsearch.libs.${project.project(':libs:native').name}.${sourceSet}.iml") { xml ->
xml.component.find { it.'@name' == 'NewModuleRootManager' }?.'@LANGUAGE_LEVEL' = 'JDK_21_PREVIEW'
}
}
}
}

tasks.register('buildDependencyArtifacts') {
group = 'ide'
description = 'Builds artifacts needed as dependency for IDE modules'
Expand All @@ -131,7 +161,7 @@ if (providers.systemProperty('idea.active').getOrNull() == 'true') {
':server:generateModulesList',
':server:generatePluginsList',
':generateProviderImpls',
':libs:elasticsearch-native:elasticsearch-native-libraries:extractLibs',
':libs:native:native-libraries:extractLibs',
':x-pack:libs:es-opensaml-security-api:shadowJar'].collect { elasticsearchProject.right()?.task(it) ?: it })
}

Expand All @@ -149,7 +179,10 @@ if (providers.systemProperty('idea.active').getOrNull() == 'true') {
testRunner = 'choose_per_test'
}
taskTriggers {
afterSync tasks.named('configureIdeCheckstyle'), tasks.named('configureIdeaGradleJvm'), tasks.named('buildDependencyArtifacts')
afterSync tasks.named('configureIdeCheckstyle'),
tasks.named('configureIdeaGradleJvm'),
tasks.named('buildDependencyArtifacts'),
tasks.named('enablePreviewFeatures')
}
encodings {
encoding = 'UTF-8'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ BuildParams.bwcVersions.withIndexCompatible({ it.onOrAfter(Version.fromString(ex
if (unreleasedVersion) {
// For unreleased snapshot versions, build them from source
"oldJar${baseName}"(files(project(unreleasedVersion.gradleProjectPath).tasks.named(buildBwcTaskName(project.name))))
} else if(bwcVersion.onOrAfter('8.7.0') && project.name.endsWith("elasticsearch-logging")==false) {
} else if(bwcVersion.onOrAfter('8.7.0') && project.name.endsWith("logging")==false) {
//there was a package rename in 8.7.0, except for es-logging
"oldJar${baseName}"("org.elasticsearch.plugin:${project.name}:${bwcVersion}")
"oldJar${baseName}"("org.elasticsearch.plugin:elasticsearch-${project.name}:${bwcVersion}")
} else {
// For released versions, download it
"oldJar${baseName}"("org.elasticsearch:${project.name}:${bwcVersion}")
"oldJar${baseName}"("org.elasticsearch:elasticsearch-${project.name}:${bwcVersion}")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@ public enum DockerBase {
// The Iron Bank base image is UBI (albeit hardened), but we are required to parameterize the Docker build
IRON_BANK("${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}", "-ironbank", "yum"),

// Base image with extras for Cloud
CLOUD("ubuntu:20.04", "-cloud", "apt-get"),

// Chainguard based wolfi image with latest jdk
// This is usually updated via renovatebot
// spotless:off
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:277ebb42c458ef39cb4028f9204f0b3d51d8cd628ea737a65696a1143c3e42fe",
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:973431347ad45f40e01afbbd010bf9de929c088a63382239b90dd84f39618bc8",
"-wolfi",
"apk"
),
Expand Down
Loading

0 comments on commit e31044f

Please sign in to comment.