Skip to content

Commit c6bddfc

Browse files
authored
Merge branch 'elastic:main' into empty_mappings_equals_empty_properties
2 parents 6d27653 + 4640165 commit c6bddfc

File tree

1,365 files changed

+26418
-13563
lines changed

Some content is hidden

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

1,365 files changed

+26418
-13563
lines changed

.buildkite/scripts/dra-workflow.sh

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ WORKFLOW="${DRA_WORKFLOW:-snapshot}"
66
BRANCH="${BUILDKITE_BRANCH:-}"
77

88
# Don't publish main branch to staging
9-
if [[ ("$BRANCH" == "main" || "$BRANCH" == *.x) && "$WORKFLOW" == "staging" ]]; then
9+
if [[ "$BRANCH" == *.x && "$WORKFLOW" == "staging" ]]; then
1010
exit 0
1111
fi
1212

@@ -22,13 +22,19 @@ if [[ "$BRANCH" == "main" ]]; then
2222
fi
2323

2424
ES_VERSION=$(grep elasticsearch build-tools-internal/version.properties | sed "s/elasticsearch *= *//g")
25+
BASE_VERSION="$ES_VERSION"
2526
echo "ES_VERSION=$ES_VERSION"
2627

2728
VERSION_SUFFIX=""
2829
if [[ "$WORKFLOW" == "snapshot" ]]; then
2930
VERSION_SUFFIX="-SNAPSHOT"
3031
fi
3132

33+
if [[ -n "${VERSION_QUALIFIER:-}" ]]; then
34+
ES_VERSION="${ES_VERSION}-${VERSION_QUALIFIER}"
35+
echo "Version qualifier specified. ES_VERSION=${ES_VERSION}."
36+
fi
37+
3238
BEATS_BUILD_ID="$(./.ci/scripts/resolve-dra-manifest.sh beats "$RM_BRANCH" "$ES_VERSION" "$WORKFLOW")"
3339
echo "BEATS_BUILD_ID=$BEATS_BUILD_ID"
3440

@@ -37,6 +43,7 @@ echo "ML_CPP_BUILD_ID=$ML_CPP_BUILD_ID"
3743

3844
LICENSE_KEY_ARG=""
3945
BUILD_SNAPSHOT_ARG=""
46+
VERSION_QUALIFIER_ARG=""
4047

4148
if [[ "$WORKFLOW" == "staging" ]]; then
4249
LICENSE_KEY=$(mktemp -d)/license.key
@@ -47,6 +54,10 @@ if [[ "$WORKFLOW" == "staging" ]]; then
4754
BUILD_SNAPSHOT_ARG="-Dbuild.snapshot=false"
4855
fi
4956

57+
if [[ -n "${VERSION_QUALIFIER:-}" ]]; then
58+
VERSION_QUALIFIER_ARG="-Dbuild.version_qualifier=$VERSION_QUALIFIER"
59+
fi
60+
5061
echo --- Building release artifacts
5162

5263
.ci/scripts/run-gradle.sh -Ddra.artifacts=true \
@@ -56,12 +67,17 @@ echo --- Building release artifacts
5667
-Dcsv="$WORKSPACE/build/distributions/dependencies-${ES_VERSION}${VERSION_SUFFIX}.csv" \
5768
$LICENSE_KEY_ARG \
5869
$BUILD_SNAPSHOT_ARG \
70+
$VERSION_QUALIFIER_ARG \
5971
buildReleaseArtifacts \
6072
exportCompressedDockerImages \
6173
:distribution:generateDependenciesReport
6274

6375
PATH="$PATH:${JAVA_HOME}/bin" # Required by the following script
76+
if [[ -z "${VERSION_QUALIFIER:-}" ]]; then
6477
x-pack/plugin/sql/connectors/tableau/package.sh asm qualifier="$VERSION_SUFFIX"
78+
else
79+
x-pack/plugin/sql/connectors/tableau/package.sh asm qualifier="-$VERSION_QUALIFIER"
80+
fi
6581

6682
# we regenerate this file as part of the release manager invocation
6783
rm "build/distributions/elasticsearch-jdbc-${ES_VERSION}${VERSION_SUFFIX}.taco.sha512"
@@ -88,7 +104,8 @@ docker run --rm \
88104
--branch "$RM_BRANCH" \
89105
--commit "$BUILDKITE_COMMIT" \
90106
--workflow "$WORKFLOW" \
91-
--version "$ES_VERSION" \
107+
--qualifier "${VERSION_QUALIFIER:-}" \
108+
--version "$BASE_VERSION" \
92109
--artifact-set main \
93110
--dependency "beats:https://artifacts-${WORKFLOW}.elastic.co/beats/${BEATS_BUILD_ID}/manifest-${ES_VERSION}${VERSION_SUFFIX}.json" \
94111
--dependency "ml-cpp:https://artifacts-${WORKFLOW}.elastic.co/ml-cpp/${ML_CPP_BUILD_ID}/manifest-${ES_VERSION}${VERSION_SUFFIX}.json"

.buildkite/scripts/dra-workflow.trigger.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ source .buildkite/scripts/branches.sh
88

99
for BRANCH in "${BRANCHES[@]}"; do
1010
if [[ "$BRANCH" == "main" ]]; then
11-
continue
11+
export VERSION_QUALIFIER="alpha1"
1212
fi
1313

1414
INTAKE_PIPELINE_SLUG="elasticsearch-intake"
@@ -24,5 +24,6 @@ for BRANCH in "${BRANCHES[@]}"; do
2424
commit: "$LAST_GOOD_COMMIT"
2525
env:
2626
DRA_WORKFLOW: staging
27+
VERSION_QUALIFIER: ${VERSION_QUALIFIER:-}
2728
EOF
2829
done

.buildkite/scripts/get-latest-test-mutes.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
if [[ ! "${BUILDKITE_PULL_REQUEST:-}" || "${BUILDKITE_AGENT_META_DATA_PROVIDER:-}" == "k8s" ]]; then
3+
if [[ "${BUILDKITE_PULL_REQUEST:-false}" == "false" || "${BUILDKITE_AGENT_META_DATA_PROVIDER:-}" == "k8s" ]]; then
44
exit 0
55
fi
66

benchmarks/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import org.elasticsearch.gradle.internal.test.TestUtil
2+
import org.elasticsearch.gradle.OS
23

34
/*
45
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -77,7 +78,7 @@ tasks.register("copyPainless", Copy) {
7778
}
7879

7980
tasks.named("run").configure {
80-
executable = "${buildParams.runtimeJavaHome.get()}/bin/java"
81+
executable = "${buildParams.runtimeJavaHome.get()}/bin/java" + (OS.current() == OS.WINDOWS ? '.exe' : '')
8182
args << "-Dplugins.dir=${buildDir}/plugins" << "-Dtests.index=${buildDir}/index"
8283
dependsOn "copyExpression", "copyPainless", configurations.nativeLib
8384
systemProperty 'es.nativelibs.path', TestUtil.getTestLibraryPath(file("../libs/native/libraries/build/platform/").toString())

benchmarks/src/main/java/org/elasticsearch/benchmark/bytes/BytesArrayReadLongBenchmark.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class BytesArrayReadLongBenchmark {
4747
@Setup
4848
public void initResults() throws IOException {
4949
final BytesStreamOutput tmp = new BytesStreamOutput();
50-
final long bytes = new ByteSizeValue(dataMb, ByteSizeUnit.MB).getBytes();
50+
final long bytes = ByteSizeValue.of(dataMb, ByteSizeUnit.MB).getBytes();
5151
for (int i = 0; i < bytes / 8; i++) {
5252
tmp.writeLong(i);
5353
}

benchmarks/src/main/java/org/elasticsearch/benchmark/bytes/PagedBytesReferenceReadLongBenchmark.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class PagedBytesReferenceReadLongBenchmark {
4747
@Setup
4848
public void initResults() throws IOException {
4949
final BytesStreamOutput tmp = new BytesStreamOutput();
50-
final long bytes = new ByteSizeValue(dataMb, ByteSizeUnit.MB).getBytes();
50+
final long bytes = ByteSizeValue.of(dataMb, ByteSizeUnit.MB).getBytes();
5151
for (int i = 0; i < bytes / 8; i++) {
5252
tmp.writeLong(i);
5353
}

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
@@ -22,7 +22,7 @@ public enum DockerBase {
2222
// Chainguard based wolfi image with latest jdk
2323
// This is usually updated via renovatebot
2424
// spotless:off
25-
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:eef54b3a414aa53b98f0f8df2633aed83c3ba6230722769282925442968f0364",
25+
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:dd66beec64a7f9b19c6c35a1195153b2b630a55e16ec71949ed5187c5947eea1",
2626
"-wolfi",
2727
"apk"
2828
),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void apply(Project project) {
5353
}
5454

5555
// List of root tasks, by name, whose compileJava task should not use the module path. These are test related sources.
56-
static final Set<String> EXCLUDES = Set.of(":test:framework", ":x-pack:plugin:eql:qa:common");
56+
static final Set<String> EXCLUDES = Set.of(":test:framework", ":x-pack:plugin:eql:qa:common", ":x-pack:plugin:esql:compute:test");
5757

5858
void configureCompileModulePath(Project project) {
5959
// first disable Gradle's builtin module path inference

build-tools/src/main/java/org/elasticsearch/gradle/testclusters/TestClustersAware.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public interface TestClustersAware extends Task {
2626
Collection<ElasticsearchCluster> getClusters();
2727

2828
@ServiceReference(REGISTRY_SERVICE_NAME)
29-
Property<TestClustersRegistry> getRegistery();
29+
Property<TestClustersRegistry> getRegistry();
3030

3131
@ServiceReference(TEST_CLUSTER_TASKS_SERVICE)
3232
Property<TestClustersPlugin.TaskEventsService> getTasksService();
@@ -47,6 +47,14 @@ default void useCluster(ElasticsearchCluster cluster) {
4747
getClusters().add(cluster);
4848
}
4949

50+
default Provider<TestClusterInfo> getClusterInfo(String clusterName) {
51+
return getProject().getProviders().of(TestClusterValueSource.class, source -> {
52+
source.getParameters().getService().set(getRegistry());
53+
source.getParameters().getClusterName().set(clusterName);
54+
source.getParameters().getPath().set(getProject().getIsolated().getPath());
55+
});
56+
}
57+
5058
default void useCluster(Provider<ElasticsearchCluster> cluster) {
5159
useCluster(cluster.get());
5260
}

build-tools/src/main/java/org/elasticsearch/gradle/testclusters/TestClustersPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ private void configureStartClustersHook(Gradle gradle) {
249249
.forEach(awareTask -> {
250250
awareTask.doFirst(task -> {
251251
awareTask.beforeStart();
252-
awareTask.getClusters().forEach(awareTask.getRegistery().get()::maybeStartCluster);
252+
awareTask.getClusters().forEach(awareTask.getRegistry().get()::maybeStartCluster);
253253
});
254254
});
255255
});

0 commit comments

Comments
 (0)