Skip to content

Commit

Permalink
Merge branch 'main' into esql_move_rule
Browse files Browse the repository at this point in the history
  • Loading branch information
nik9000 committed Sep 26, 2024
2 parents e20c6a0 + 1b5d75f commit 03f78da
Show file tree
Hide file tree
Showing 250 changed files with 6,147 additions and 1,874 deletions.
12 changes: 8 additions & 4 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,15 @@ if [[ "${USE_SNYK_CREDENTIALS:-}" == "true" ]]; then
fi

if [[ "${USE_PROD_DOCKER_CREDENTIALS:-}" == "true" ]]; then
DOCKER_REGISTRY_USERNAME="$(vault read -field=username secret/ci/elastic-elasticsearch/migrated/prod_docker_registry_credentials)"
export DOCKER_REGISTRY_USERNAME
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_PASSWORD="$(vault read -field=password secret/ci/elastic-elasticsearch/migrated/prod_docker_registry_credentials)"
export DOCKER_REGISTRY_PASSWORD
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
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.2", "8.16.0", "9.0.0"]
BWC_VERSION: ["8.15.3", "8.16.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
6 changes: 3 additions & 3 deletions .buildkite/pipelines/periodic-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ steps:
env:
BWC_VERSION: 8.14.3

- label: "{{matrix.image}} / 8.15.2 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.2
- label: "{{matrix.image}} / 8.15.3 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.3
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -303,7 +303,7 @@ steps:
buildDirectory: /dev/shm/bk
diskSizeGb: 250
env:
BWC_VERSION: 8.15.2
BWC_VERSION: 8.15.3

- 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
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.2 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.2#bwcTest
- label: 8.15.3 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.3#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -313,7 +313,7 @@ steps:
preemptible: true
diskSizeGb: 250
env:
BWC_VERSION: 8.15.2
BWC_VERSION: 8.15.3
retry:
automatic:
- exit_status: "-1"
Expand Down Expand Up @@ -431,7 +431,7 @@ steps:
setup:
ES_RUNTIME_JAVA:
- openjdk17
BWC_VERSION: ["8.15.2", "8.16.0", "9.0.0"]
BWC_VERSION: ["8.15.3", "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.2", "8.16.0", "9.0.0"]
BWC_VERSION: ["8.15.3", "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 == "8.x" || build.branch == "7.17"
if: build.branch == "main" || build.branch == "7.17"
- label: check-branch-consistency
command: .ci/scripts/run-gradle.sh branchConsistency
timeout_in_minutes: 15
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.2"
- "8.15.3"
- "8.16.0"
- "9.0.0"
1 change: 1 addition & 0 deletions .ci/scripts/packaging-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,6 @@ 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.2"
- "8.15.3"
- "8.16.0"
- "9.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@

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 @@ -51,7 +53,8 @@
@State(Scope.Thread)
public class SortBench {
private final int size = 100000;
private final TDigestDoubleArray values = WrapperTDigestArrays.INSTANCE.newDoubleArray(size);
private final TDigestArrays arrays = new MemoryTrackingTDigestArrays(new NoopCircuitBreaker("default-wrapper-tdigest-arrays"));
private final TDigestDoubleArray values = arrays.newDoubleArray(size);

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

@Benchmark
public void stableSort() {
TDigestIntArray order = WrapperTDigestArrays.INSTANCE.newIntArray(size);
TDigestIntArray order = arrays.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,9 +21,11 @@

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.WrapperTDigestArrays;
import org.elasticsearch.tdigest.arrays.TDigestArrays;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
Expand Down Expand Up @@ -56,24 +58,25 @@
@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(WrapperTDigestArrays.INSTANCE, compression, (int) (10 * compression));
return new MergingDigest(arrays, compression, (int) (10 * compression));
}
},
AVL_TREE {
@Override
TDigest create(double compression) {
return TDigest.createAvlTreeDigest(WrapperTDigestArrays.INSTANCE, compression);
return TDigest.createAvlTreeDigest(arrays, compression);
}
},
HYBRID {
@Override
TDigest create(double compression) {
return TDigest.createHybridDigest(WrapperTDigestArrays.INSTANCE, compression);
return TDigest.createHybridDigest(arrays, compression);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
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 @@ -166,6 +167,7 @@ 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 @@ -181,6 +183,13 @@ 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 @@ -193,6 +202,8 @@ public void execute() {
final boolean isCrossPlatform = isCrossPlatform();

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

spec.executable("docker");

if (isCrossPlatform) {
Expand Down
13 changes: 11 additions & 2 deletions distribution/docker/src/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,16 @@ RUN <%= retry.loop(package_manager,
" ${package_manager} update && \n" +
" ${package_manager} upgrade && \n" +
" ${package_manager} add --no-cache \n" +
" bash ca-certificates curl libsystemd netcat-openbsd p11-kit p11-kit-trust shadow tini unzip zip zstd && \n" +
" bash java-cacerts curl libstdc++ libsystemd netcat-openbsd p11-kit p11-kit-trust posix-libc-utils 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 @@ -224,7 +231,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 @@ -249,6 +256,8 @@ 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: 0 additions & 5 deletions docs/changelog/111519.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions docs/changelog/111535.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions docs/changelog/111548.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions docs/changelog/111932.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions docs/changelog/112092.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 112092
summary: "Apply auto-flattening to `subobjects: auto`"
area: Mapping
type: enhancement
issues: []
5 changes: 0 additions & 5 deletions docs/changelog/112400.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions docs/changelog/112444.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions docs/changelog/112581.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions docs/changelog/112610.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions docs/changelog/112649.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions docs/changelog/112703.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions docs/changelog/112713.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions docs/changelog/112720.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions docs/changelog/112723.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 112723
summary: Improve DateTime error handling and add some bad date tests
area: Search
type: bug
issues:
- 112190
6 changes: 6 additions & 0 deletions docs/changelog/112761.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 112761
summary: Fix collapse interaction with stored fields
area: Search
type: bug
issues:
- 112646
6 changes: 0 additions & 6 deletions docs/changelog/112872.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions docs/changelog/113314.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 113314
summary: "[ES|QL] Check expression resolved before checking its data type in `ImplicitCasting`"
area: ES|QL
type: bug
issues:
- 113242
6 changes: 6 additions & 0 deletions docs/changelog/113499.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 113499
summary: Fix synthetic source for flattened field when used with `ignore_above`
area: Logs
type: bug
issues:
- 112044

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 03f78da

Please sign in to comment.