Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/8.x' into locale-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thecoop committed Sep 27, 2024
2 parents 5e3cd28 + d4ae1b5 commit 23ada6b
Show file tree
Hide file tree
Showing 113 changed files with 707 additions and 508 deletions.
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: ["7.17.25", "8.15.2", "8.16.0"]
BWC_VERSION: ["7.17.25", "8.15.3", "8.16.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
1 change: 0 additions & 1 deletion .buildkite/pipelines/periodic-packaging.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ steps:
setup:
image:
- centos-7
- debian-10
- debian-11
- opensuse-leap-15
- oraclelinux-7
Expand Down
7 changes: 3 additions & 4 deletions .buildkite/pipelines/periodic-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ steps:
setup:
image:
- centos-7
- debian-10
- debian-11
- opensuse-leap-15
- oraclelinux-7
Expand Down Expand Up @@ -594,8 +593,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 @@ -609,7 +608,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
1 change: 0 additions & 1 deletion .buildkite/pipelines/periodic-platform-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ 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 @@ -662,8 +662,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 @@ -673,7 +673,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 @@ -771,7 +771,7 @@ steps:
setup:
ES_RUNTIME_JAVA:
- openjdk17
BWC_VERSION: ["7.17.25", "8.15.2", "8.16.0"]
BWC_VERSION: ["7.17.25", "8.15.3", "8.16.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down Expand Up @@ -821,7 +821,7 @@ steps:
- openjdk21
- openjdk22
- openjdk23
BWC_VERSION: ["7.17.25", "8.15.2", "8.16.0"]
BWC_VERSION: ["7.17.25", "8.15.3", "8.16.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down Expand Up @@ -930,7 +930,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
3 changes: 0 additions & 3 deletions .buildkite/pipelines/pull-request/packaging-tests-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ steps:
setup:
image:
- centos-7
- debian-10
- debian-11
- opensuse-leap-15
- oraclelinux-7
Expand Down Expand Up @@ -40,7 +39,6 @@ steps:
setup:
image:
- centos-7
- debian-10
- debian-11
- opensuse-leap-15
- oraclelinux-7
Expand Down Expand Up @@ -69,7 +67,6 @@ 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 @@ -32,5 +32,5 @@ BWC_VERSION:
- "8.12.2"
- "8.13.4"
- "8.14.3"
- "8.15.2"
- "8.15.3"
- "8.16.0"
2 changes: 1 addition & 1 deletion .ci/snapshotBwcVersions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BWC_VERSION:
- "7.17.25"
- "8.15.2"
- "8.15.3"
- "8.16.0"
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public class InternalDistributionModuleCheckTaskProvider {
"org.elasticsearch.nativeaccess",
"org.elasticsearch.plugin",
"org.elasticsearch.plugin.analysis",
"org.elasticsearch.pluginclassloader",
"org.elasticsearch.securesm",
"org.elasticsearch.server",
"org.elasticsearch.simdvec",
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: 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: 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
7 changes: 7 additions & 0 deletions docs/changelog/113570.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pr: 113570
summary: Fix `ignore_above` handling in synthetic source when index level setting
is used
area: Logs
type: bug
issues:
- 113538
18 changes: 0 additions & 18 deletions libs/plugin-classloader/build.gradle

This file was deleted.

12 changes: 0 additions & 12 deletions libs/plugin-classloader/src/main/java/module-info.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,13 @@ teardown:
---
"Deprecated index template with a dot prefix index pattern":
- requires:
test_runner_features: ["warnings", "headers"]
test_runner_features: ["warnings", "headers", "allowed_warnings"]

- do:
warnings:
- "Index [.data-*] name begins with a dot (.), which is deprecated, and will not be allowed in a future Elasticsearch version."
allowed_warnings:
- "index template [my-template] has index patterns [regular, .data-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template] will take precedence during new index creation"
indices.put_index_template:
name: my-template
body:
Expand All @@ -177,7 +179,8 @@ teardown:

- do:
headers: { X-elastic-product-origin: kibana }
warnings:
allowed_warnings:
- "index template [my-template2] has index patterns [other, .data2-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template2] will take precedence during new index creation"
indices.put_index_template:
name: my-template2
body:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -238,29 +237,21 @@ static Tuple<String, String> parseClusterAliasAndIndex(String indexExpression) {
return new Tuple<>(null, null);
}
String trimmed = indexExpression.trim();
String sep = String.valueOf(RemoteClusterAware.REMOTE_CLUSTER_INDEX_SEPARATOR);
if (trimmed.startsWith(sep) || trimmed.endsWith(sep)) {
throw new IllegalArgumentException(
"Unable to parse one single valid index name from the provided index: [" + indexExpression + "]"
);
}

String[] parts = RemoteClusterAware.splitIndexName(trimmed);
// The parser here needs to ensure that the indexExpression is not of the form "remote1:blogs,remote2:blogs"
// because (1) only a single index is allowed for Painless Execute and
// (2) if this method returns Tuple("remote1", "blogs,remote2:blogs") that will not fail with "index not found".
// Instead, it will fail with the inaccurate and confusing error message:
// "Cross-cluster calls are not supported in this context but remote indices were requested: [blogs,remote1:blogs]"
// which comes later out of the IndexNameExpressionResolver pathway this code uses.
String[] parts = indexExpression.split(sep, 2);
if (parts.length == 1) {
return new Tuple<>(null, parts[0]);
} else if (parts.length == 2 && parts[1].contains(sep) == false) {
return new Tuple<>(parts[0], parts[1]);
} else {
if ((parts[0] != null && parts[1].isEmpty())
|| parts[1].contains(String.valueOf(RemoteClusterAware.REMOTE_CLUSTER_INDEX_SEPARATOR))) {
throw new IllegalArgumentException(
"Unable to parse one single valid index name from the provided index: [" + indexExpression + "]"
);
}

return new Tuple<>(parts[0], parts[1]);
}

public String getClusterAlias() {
Expand Down Expand Up @@ -556,18 +547,15 @@ protected void doExecute(Task task, Request request, ActionListener<Response> li
// Visible for testing
static void removeClusterAliasFromIndexExpression(Request request) {
if (request.index() != null) {
String[] split = request.index().split(String.valueOf(RemoteClusterAware.REMOTE_CLUSTER_INDEX_SEPARATOR));
if (split.length > 1) {
String[] split = RemoteClusterAware.splitIndexName(request.index());
if (split[0] != null) {
/*
* if the cluster alias is null and the index field has a clusterAlias (clusterAlias:index notation)
* that means this is executing on a remote cluster (it was forwarded by the querying cluster).
* The clusterAlias is not Writeable, so it will be null in the ContextSetup on the remote cluster.
* We need to strip off the clusterAlias from the index before executing the script locally,
* so it will resolve to a local index
*/
assert split.length == 2
: "If the index contains the REMOTE_CLUSTER_INDEX_SEPARATOR it should have only two parts but it has "
+ Arrays.toString(split);
request.index(split[1]);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,21 +156,10 @@ static void validateAgainstAliases(
}

private static SearchRequest skipRemoteIndexNames(SearchRequest source) {
return new SearchRequest(source).indices(
Arrays.stream(source.indices()).filter(name -> isRemoteExpression(name) == false).toArray(String[]::new)
);
}

private static boolean isRemoteExpression(String expression) {
// An index expression that references a remote cluster uses ":" to separate the cluster-alias from the index portion of the
// expression, e.g., cluster0:index-name
// in the same time date-math `expression` can also contain ':' symbol inside its name
// to distinguish between those two, given `expression` is pre-evaluated using date-math resolver
// after evaluation date-math `expression` should not contain ':' symbol
// otherwise if `expression` is legit remote name, ':' symbol remains
// NOTE: index expressions can be prefixed with "-", which will not be parsed by resolveDateMathExpression,
// but in this particular case it doesn't seem to be relevant.
return IndexNameExpressionResolver.resolveDateMathExpression(expression)
.contains(String.valueOf(RemoteClusterAware.REMOTE_CLUSTER_INDEX_SEPARATOR));
return new SearchRequest(source).indices(
Arrays.stream(source.indices()).filter(name -> RemoteClusterAware.isRemoteIndexName(name) == false).toArray(String[]::new)
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,7 @@ private void assertHttpBodyLogging(Function<Ctx, Runnable> test) throws Exceptio
"request end",
HttpBodyTracer.class.getCanonicalName(),
Level.TRACE,
"* request body (gzip compressed, base64-encoded, and split into * parts on preceding log lines; for details see "
+ "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-network.html#http-rest-request-tracer)"
"* request body (gzip compressed, base64-encoded, and split into * parts on preceding log lines;*)"
)
);
}
Expand Down
Loading

0 comments on commit 23ada6b

Please sign in to comment.