forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into clean-ali-inference-code
- Loading branch information
Showing
545 changed files
with
16,600 additions
and
7,628 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...ernal/src/main/java/org/elasticsearch/gradle/internal/idea/EnablePreviewFeaturesTask.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
package org.elasticsearch.gradle.internal.idea; | ||
|
||
import groovy.util.Node; | ||
import groovy.util.NodeList; | ||
|
||
import org.gradle.api.DefaultTask; | ||
import org.xml.sax.SAXException; | ||
|
||
import java.io.IOException; | ||
|
||
import javax.xml.parsers.ParserConfigurationException; | ||
|
||
public class EnablePreviewFeaturesTask extends DefaultTask { | ||
|
||
public void enablePreview(String moduleFile, String languageLevel) throws IOException, ParserConfigurationException, SAXException { | ||
IdeaXmlUtil.modifyXml(moduleFile, xml -> { | ||
// Find the 'component' node | ||
NodeList nodes = (NodeList) xml.depthFirst(); | ||
Node componentNode = null; | ||
for (Object node : nodes) { | ||
Node currentNode = (Node) node; | ||
if ("component".equals(currentNode.name()) && "NewModuleRootManager".equals(currentNode.attribute("name"))) { | ||
componentNode = currentNode; | ||
break; | ||
} | ||
} | ||
|
||
// Add the attribute to the 'component' node | ||
if (componentNode != null) { | ||
componentNode.attributes().put("LANGUAGE_LEVEL", languageLevel); | ||
} | ||
}); | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/idea/IdeaXmlUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
package org.elasticsearch.gradle.internal.idea; | ||
|
||
import groovy.util.Node; | ||
import groovy.util.XmlParser; | ||
import groovy.xml.XmlNodePrinter; | ||
|
||
import org.gradle.api.Action; | ||
import org.xml.sax.SAXException; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.io.PrintWriter; | ||
|
||
import javax.xml.parsers.ParserConfigurationException; | ||
|
||
public class IdeaXmlUtil { | ||
|
||
static Node parseXml(String xmlPath) throws IOException, SAXException, ParserConfigurationException { | ||
File xmlFile = new File(xmlPath); | ||
XmlParser xmlParser = new XmlParser(false, true, true); | ||
xmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); | ||
Node xml = xmlParser.parse(xmlFile); | ||
return xml; | ||
} | ||
|
||
/** | ||
* Parses a given XML file, applies a set of changes, and writes those changes back to the original file. | ||
* | ||
* @param path Path to existing XML file | ||
* @param action Action to perform on parsed XML document | ||
* but before the XML document, e.g. a doctype or comment | ||
*/ | ||
static void modifyXml(String xmlPath, Action<? super Node> action) throws IOException, ParserConfigurationException, SAXException { | ||
modifyXml(xmlPath, action, null); | ||
} | ||
|
||
/** | ||
* Parses a given XML file, applies a set of changes, and writes those changes back to the original file. | ||
* | ||
* @param path Path to existing XML file | ||
* @param action Action to perform on parsed XML document | ||
* @param preface optional front matter to add after the XML declaration | ||
* but before the XML document, e.g. a doctype or comment | ||
*/ | ||
static void modifyXml(String xmlPath, Action<? super Node> action, String preface) throws IOException, ParserConfigurationException, | ||
SAXException { | ||
File xmlFile = new File(xmlPath); | ||
if (xmlFile.exists()) { | ||
Node xml = parseXml(xmlPath); | ||
action.execute(xml); | ||
|
||
try (PrintWriter writer = new PrintWriter(xmlFile)) { | ||
var printer = new XmlNodePrinter(writer); | ||
printer.setNamespaceAware(true); | ||
printer.setPreserveWhitespace(true); | ||
writer.write("<?xml version=\"1.0\"?>\n"); | ||
if (preface != null) { | ||
writer.write(preface); | ||
} | ||
printer.print(xml); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 118324 | ||
summary: Allow the data type of `null` in filters | ||
area: ES|QL | ||
type: bug | ||
issues: | ||
- 116351 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 118652 | ||
summary: Add Jina AI API to do inference for Embedding and Rerank models | ||
area: Machine Learning | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 118871 | ||
summary: "[Elastic Inference Service] Add ElasticInferenceService Unified ChatCompletions Integration" | ||
area: Inference | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 118919 | ||
summary: Remove unsupported timeout from rest-api-spec license API | ||
area: License | ||
type: bug | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 118921 | ||
summary: Add missing timeouts to rest-api-spec shutdown APIs | ||
area: Infra/Node Lifecycle | ||
type: bug | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 118938 | ||
summary: Hash functions | ||
area: ES|QL | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 118954 | ||
summary: Add missing parameter to `xpack.info` rest-api-spec | ||
area: Infra/REST API | ||
type: bug | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 119067 | ||
summary: Metrics for indexing failures due to version conflicts | ||
area: CRUD | ||
type: feature | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 119250 | ||
summary: Add rest endpoint for `create_from_source_index` | ||
area: Data streams | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 119389 | ||
summary: Restrict Connector APIs to manage/monitor_connector privileges | ||
area: Extract&Transform | ||
type: feature | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 119449 | ||
summary: Add missing traces ilm policy for OTel traces data streams | ||
area: Data streams | ||
type: bug | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 119504 | ||
summary: Optimized index sorting for OTel logs | ||
area: Data streams | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 119542 | ||
summary: Wait while index is blocked | ||
area: Transform | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pr: 119543 | ||
summary: "[Inference API] Fix unique ID message for inference ID matches trained model\ | ||
\ ID" | ||
area: Machine Learning | ||
type: bug | ||
issues: | ||
- 111312 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 119691 | ||
summary: Fix `bbq_hnsw` merge file cleanup on random IO exceptions | ||
area: Vector Search | ||
type: bug | ||
issues: | ||
- 119392 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.