Skip to content

Commit

Permalink
Merge branch 'main' into disable_ml_on_macos_x86_64
Browse files Browse the repository at this point in the history
  • Loading branch information
edsavage authored Nov 26, 2024
2 parents 5a61b7b + 0f5eb0c commit a2e969d
Show file tree
Hide file tree
Showing 179 changed files with 3,844 additions and 991 deletions.
15 changes: 14 additions & 1 deletion .buildkite/scripts/dra-workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ find "$WORKSPACE" -type d -path "*/build/distributions" -exec chmod a+w {} \;

echo --- Running release-manager

set +e
# Artifacts should be generated
docker run --rm \
--name release-manager \
Expand All @@ -91,4 +92,16 @@ docker run --rm \
--version "$ES_VERSION" \
--artifact-set main \
--dependency "beats:https://artifacts-${WORKFLOW}.elastic.co/beats/${BEATS_BUILD_ID}/manifest-${ES_VERSION}${VERSION_SUFFIX}.json" \
--dependency "ml-cpp:https://artifacts-${WORKFLOW}.elastic.co/ml-cpp/${ML_CPP_BUILD_ID}/manifest-${ES_VERSION}${VERSION_SUFFIX}.json"
--dependency "ml-cpp:https://artifacts-${WORKFLOW}.elastic.co/ml-cpp/${ML_CPP_BUILD_ID}/manifest-${ES_VERSION}${VERSION_SUFFIX}.json" \
2>&1 | tee release-manager.log
EXIT_CODE=$?
set -e

# This failure is just generating a ton of noise right now, so let's just ignore it
# This should be removed once this issue has been fixed
if grep "elasticsearch-ubi-9.0.0-SNAPSHOT-docker-image.tar.gz" release-manager.log; then
echo "Ignoring error about missing ubi artifact"
exit 0
fi

exit "$EXIT_CODE"
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import org.gradle.api.file.RegularFileProperty;
import org.gradle.api.model.ObjectFactory;
import org.gradle.api.tasks.InputFile;
import org.gradle.api.tasks.PathSensitive;
import org.gradle.api.tasks.PathSensitivity;
import org.gradle.api.tasks.TaskAction;

import java.io.FileReader;
Expand All @@ -37,6 +39,7 @@ public PomValidationTask(ObjectFactory objects) {
}

@InputFile
@PathSensitive(PathSensitivity.RELATIVE)
public RegularFileProperty getPomFile() {
return pomFile;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ private static TaskProvider<LoggedExec> createRunBwcGradleTask(

if (OS.current() == OS.WINDOWS) {
loggedExec.getExecutable().set("cmd");
loggedExec.args("/C", "call", new File(checkoutDir.get(), "gradlew").toString());
loggedExec.args("/C", "call", "gradlew");
} else {
loggedExec.getExecutable().set(new File(checkoutDir.get(), "gradlew").toString());
loggedExec.getExecutable().set("./gradlew");
}

if (useUniqueUserHome) {
Expand Down Expand Up @@ -177,7 +177,7 @@ private static String readFromFile(File file) {
}
}

public static abstract class JavaHomeValueSource implements ValueSource<String, JavaHomeValueSource.Params> {
public abstract static class JavaHomeValueSource implements ValueSource<String, JavaHomeValueSource.Params> {

private String minimumCompilerVersionPath(Version bwcVersion) {
return (bwcVersion.onOrAfter(BUILD_TOOL_MINIMUM_VERSION))
Expand Down
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:973431347ad45f40e01afbbd010bf9de929c088a63382239b90dd84f39618bc8",
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:55b297da5151d2a2997e8ab9729fe1304e4869389d7090ab7031cc29530f69f8",
"-wolfi",
"apk"
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.gradle.api.provider.Provider;
import org.gradle.api.provider.ProviderFactory;
import org.gradle.api.tasks.Copy;
import org.gradle.api.tasks.PathSensitivity;
import org.gradle.api.tasks.TaskProvider;
import org.gradle.jvm.toolchain.JavaToolchainService;
import org.gradle.language.base.plugins.LifecycleBasePlugin;
Expand Down Expand Up @@ -322,7 +323,7 @@ static void createBuildBwcTask(
File expectedOutputFile = useNativeExpanded
? new File(projectArtifact.expandedDistDir, "elasticsearch-" + bwcVersion.get() + "-SNAPSHOT")
: projectArtifact.distFile;
c.getInputs().file(new File(project.getBuildDir(), "refspec"));
c.getInputs().file(new File(project.getBuildDir(), "refspec")).withPathSensitivity(PathSensitivity.RELATIVE);
if (useNativeExpanded) {
c.getOutputs().dir(expectedOutputFile);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.gradle.api.plugins.quality.Checkstyle;
import org.gradle.api.plugins.quality.CheckstyleExtension;
import org.gradle.api.provider.Provider;
import org.gradle.api.tasks.PathSensitivity;
import org.gradle.api.tasks.SourceSetContainer;
import org.gradle.api.tasks.TaskProvider;

Expand All @@ -42,18 +43,23 @@ public TaskProvider<? extends Task> createTask(Project project) {
File checkstyleSuppressions = new File(checkstyleDir, "checkstyle_suppressions.xml");
File checkstyleConf = new File(checkstyleDir, "checkstyle.xml");
TaskProvider<Task> copyCheckstyleConf = project.getTasks().register("copyCheckstyleConf");

// configure inputs and outputs so up to date works properly
copyCheckstyleConf.configure(t -> t.getOutputs().files(checkstyleSuppressions, checkstyleConf));
if ("jar".equals(checkstyleConfUrl.getProtocol())) {
try {
JarURLConnection jarURLConnection = (JarURLConnection) checkstyleConfUrl.openConnection();
copyCheckstyleConf.configure(t -> t.getInputs().file(jarURLConnection.getJarFileURL()));
copyCheckstyleConf.configure(
t -> t.getInputs().file(jarURLConnection.getJarFileURL()).withPathSensitivity(PathSensitivity.RELATIVE)
);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
} else if ("file".equals(checkstyleConfUrl.getProtocol())) {
copyCheckstyleConf.configure(t -> t.getInputs().files(checkstyleConfUrl.getFile(), checkstyleSuppressionsUrl.getFile()));
copyCheckstyleConf.configure(
t -> t.getInputs()
.files(checkstyleConfUrl.getFile(), checkstyleSuppressionsUrl.getFile())
.withPathSensitivity(PathSensitivity.RELATIVE)
);
}

// Explicitly using an Action interface as java lambdas
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import org.gradle.api.tasks.InputFiles;
import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.OutputFile;
import org.gradle.api.tasks.PathSensitive;
import org.gradle.api.tasks.PathSensitivity;
import org.gradle.api.tasks.SkipWhenEmpty;
import org.gradle.api.tasks.StopExecutionException;
import org.gradle.api.tasks.TaskAction;
Expand Down Expand Up @@ -79,6 +81,7 @@ private static boolean isExecutableFile(File file) {
@InputFiles
@IgnoreEmptyDirectories
@SkipWhenEmpty
@PathSensitive(PathSensitivity.RELATIVE)
public FileCollection getFiles() {
return getSources().get()
.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import org.gradle.api.tasks.InputFiles;
import org.gradle.api.tasks.Optional;
import org.gradle.api.tasks.OutputDirectory;
import org.gradle.api.tasks.PathSensitive;
import org.gradle.api.tasks.PathSensitivity;
import org.gradle.api.tasks.SkipWhenEmpty;
import org.gradle.api.tasks.TaskAction;
import org.gradle.api.tasks.util.PatternFilterable;
Expand Down Expand Up @@ -106,6 +108,7 @@ public Map<String, String> getSubstitutions() {
@SkipWhenEmpty
@IgnoreEmptyDirectories
@InputFiles
@PathSensitive(PathSensitivity.RELATIVE)
public FileTree getInputDir() {
FileTree coreFileTree = null;
FileTree xpackFileTree = null;
Expand Down
15 changes: 13 additions & 2 deletions build-tools/src/main/java/org/elasticsearch/gradle/LoggedExec.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.gradle.api.provider.Property;
import org.gradle.api.provider.Provider;
import org.gradle.api.provider.ProviderFactory;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.Optional;
Expand Down Expand Up @@ -53,6 +54,7 @@
* Exec task implementation.
*/
@SuppressWarnings("unchecked")
@CacheableTask
public abstract class LoggedExec extends DefaultTask implements FileSystemOperationsAware {

private static final Logger LOGGER = Logging.getLogger(LoggedExec.class);
Expand Down Expand Up @@ -87,6 +89,14 @@ public abstract class LoggedExec extends DefaultTask implements FileSystemOperat
abstract public Property<Boolean> getCaptureOutput();

@Input
public Provider<String> getWorkingDirPath() {
return getWorkingDir().map(file -> {
String relativeWorkingDir = projectLayout.getProjectDirectory().getAsFile().toPath().relativize(file.toPath()).toString();
return relativeWorkingDir;
});
}

@Internal
abstract public Property<File> getWorkingDir();

@Internal
Expand Down Expand Up @@ -117,9 +127,10 @@ public LoggedExec(
* can be reused across different build invocations.
* */
private void setupDefaultEnvironment(ProviderFactory providerFactory) {
getEnvironment().putAll(providerFactory.environmentVariablesPrefixedBy("BUILDKITE"));
getEnvironment().putAll(providerFactory.environmentVariablesPrefixedBy("GRADLE_BUILD_CACHE"));
getEnvironment().putAll(providerFactory.environmentVariablesPrefixedBy("VAULT"));

getNonTrackedEnvironment().putAll(providerFactory.environmentVariablesPrefixedBy("BUILDKITE"));
getNonTrackedEnvironment().putAll(providerFactory.environmentVariablesPrefixedBy("VAULT"));
Provider<String> javaToolchainHome = providerFactory.environmentVariable("JAVA_TOOLCHAIN_HOME");
if (javaToolchainHome.isPresent()) {
getEnvironment().put("JAVA_TOOLCHAIN_HOME", javaToolchainHome);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@
import org.gradle.api.file.RegularFileProperty;
import org.gradle.api.provider.ListProperty;
import org.gradle.api.provider.Property;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.InputFiles;
import org.gradle.api.tasks.Optional;
import org.gradle.api.tasks.OutputFile;
import org.gradle.api.tasks.PathSensitive;
import org.gradle.api.tasks.PathSensitivity;
import org.gradle.api.tasks.TaskAction;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.tree.ClassNode;
Expand All @@ -39,6 +42,7 @@

import javax.inject.Inject;

@CacheableTask
public abstract class GeneratePluginPropertiesTask extends DefaultTask {

public static final String PROPERTIES_FILENAME = "plugin-descriptor.properties";
Expand Down Expand Up @@ -82,6 +86,7 @@ public GeneratePluginPropertiesTask(ProjectLayout projectLayout) {
public abstract Property<Boolean> getIsLicensed();

@InputFiles
@PathSensitive(PathSensitivity.RELATIVE)
public abstract ConfigurableFileCollection getModuleInfoFile();

@OutputFile
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog/115020.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 115020
summary: Adding endpoint creation validation for all task types to remaining services
area: Machine Learning
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/117246.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 117246
summary: LOOKUP JOIN using field-caps for field mapping
area: ES|QL
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/117312.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 117312
summary: Add missing `async_search` query parameters to rest-api-spec
area: Search
type: bug
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/117404.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 117404
summary: Correct bit * byte and bit * float script comparisons
area: Vector Search
type: bug
issues: []
2 changes: 1 addition & 1 deletion docs/reference/data-streams/tsds-reindex.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ POST /_component_template/destination_template
POST /_index_template/2
{
"index_patterns": [
"k8s*"
"k9s*"
],
"composed_of": [
"destination_template"
Expand Down
17 changes: 16 additions & 1 deletion docs/reference/esql/esql-kibana.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,27 @@ detailed warning, expand the query bar, and click *warnings*.
==== Query history

You can reuse your recent {esql} queries in the query bar.
In the query bar click *Show recent queries*.
In the query bar, click *Show recent queries*.

You can then scroll through your recent queries:

image::images/esql/esql-discover-query-history.png[align="center",size="50%"]

[discrete]
[[esql-kibana-starred-queries]]
==== Starred queries

From the query history, you can mark some queries as favorite to find and access them faster later.

In the query bar, click *Show recent queries*.

From the **Recent** tab, you can star any queries you want.

In the **Starred** tab, find all the queries you have previously starred.

image::images/esql/esql-discover-query-starred.png[align="center",size="50%"]


[discrete]
[[esql-kibana-results-table]]
=== The results table
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/esql/functions/description/kql.asciidoc

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

13 changes: 13 additions & 0 deletions docs/reference/esql/functions/examples/kql.asciidoc

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

37 changes: 37 additions & 0 deletions docs/reference/esql/functions/kibana/definition/kql.json

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

14 changes: 14 additions & 0 deletions docs/reference/esql/functions/kibana/docs/kql.md

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

17 changes: 17 additions & 0 deletions docs/reference/esql/functions/layout/kql.asciidoc

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

6 changes: 6 additions & 0 deletions docs/reference/esql/functions/parameters/kql.asciidoc

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

1 change: 1 addition & 0 deletions docs/reference/esql/functions/signature/kql.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a2e969d

Please sign in to comment.