Skip to content

Commit

Permalink
Revert "Merge branch 'main' of github.com:elastic/elasticsearch into …
Browse files Browse the repository at this point in the history
…mergeElserService"

This reverts commit 6a43847, reversing
changes made to c8997ed.
  • Loading branch information
maxhniebergall committed Sep 27, 2024
1 parent 6b8022d commit 4f8b8fb
Show file tree
Hide file tree
Showing 507 changed files with 4,630 additions and 10,471 deletions.
12 changes: 4 additions & 8 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,11 @@ if [[ "${USE_SNYK_CREDENTIALS:-}" == "true" ]]; then
fi

if [[ "${USE_PROD_DOCKER_CREDENTIALS:-}" == "true" ]]; then
if which docker > /dev/null 2>&1; then
DOCKER_REGISTRY_USERNAME="$(vault read -field=username secret/ci/elastic-elasticsearch/migrated/prod_docker_registry_credentials)"
export DOCKER_REGISTRY_USERNAME
DOCKER_REGISTRY_USERNAME="$(vault read -field=username secret/ci/elastic-elasticsearch/migrated/prod_docker_registry_credentials)"
export DOCKER_REGISTRY_USERNAME

DOCKER_REGISTRY_PASSWORD="$(vault read -field=password secret/ci/elastic-elasticsearch/migrated/prod_docker_registry_credentials)"
export DOCKER_REGISTRY_PASSWORD

docker login --username "$DOCKER_REGISTRY_USERNAME" --password "$DOCKER_REGISTRY_PASSWORD" docker.elastic.co
fi
DOCKER_REGISTRY_PASSWORD="$(vault read -field=password secret/ci/elastic-elasticsearch/migrated/prod_docker_registry_credentials)"
export DOCKER_REGISTRY_PASSWORD
fi

if [[ "$BUILDKITE_AGENT_META_DATA_PROVIDER" != *"k8s"* ]]; then
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipelines/intake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ steps:
timeout_in_minutes: 300
matrix:
setup:
BWC_VERSION: ["8.15.3", "8.16.0", "9.0.0"]
BWC_VERSION: ["8.15.2", "8.16.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipelines/periodic-packaging.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ steps:
setup:
image:
- centos-7
- debian-10
- debian-11
- opensuse-leap-15
- oraclelinux-7
Expand Down
7 changes: 4 additions & 3 deletions .buildkite/pipelines/periodic-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ steps:
setup:
image:
- centos-7
- debian-10
- debian-11
- opensuse-leap-15
- oraclelinux-7
Expand Down Expand Up @@ -287,8 +288,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.2 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.2
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -302,7 +303,7 @@ steps:
buildDirectory: /dev/shm/bk
diskSizeGb: 250
env:
BWC_VERSION: 8.15.3
BWC_VERSION: 8.15.2

- 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
1 change: 1 addition & 0 deletions .buildkite/pipelines/periodic-platform-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ steps:
setup:
image:
- centos-7
- debian-10
- debian-11
- opensuse-leap-15
- oraclelinux-7
Expand Down
12 changes: 6 additions & 6 deletions .buildkite/pipelines/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,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.2 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.2#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -313,7 +313,7 @@ steps:
preemptible: true
diskSizeGb: 250
env:
BWC_VERSION: 8.15.3
BWC_VERSION: 8.15.2
retry:
automatic:
- exit_status: "-1"
Expand Down Expand Up @@ -431,7 +431,7 @@ steps:
setup:
ES_RUNTIME_JAVA:
- openjdk17
BWC_VERSION: ["8.15.3", "8.16.0", "9.0.0"]
BWC_VERSION: ["8.15.2", "8.16.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down Expand Up @@ -475,7 +475,7 @@ steps:
ES_RUNTIME_JAVA:
- openjdk21
- openjdk23
BWC_VERSION: ["8.15.3", "8.16.0", "9.0.0"]
BWC_VERSION: ["8.15.2", "8.16.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down Expand Up @@ -584,7 +584,7 @@ steps:
machineType: n2-standard-8
buildDirectory: /dev/shm/bk
diskSizeGb: 250
if: build.branch == "main" || build.branch == "7.17"
if: build.branch == "main" || build.branch == "8.x" || build.branch == "7.17"
- label: check-branch-consistency
command: .ci/scripts/run-gradle.sh branchConsistency
timeout_in_minutes: 15
Expand Down
3 changes: 3 additions & 0 deletions .buildkite/pipelines/pull-request/packaging-tests-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ steps:
setup:
image:
- centos-7
- debian-10
- debian-11
- opensuse-leap-15
- oraclelinux-7
Expand Down Expand Up @@ -39,6 +40,7 @@ steps:
setup:
image:
- centos-7
- debian-10
- debian-11
- opensuse-leap-15
- oraclelinux-7
Expand Down Expand Up @@ -67,6 +69,7 @@ steps:
setup:
image:
- centos-7
- debian-10
- debian-11
- opensuse-leap-15
- oraclelinux-7
Expand Down
2 changes: 1 addition & 1 deletion .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ BWC_VERSION:
- "8.12.2"
- "8.13.4"
- "8.14.3"
- "8.15.3"
- "8.15.2"
- "8.16.0"
- "9.0.0"
3 changes: 1 addition & 2 deletions .ci/scripts/packaging-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [ -f "/etc/os-release" ] ; then
# Work around incorrect lintian version
# https://github.com/elastic/elasticsearch/issues/48573
if [ $VERSION_ID == 10 ] ; then
sudo apt-get update -y || true
sudo apt-get update -y
sudo apt-get install -y --allow-downgrades lintian=2.15.0
fi
fi
Expand Down Expand Up @@ -77,6 +77,5 @@ sudo -E env \
--unset=ES_JAVA_HOME \
--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 $@

2 changes: 1 addition & 1 deletion .ci/snapshotBwcVersions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BWC_VERSION:
- "8.15.3"
- "8.15.2"
- "8.16.0"
- "9.0.0"
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ Contributing to the Elasticsearch codebase

**Repository:** [https://github.com/elastic/elasticsearch](https://github.com/elastic/elasticsearch)

JDK 21 is required to build Elasticsearch. You must have a JDK 21 installation
JDK 17 is required to build Elasticsearch. You must have a JDK 17 installation
with the environment variable `JAVA_HOME` referencing the path to Java home for
your JDK 21 installation.
your JDK 17 installation.

Elasticsearch uses the Gradle wrapper for its build. You can execute Gradle
using the wrapper via the `gradlew` script on Unix systems or `gradlew.bat`
Expand Down Expand Up @@ -152,9 +152,9 @@ The definition of this Elasticsearch cluster can be found [here](build-tools-int
### Importing the project into IntelliJ IDEA

The minimum IntelliJ IDEA version required to import the Elasticsearch project is 2020.1.
Elasticsearch builds using Java 21. When importing into IntelliJ you will need
Elasticsearch builds using Java 17. When importing into IntelliJ you will need
to define an appropriate SDK. The convention is that **this SDK should be named
"21"** so that the project import will detect it automatically. For more details
"17"** so that the project import will detect it automatically. For more details
on defining an SDK in IntelliJ please refer to [their documentation](https://www.jetbrains.com/help/idea/sdk.html#define-sdk).
SDK definitions are global, so you can add the JDK from any project, or after
project import. Importing with a missing JDK will still work, IntelliJ will
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@

package org.elasticsearch.benchmark.tdigest;

import org.elasticsearch.common.breaker.NoopCircuitBreaker;
import org.elasticsearch.search.aggregations.metrics.MemoryTrackingTDigestArrays;
import org.elasticsearch.tdigest.Sort;
import org.elasticsearch.tdigest.arrays.TDigestArrays;
import org.elasticsearch.tdigest.arrays.TDigestDoubleArray;
import org.elasticsearch.tdigest.arrays.TDigestIntArray;
import org.elasticsearch.tdigest.arrays.WrapperTDigestArrays;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
Expand All @@ -53,8 +51,7 @@
@State(Scope.Thread)
public class SortBench {
private final int size = 100000;
private final TDigestArrays arrays = new MemoryTrackingTDigestArrays(new NoopCircuitBreaker("default-wrapper-tdigest-arrays"));
private final TDigestDoubleArray values = arrays.newDoubleArray(size);
private final TDigestDoubleArray values = WrapperTDigestArrays.INSTANCE.newDoubleArray(size);

@Param({ "0", "1", "-1" })
public int sortDirection;
Expand All @@ -75,7 +72,7 @@ public void setup() {

@Benchmark
public void stableSort() {
TDigestIntArray order = arrays.newIntArray(size);
TDigestIntArray order = WrapperTDigestArrays.INSTANCE.newIntArray(size);
for (int i = 0; i < size; i++) {
order.set(i, i);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@

package org.elasticsearch.benchmark.tdigest;

import org.elasticsearch.common.breaker.NoopCircuitBreaker;
import org.elasticsearch.search.aggregations.metrics.MemoryTrackingTDigestArrays;
import org.elasticsearch.tdigest.MergingDigest;
import org.elasticsearch.tdigest.TDigest;
import org.elasticsearch.tdigest.arrays.TDigestArrays;
import org.elasticsearch.tdigest.arrays.WrapperTDigestArrays;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
Expand Down Expand Up @@ -58,25 +56,24 @@
@Threads(1)
@State(Scope.Thread)
public class TDigestBench {
private static final TDigestArrays arrays = new MemoryTrackingTDigestArrays(new NoopCircuitBreaker("default-wrapper-tdigest-arrays"));

public enum TDigestFactory {
MERGE {
@Override
TDigest create(double compression) {
return new MergingDigest(arrays, compression, (int) (10 * compression));
return new MergingDigest(WrapperTDigestArrays.INSTANCE, compression, (int) (10 * compression));
}
},
AVL_TREE {
@Override
TDigest create(double compression) {
return TDigest.createAvlTreeDigest(arrays, compression);
return TDigest.createAvlTreeDigest(WrapperTDigestArrays.INSTANCE, compression);
}
},
HYBRID {
@Override
TDigest create(double compression) {
return TDigest.createHybridDigest(arrays, compression);
return TDigest.createHybridDigest(WrapperTDigestArrays.INSTANCE, compression);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public enum DockerBase {
DEFAULT("ubuntu:20.04", "", "apt-get"),

// "latest" here is intentional, since the image name specifies "8"
UBI("docker.elastic.co/ubi8/ubi-minimal:latest", "-ubi", "microdnf"),
UBI("docker.elastic.co/ubi8/ubi-minimal:latest", "-ubi8", "microdnf"),

// 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"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.gradle.api.tasks.PathSensitivity;
import org.gradle.api.tasks.TaskAction;
import org.gradle.process.ExecOperations;
import org.gradle.process.ExecSpec;
import org.gradle.workers.WorkAction;
import org.gradle.workers.WorkParameters;
import org.gradle.workers.WorkerExecutor;
Expand Down Expand Up @@ -167,7 +166,6 @@ private void pullBaseImage(String baseImage) {
for (int attempt = 1; attempt <= maxAttempts; attempt++) {
try {
LoggedExec.exec(execOperations, spec -> {
maybeConfigureDockerConfig(spec);
spec.executable("docker");
spec.args("pull");
spec.args(baseImage);
Expand All @@ -183,13 +181,6 @@ private void pullBaseImage(String baseImage) {
throw new GradleException("Failed to pull Docker base image [" + baseImage + "], all attempts failed");
}

private void maybeConfigureDockerConfig(ExecSpec spec) {
String dockerConfig = System.getenv("DOCKER_CONFIG");
if (dockerConfig != null) {
spec.environment("DOCKER_CONFIG", dockerConfig);
}
}

@Override
public void execute() {
final Parameters parameters = getParameters();
Expand All @@ -202,8 +193,6 @@ public void execute() {
final boolean isCrossPlatform = isCrossPlatform();

LoggedExec.exec(execOperations, spec -> {
maybeConfigureDockerConfig(spec);

spec.executable("docker");

if (isCrossPlatform) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public class InjectHeaderTests extends InjectFeatureTests {

private static final Map<String, String> headers = Map.of(
"Content-Type",
"application/vnd.elasticsearch+json;compatible-with=8",
"application/vnd.elasticsearch+json;compatible-with=7",
"Accept",
"application/vnd.elasticsearch+json;compatible-with=8"
"application/vnd.elasticsearch+json;compatible-with=7"
);

/**
Expand Down
13 changes: 2 additions & 11 deletions distribution/docker/src/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,9 @@ RUN <%= retry.loop(package_manager,
" ${package_manager} update && \n" +
" ${package_manager} upgrade && \n" +
" ${package_manager} add --no-cache \n" +
" bash java-cacerts curl libstdc++ libsystemd netcat-openbsd p11-kit p11-kit-trust posix-libc-utils shadow tini unzip zip zstd && \n" +
" bash ca-certificates curl libsystemd netcat-openbsd p11-kit p11-kit-trust shadow tini unzip zip zstd && \n" +
" rm -rf /var/cache/apk/* "
) %>
# Set Bash as the default shell for future commands
SHELL ["/bin/bash", "-c"]
# Optionally set Bash as the default shell in the container at runtime
CMD ["/bin/bash"]
<% } else if (docker_base == "default" || docker_base == "cloud") { %>
# Change default shell to bash, then install required packages with retries.
Expand Down Expand Up @@ -231,7 +224,7 @@ COPY --from=builder --chown=0:0 /opt /opt
<% } %>
ENV PATH /usr/share/elasticsearch/bin:\$PATH
ENV SHELL /bin/bash
COPY ${bin_dir}/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
# 1. Sync the user and group permissions of /etc/passwd
Expand All @@ -256,8 +249,6 @@ RUN chmod g=u /etc/passwd && \\
# stays up-to-date with changes to Ubuntu's store)
COPY bin/docker-openjdk /etc/ca-certificates/update.d/docker-openjdk
RUN /etc/ca-certificates/update.d/docker-openjdk
<% } else if (docker_base == 'wolfi') { %>
RUN ln -sf /etc/ssl/certs/java/cacerts /usr/share/elasticsearch/jdk/lib/security/cacerts
<% } else { %>
RUN ln -sf /etc/pki/ca-trust/extracted/java/cacerts /usr/share/elasticsearch/jdk/lib/security/cacerts
<% } %>
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog/111519.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 111519
summary: "ESQL: Don't mutate the `BoolQueryBuilder` in plan"
area: ES|QL
type: bug
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/111535.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 111535
summary: Fix remote cluster credential secure settings reload
area: Authorization
type: bug
issues: []
6 changes: 6 additions & 0 deletions docs/changelog/111548.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 111548
summary: Json parsing exceptions should not cause 500 errors
area: Infra/Core
type: bug
issues:
- 111542
6 changes: 6 additions & 0 deletions docs/changelog/111932.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 111932
summary: Fix union-types where one index is missing the field
area: ES|QL
type: bug
issues:
- 111912
Loading

0 comments on commit 4f8b8fb

Please sign in to comment.