Skip to content

Commit

Permalink
Merge branch 'main' into transform_node_info_api
Browse files Browse the repository at this point in the history
  • Loading branch information
przemekwitek committed Jun 7, 2024
2 parents 9c87628 + 40d88a2 commit 96199b7
Show file tree
Hide file tree
Showing 1,812 changed files with 40,287 additions and 19,014 deletions.
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: ["7.17.22", "8.13.5", "8.14.0", "8.15.0"]
BWC_VERSION: ["7.17.22", "8.14.1", "8.15.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
12 changes: 6 additions & 6 deletions .buildkite/pipelines/periodic-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ steps:
env:
BWC_VERSION: 8.12.2

- label: "{{matrix.image}} / 8.13.5 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.13.5
- label: "{{matrix.image}} / 8.13.4 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.13.4
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -543,10 +543,10 @@ steps:
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.13.5
BWC_VERSION: 8.13.4

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

- label: "{{matrix.image}} / 8.15.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.0
Expand Down
16 changes: 8 additions & 8 deletions .buildkite/pipelines/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.13.5 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.13.5#bwcTest
- label: 8.13.4 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.13.4#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -601,7 +601,7 @@ steps:
buildDirectory: /dev/shm/bk
preemptible: true
env:
BWC_VERSION: 8.13.5
BWC_VERSION: 8.13.4
retry:
automatic:
- exit_status: "-1"
Expand All @@ -610,8 +610,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.14.0 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.14.0#bwcTest
- label: 8.14.1 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.14.1#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -620,7 +620,7 @@ steps:
buildDirectory: /dev/shm/bk
preemptible: true
env:
BWC_VERSION: 8.14.0
BWC_VERSION: 8.14.1
retry:
automatic:
- exit_status: "-1"
Expand Down Expand Up @@ -714,7 +714,7 @@ steps:
setup:
ES_RUNTIME_JAVA:
- openjdk17
BWC_VERSION: ["7.17.22", "8.13.5", "8.14.0", "8.15.0"]
BWC_VERSION: ["7.17.22", "8.14.1", "8.15.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down Expand Up @@ -762,7 +762,7 @@ steps:
- openjdk21
- openjdk22
- openjdk23
BWC_VERSION: ["7.17.22", "8.13.5", "8.14.0", "8.15.0"]
BWC_VERSION: ["7.17.22", "8.14.1", "8.15.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
4 changes: 2 additions & 2 deletions .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ BWC_VERSION:
- "8.10.4"
- "8.11.4"
- "8.12.2"
- "8.13.5"
- "8.14.0"
- "8.13.4"
- "8.14.1"
- "8.15.0"
3 changes: 1 addition & 2 deletions .ci/snapshotBwcVersions
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
BWC_VERSION:
- "7.17.22"
- "8.13.5"
- "8.14.0"
- "8.14.1"
- "8.15.0"
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ CHANGELOG.asciidoc merge=union
# These files contain expected text output, and should not be changed on
# Windows
build-tools-internal/src/test/resources/org/elasticsearch/gradle/internal/release/*.asciidoc text eol=lf

x-pack/plugin/esql/src/main/antlr/*.tokens linguist-generated=true
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/*.interp linguist-generated=true
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer*.java linguist-generated=true
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser*.java linguist-generated=true
x-pack/plugin/esql/src/main/generated/** linguist-generated=true

# ESQL functions docs are autogenerated. More information at `docs/reference/esql/functions/README.md`
docs/reference/esql/functions/*/** linguist-generated=true

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.elasticsearch.xpack.esql.core.expression.Literal;
import org.elasticsearch.xpack.esql.core.expression.predicate.regex.RLikePattern;
import org.elasticsearch.xpack.esql.core.tree.Source;
import org.elasticsearch.xpack.esql.core.type.DataTypes;
import org.elasticsearch.xpack.esql.core.type.DataType;
import org.elasticsearch.xpack.esql.core.type.EsField;
import org.elasticsearch.xpack.esql.evaluator.EvalMapper;
import org.elasticsearch.xpack.esql.expression.function.scalar.date.DateTrunc;
Expand All @@ -36,7 +36,6 @@
import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.Add;
import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.Equals;
import org.elasticsearch.xpack.esql.planner.Layout;
import org.elasticsearch.xpack.esql.type.EsqlDataTypes;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
Expand Down Expand Up @@ -102,25 +101,25 @@ private static EvalOperator.ExpressionEvaluator evaluator(String operation) {
case "add" -> {
FieldAttribute longField = longField();
yield EvalMapper.toEvaluator(
new Add(Source.EMPTY, longField, new Literal(Source.EMPTY, 1L, DataTypes.LONG)),
new Add(Source.EMPTY, longField, new Literal(Source.EMPTY, 1L, DataType.LONG)),
layout(longField)
).get(driverContext);
}
case "date_trunc" -> {
FieldAttribute timestamp = new FieldAttribute(
Source.EMPTY,
"timestamp",
new EsField("timestamp", DataTypes.DATETIME, Map.of(), true)
new EsField("timestamp", DataType.DATETIME, Map.of(), true)
);
yield EvalMapper.toEvaluator(
new DateTrunc(Source.EMPTY, new Literal(Source.EMPTY, Duration.ofHours(24), EsqlDataTypes.TIME_DURATION), timestamp),
new DateTrunc(Source.EMPTY, new Literal(Source.EMPTY, Duration.ofHours(24), DataType.TIME_DURATION), timestamp),
layout(timestamp)
).get(driverContext);
}
case "equal_to_const" -> {
FieldAttribute longField = longField();
yield EvalMapper.toEvaluator(
new Equals(Source.EMPTY, longField, new Literal(Source.EMPTY, 100_000L, DataTypes.LONG)),
new Equals(Source.EMPTY, longField, new Literal(Source.EMPTY, 100_000L, DataType.LONG)),
layout(longField)
).get(driverContext);
}
Expand Down Expand Up @@ -148,15 +147,15 @@ private static EvalOperator.ExpressionEvaluator evaluator(String operation) {
}

private static FieldAttribute longField() {
return new FieldAttribute(Source.EMPTY, "long", new EsField("long", DataTypes.LONG, Map.of(), true));
return new FieldAttribute(Source.EMPTY, "long", new EsField("long", DataType.LONG, Map.of(), true));
}

private static FieldAttribute intField() {
return new FieldAttribute(Source.EMPTY, "int", new EsField("int", DataTypes.INTEGER, Map.of(), true));
return new FieldAttribute(Source.EMPTY, "int", new EsField("int", DataType.INTEGER, Map.of(), true));
}

private static FieldAttribute keywordField() {
return new FieldAttribute(Source.EMPTY, "keyword", new EsField("keyword", DataTypes.KEYWORD, Map.of(), true));
return new FieldAttribute(Source.EMPTY, "keyword", new EsField("keyword", DataType.KEYWORD, Map.of(), true));
}

private static Layout layout(FieldAttribute... fields) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
package org.elasticsearch.benchmark.index.mapper;

import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.util.Accountable;
import org.elasticsearch.TransportVersion;
import org.elasticsearch.cluster.ClusterModule;
import org.elasticsearch.cluster.metadata.IndexMetadata;
Expand All @@ -21,10 +22,12 @@
import org.elasticsearch.index.analysis.IndexAnalyzers;
import org.elasticsearch.index.analysis.LowercaseNormalizer;
import org.elasticsearch.index.analysis.NamedAnalyzer;
import org.elasticsearch.index.cache.bitset.BitsetFilterCache;
import org.elasticsearch.index.mapper.MapperMetrics;
import org.elasticsearch.index.mapper.MapperRegistry;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.mapper.ProvidedIdFieldMapper;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.index.similarity.SimilarityService;
import org.elasticsearch.indices.IndicesModule;
import org.elasticsearch.script.Script;
Expand Down Expand Up @@ -52,6 +55,13 @@ public static MapperService create(String mappings) {
MapperRegistry mapperRegistry = new IndicesModule(Collections.emptyList()).getMapperRegistry();

SimilarityService similarityService = new SimilarityService(indexSettings, null, Map.of());
BitsetFilterCache bitsetFilterCache = new BitsetFilterCache(indexSettings, new BitsetFilterCache.Listener() {
@Override
public void onCache(ShardId shardId, Accountable accountable) {}

@Override
public void onRemoval(ShardId shardId, Accountable accountable) {}
});
MapperService mapperService = new MapperService(
() -> TransportVersion.current(),
indexSettings,
Expand All @@ -73,6 +83,7 @@ public <T> T compile(Script script, ScriptContext<T> scriptContext) {
throw new UnsupportedOperationException();
}
},
bitsetFilterCache::getBitSetProducer,
MapperMetrics.NOOP
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ public <T> T compile(Script script, ScriptContext<T> scriptContext) {
throw new UnsupportedOperationException();
}
},
query -> { throw new UnsupportedOperationException(); },
MapperMetrics.NOOP
);

Expand Down
3 changes: 0 additions & 3 deletions branches.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
{
"branch": "8.14"
},
{
"branch": "8.13"
},
{
"branch": "7.17"
}
Expand Down
14 changes: 14 additions & 0 deletions build-conventions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@

import org.gradle.plugins.ide.eclipse.model.SourceFolder


buildscript {
repositories {
maven {
url 'https://jitpack.io'
}
mavenCentral()
}
}

plugins {
id 'java-gradle-plugin'
id 'java-test-fixtures'
Expand Down Expand Up @@ -59,6 +69,10 @@ gradlePlugin {
}

repositories {
maven {
url 'https://jitpack.io'
}

mavenCentral()
gradlePluginPortal()
}
Expand Down
3 changes: 3 additions & 0 deletions build-tools-internal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ tasks.named('licenseHeaders').configure {
*****************************************************************************/

repositories {
maven {
url 'https://jitpack.io'
}
mavenCentral()
gradlePluginPortal()
}
Expand Down
4 changes: 2 additions & 2 deletions build-tools-internal/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=194717442575a6f96e1c1befa2c30e9a4fc90f701d7aee33eb879b79e7ff05c0
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
distributionSha256Sum=f8b4f4772d302c8ff580bc40d0f56e715de69b163546944f787c87abf209c961
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
12 changes: 10 additions & 2 deletions build-tools-internal/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
pluginManagement {
includeBuild "../build-conventions"
repositories {
maven {
url 'https://jitpack.io'
}
mavenCentral()
gradlePluginPortal()
}

includeBuild "../build-conventions"
includeBuild "../build-tools"
}

Expand All @@ -9,4 +17,4 @@ dependencyResolutionManagement {
from(files("../gradle/build.versions.toml"))
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ tasks.register("bwcTest") {

plugins.withType(ElasticsearchTestBasePlugin) {
tasks.withType(Test).matching { it.name ==~ /v[0-9\.]+#.*/ }.configureEach {
onlyIf("BWC tests enabled") { project.bwc_tests_enabled }
boolean bwcEnabled = project.bwc_tests_enabled
onlyIf("BWC tests enabled") { bwcEnabled }
nonInputProperties.systemProperty 'tests.bwc', 'true'
}
}
Expand All @@ -50,5 +51,5 @@ plugins.withType(InternalJavaRestTestPlugin) {
}
}

tasks.matching { it.name.equals("check") }.configureEach {dependsOn(bwcTestSnapshots) }
tasks.matching { it.name.equals("test") }.configureEach {enabled = false}
tasks.matching { it.name.equals("check") }.configureEach { dependsOn(bwcTestSnapshots) }
tasks.matching { it.name.equals("test") }.configureEach { enabled = false }
Loading

0 comments on commit 96199b7

Please sign in to comment.