Skip to content

Commit

Permalink
Merge branch 'main' into non-issue/rescore-vector-use-size-as-k
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Dec 18, 2024
2 parents e03f240 + 5663efa commit 1674d50
Show file tree
Hide file tree
Showing 371 changed files with 10,753 additions and 1,820 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: ["8.16.2", "8.17.1", "8.18.0", "9.0.0"]
BWC_VERSION: ["8.16.3", "8.17.1", "8.18.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 @@ -287,8 +287,8 @@ steps:
env:
BWC_VERSION: 8.15.5

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

- label: "{{matrix.image}} / 8.17.1 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.1
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 @@ -63,6 +63,7 @@ steps:
image:
- almalinux-8-aarch64
- ubuntu-2004-aarch64
- ubuntu-2404-aarch64
GRADLE_TASK:
- checkPart1
- checkPart2
Expand Down
10 changes: 5 additions & 5 deletions .buildkite/pipelines/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.16.2 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.16.2#bwcTest
- label: 8.16.3 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.16.3#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -316,7 +316,7 @@ steps:
buildDirectory: /dev/shm/bk
preemptible: true
env:
BWC_VERSION: 8.16.2
BWC_VERSION: 8.16.3
retry:
automatic:
- exit_status: "-1"
Expand Down Expand Up @@ -448,7 +448,7 @@ steps:
setup:
ES_RUNTIME_JAVA:
- openjdk21
BWC_VERSION: ["8.16.2", "8.17.1", "8.18.0", "9.0.0"]
BWC_VERSION: ["8.16.3", "8.17.1", "8.18.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down Expand Up @@ -490,7 +490,7 @@ steps:
ES_RUNTIME_JAVA:
- openjdk21
- openjdk23
BWC_VERSION: ["8.16.2", "8.17.1", "8.18.0", "9.0.0"]
BWC_VERSION: ["8.16.3", "8.17.1", "8.18.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
2 changes: 1 addition & 1 deletion .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BWC_VERSION:
- "8.13.4"
- "8.14.3"
- "8.15.5"
- "8.16.2"
- "8.16.3"
- "8.17.1"
- "8.18.0"
- "9.0.0"
2 changes: 1 addition & 1 deletion .ci/snapshotBwcVersions
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BWC_VERSION:
- "8.16.2"
- "8.16.3"
- "8.17.1"
- "8.18.0"
- "9.0.0"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ testfixtures_shared/
# Generated
checkstyle_ide.xml
x-pack/plugin/esql/src/main/generated-src/generated/

# JEnv
.java-version
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public enum DockerBase {
// Chainguard based wolfi image with latest jdk
// This is usually updated via renovatebot
// spotless:off
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:1b51ff6dba78c98d3e02b0cd64a8ce3238c7a40408d21e3af12a329d44db6f23",
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:bfdeddb33330a281950c2a54adef991dbbe6a42832bc505d13b11beaf50ae73f",
"-wolfi",
"apk"
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
import org.gradle.api.Task;
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.artifacts.component.ModuleComponentIdentifier;
import org.gradle.api.file.FileCollection;
import org.gradle.api.tasks.TaskProvider;

import java.io.File;
import java.nio.file.Path;

import static org.elasticsearch.gradle.internal.util.DependenciesUtils.createFileCollectionFromNonTransitiveArtifactsView;
import static org.elasticsearch.gradle.internal.util.DependenciesUtils.thirdPartyDependenciesView;
import static org.elasticsearch.gradle.internal.util.ParamsUtils.loadBuildParams;

public class ThirdPartyAuditPrecommitPlugin extends PrecommitPlugin {
Expand All @@ -47,7 +49,6 @@ public TaskProvider<? extends Task> createTask(Project project) {
project.getDependencies().add(JDK_JAR_HELL_CONFIG_NAME, elasticsearchCoreProject);
}
}

TaskProvider<ExportElasticsearchBuildResourcesTask> resourcesTask = project.getTasks()
.register("thirdPartyAuditResources", ExportElasticsearchBuildResourcesTask.class);
Path resourcesDir = project.getBuildDir().toPath().resolve("third-party-audit-config");
Expand All @@ -59,9 +60,11 @@ public TaskProvider<? extends Task> createTask(Project project) {
// usually only one task is created. but this construct makes our integTests easier to setup
project.getTasks().withType(ThirdPartyAuditTask.class).configureEach(t -> {
Configuration runtimeConfiguration = project.getConfigurations().getByName("runtimeClasspath");
FileCollection runtimeThirdParty = thirdPartyDependenciesView(runtimeConfiguration);
Configuration compileOnly = project.getConfigurations()
.getByName(CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME);
t.setClasspath(runtimeConfiguration.plus(compileOnly));
FileCollection compileOnlyThirdParty = thirdPartyDependenciesView(compileOnly);
t.getThirdPartyClasspath().from(runtimeThirdParty, compileOnlyThirdParty);
t.getJarsToScan()
.from(
createFileCollectionFromNonTransitiveArtifactsView(
Expand All @@ -78,7 +81,7 @@ public TaskProvider<? extends Task> createTask(Project project) {
t.getJavaHome().set(buildParams.flatMap(params -> params.getRuntimeJavaHome()).map(File::getPath));
t.setSignatureFile(resourcesDir.resolve("forbidden/third-party-audit.txt").toFile());
t.getJdkJarHellClasspath().from(jdkJarHellConfig);
t.getForbiddenAPIsClasspath().from(project.getConfigurations().getByName("forbiddenApisCliJar").plus(compileOnly));
t.getForbiddenAPIsClasspath().from(project.getConfigurations().getByName("forbiddenApisCliJar").plus(compileOnlyThirdParty));
});
return audit;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.gradle.api.JavaVersion;
import org.gradle.api.file.ArchiveOperations;
import org.gradle.api.file.ConfigurableFileCollection;
import org.gradle.api.file.FileCollection;
import org.gradle.api.file.FileSystemOperations;
import org.gradle.api.file.FileTree;
import org.gradle.api.file.ProjectLayout;
Expand Down Expand Up @@ -96,8 +95,6 @@ public abstract class ThirdPartyAuditTask extends DefaultTask {

private final ProjectLayout projectLayout;

private FileCollection classpath;

@Inject
public ThirdPartyAuditTask(
ArchiveOperations archiveOperations,
Expand Down Expand Up @@ -198,9 +195,7 @@ public Set<String> getMissingClassExcludes() {
public abstract Property<JavaVersion> getRuntimeJavaVersion();

@Classpath
public FileCollection getClasspath() {
return classpath;
}
public abstract ConfigurableFileCollection getThirdPartyClasspath();

@TaskAction
public void runThirdPartyAudit() throws IOException {
Expand Down Expand Up @@ -345,7 +340,7 @@ private String runForbiddenAPIsCli() throws IOException {
if (javaHome.isPresent()) {
spec.setExecutable(javaHome.get() + "/bin/java");
}
spec.classpath(getForbiddenAPIsClasspath(), classpath);
spec.classpath(getForbiddenAPIsClasspath(), getThirdPartyClasspath());
// Enable explicitly for each release as appropriate. Just JDK 20/21/22/23 for now, and just the vector module.
if (isJavaVersion(VERSION_20) || isJavaVersion(VERSION_21) || isJavaVersion(VERSION_22) || isJavaVersion(VERSION_23)) {
spec.jvmArgs("--add-modules", "jdk.incubator.vector");
Expand Down Expand Up @@ -383,7 +378,7 @@ private boolean isJavaVersion(JavaVersion version) {
private Set<String> runJdkJarHellCheck() throws IOException {
ByteArrayOutputStream standardOut = new ByteArrayOutputStream();
ExecResult execResult = execOperations.javaexec(spec -> {
spec.classpath(getJdkJarHellClasspath(), classpath);
spec.classpath(getJdkJarHellClasspath(), getThirdPartyClasspath());
spec.getMainClass().set(JDK_JAR_HELL_MAIN_CLASS);
spec.args(getJarExpandDir());
spec.setIgnoreExitValue(true);
Expand All @@ -402,8 +397,4 @@ private Set<String> runJdkJarHellCheck() throws IOException {
return new TreeSet<>(Arrays.asList(jdkJarHellCheckList.split("\\r?\\n")));
}

public void setClasspath(FileCollection classpath) {
this.classpath = classpath;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@

package org.elasticsearch.gradle.internal.util;

import com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin;

import org.gradle.api.artifacts.Configuration;
import org.gradle.api.artifacts.ResolvableDependencies;
import org.gradle.api.artifacts.component.ComponentIdentifier;
import org.gradle.api.artifacts.component.ProjectComponentIdentifier;
import org.gradle.api.artifacts.result.ResolvedComponentResult;
import org.gradle.api.artifacts.result.ResolvedDependencyResult;
import org.gradle.api.file.FileCollection;
import org.gradle.api.provider.Provider;
import org.gradle.api.specs.AndSpec;
import org.gradle.api.specs.Spec;

Expand All @@ -29,7 +33,7 @@ public static FileCollection createFileCollectionFromNonTransitiveArtifactsView(
) {
ResolvableDependencies incoming = configuration.getIncoming();
return incoming.artifactView(viewConfiguration -> {
Set<ComponentIdentifier> firstLevelDependencyComponents = incoming.getResolutionResult()
Provider<Set<ComponentIdentifier>> firstLevelDependencyComponents = incoming.getResolutionResult()
.getRootComponent()
.map(
rootComponent -> rootComponent.getDependencies()
Expand All @@ -39,12 +43,36 @@ public static FileCollection createFileCollectionFromNonTransitiveArtifactsView(
.filter(dependency -> dependency.getSelected() instanceof ResolvedComponentResult)
.map(dependency -> dependency.getSelected().getId())
.collect(Collectors.toSet())
)
.get();
);
viewConfiguration.componentFilter(
new AndSpec<>(identifier -> firstLevelDependencyComponents.contains(identifier), componentFilter)
new AndSpec<>(identifier -> firstLevelDependencyComponents.get().contains(identifier), componentFilter)
);
}).getFiles();
}

/**
* This method gives us an artifact view of a configuration that filters out all
* project dependencies that are not shadowed jars.
* Basically a thirdparty only view of the dependency tree.
*/
public static FileCollection thirdPartyDependenciesView(Configuration configuration) {
ResolvableDependencies incoming = configuration.getIncoming();
return incoming.artifactView(v -> {
// resolve componentIdentifier for all shadowed project dependencies
Provider<Set<ComponentIdentifier>> shadowedDependencies = incoming.getResolutionResult()
.getRootComponent()
.map(
root -> root.getDependencies()
.stream()
.filter(dep -> dep instanceof ResolvedDependencyResult)
.map(dep -> (ResolvedDependencyResult) dep)
.filter(dep -> dep.getResolvedVariant().getDisplayName() == ShadowBasePlugin.COMPONENT_NAME)
.filter(dep -> dep.getSelected() instanceof ResolvedComponentResult)
.map(dep -> dep.getSelected().getId())
.collect(Collectors.toSet())
);
// filter out project dependencies if they are not a shadowed dependency
v.componentFilter(i -> (i instanceof ProjectComponentIdentifier == false || shadowedDependencies.get().contains(i)));
}).getFiles();
}
}
2 changes: 2 additions & 0 deletions build-tools-internal/src/main/resources/changelog-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@
"compatibilityChangeArea": {
"type": "string",
"enum": [
"Aggregations",
"Analysis",
"Authorization",
"Cluster and node setting",
Expand All @@ -295,6 +296,7 @@
"Painless",
"REST API",
"Rollup",
"Search",
"System requirement",
"Transform"
]
Expand Down
3 changes: 2 additions & 1 deletion docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ testClusters.matching { it.name == "yamlRestTest"}.configureEach {
setting 'xpack.security.enabled', 'true'
setting 'xpack.security.authc.api_key.enabled', 'true'
setting 'xpack.security.authc.token.enabled', 'true'
// disable the ILM history for doc tests to avoid potential lingering tasks that'd cause test flakiness
// disable the ILM and SLM history for doc tests to avoid potential lingering tasks that'd cause test flakiness
setting 'indices.lifecycle.history_index_enabled', 'false'
setting 'slm.history_index_enabled', 'false'
setting 'xpack.license.self_generated.type', 'trial'
setting 'xpack.security.authc.realms.file.file.order', '0'
setting 'xpack.security.authc.realms.native.native.order', '1'
Expand Down
5 changes: 0 additions & 5 deletions docs/changelog/116358.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions docs/changelog/116388.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 116388
summary: Add support for partial shard results
area: EQL
type: enhancement
issues: []
5 changes: 0 additions & 5 deletions docs/changelog/116423.yaml

This file was deleted.

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

This file was deleted.

5 changes: 5 additions & 0 deletions docs/changelog/117778.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 117778
summary: "[Connector APIs] Enforce index prefix for managed connectors"
area: Extract&Transform
type: feature
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/117989.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 117989
summary: ESQL Add esql hash function
area: ES|QL
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/118266.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 118266
summary: Prevent data nodes from sending stack traces to coordinator when `error_trace=false`
area: Search
type: enhancement
issues: []
22 changes: 22 additions & 0 deletions docs/changelog/118366.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pr: 118366
summary: |-
Configuring a bind DN in an LDAP or Active Directory (AD) realm without a corresponding bind password
will prevent node from starting
area: Authentication
type: breaking
issues: []
breaking:
title: -|
Configuring a bind DN in an LDAP or Active Directory (AD) realm without
a corresponding bind password will prevent node from starting
area: Cluster and node setting
details: -|
For LDAP or AD authentication realms, setting a bind DN (via the
`xpack.security.authc.realms.ldap.*.bind_dn` or `xpack.security.authc.realms.active_directory.*.bind_dn`
realm settings) without a bind password is a misconfiguration that may prevent successful authentication
to the node. Nodes will fail to start if a bind DN is specified without a password.
impact: -|
If you have a bind DN configured for an LDAP or AD authentication
realm, set a bind password for {ref}/ldap-realm.html#ldap-realm-configuration[LDAP]
or {ref}/active-directory-realm.html#ad-realm-configuration[Active Directory].
Configuring a bind DN without a password prevents the misconfigured node from starting.
5 changes: 0 additions & 5 deletions docs/changelog/118380.yaml

This file was deleted.

14 changes: 14 additions & 0 deletions docs/changelog/118484.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pr: 118484
summary: Remove date histogram boolean support
area: Aggregations
type: breaking
issues: []
breaking:
title: Remove date histogram boolean support
area: Aggregations
details: Elasticsearch no longer allows running Date Histogram aggregations
over boolean fields. Instead, use Terms aggregation for boolean
fields.
impact: We expect the impact to be minimal, as this never produced good
results, and has been deprecated for years.
notable: false
5 changes: 5 additions & 0 deletions docs/changelog/118544.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 118544
summary: ESQL - Remove restrictions for disjunctions in full text functions
area: ES|QL
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/118617.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 118617
summary: Add support for `sparse_vector` queries against `semantic_text` fields
area: "Search"
type: enhancement
issues: []
Loading

0 comments on commit 1674d50

Please sign in to comment.