Skip to content

Commit d507d07

Browse files
committed
Merge remote-tracking branch 'ossupstream/main' into boolquery
2 parents 99a5987 + efecb34 commit d507d07

File tree

29 files changed

+480
-371
lines changed

29 files changed

+480
-371
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4040
- Replace centos:8 with almalinux:8 since centos docker images are deprecated ([#19154](https://github.com/opensearch-project/OpenSearch/pull/19154))
4141
- Add CompletionStage variants to IndicesAdminClient as an alternative to ActionListener ([#19161](https://github.com/opensearch-project/OpenSearch/pull/19161))
4242
- Remove cap on Java version used by forbidden APIs ([#19163](https://github.com/opensearch-project/OpenSearch/pull/19163))
43+
- Omit maxScoreCollector for field collapsing when sort by score descending ([#19181](https://github.com/opensearch-project/OpenSearch/pull/19181))
4344
- Disable pruning for `doc_values` for the wildcard field mapper ([#18568](https://github.com/opensearch-project/OpenSearch/pull/18568))
4445
- Make all methods in Engine.Result public ([#19276](https://github.com/opensearch-project/OpenSearch/pull/19275))
4546
- Create and attach interclusterTest and yamlRestTest code coverage reports to gradle check task([#19165](https://github.com/opensearch-project/OpenSearch/pull/19165))
@@ -49,6 +50,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4950
- Add failureaccess as runtime dependency to transport-grpc module ([#19339](https://github.com/opensearch-project/OpenSearch/pull/19339))
5051
- Migrate usages of deprecated `Operations#union` from Lucene ([#19397](https://github.com/opensearch-project/OpenSearch/pull/19397))
5152
- Delegate primitive write methods with ByteSizeCachingDirectory wrapped IndexOutput ([#19432](https://github.com/opensearch-project/OpenSearch/pull/19432))
53+
- Bump opensearch-protobufs dependency to 0.18.0 and update transport-grpc module compatibility ([#19447](https://github.com/opensearch-project/OpenSearch/issues/19447))
5254

5355
### Fixed
5456
- Fix unnecessary refreshes on update preparation failures ([#15261](https://github.com/opensearch-project/OpenSearch/issues/15261))

DEVELOPER_GUIDE.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ Fork [opensearch-project/OpenSearch](https://github.com/opensearch-project/OpenS
7676

7777
#### JDK
7878

79-
OpenSearch recommends building with the [Temurin/Adoptium](https://adoptium.net/temurin/releases/) distribution. JDK 11 is the minimum supported, and JDK-24 is the newest supported. You must have a supported JDK installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-21`.
79+
OpenSearch recommends building with the [Temurin/Adoptium](https://adoptium.net/temurin/releases/) distribution. JDK 11 is the minimum supported, and JDK-24 is the newest supported. You must have a supported JDK installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-21`.
8080

81-
Download Java 11 from [here](https://adoptium.net/releases.html?variant=openjdk11).
81+
Download Java 11 from [here](https://adoptium.net/releases.html?variant=openjdk11).
8282

8383

8484
In addition, certain backward compatibility tests check out and compile the previous major version of OpenSearch, and therefore require installing [JDK 11](https://adoptium.net/temurin/releases/?version=11) and [JDK 17](https://adoptium.net/temurin/releases/?version=17) and setting the `JAVA11_HOME` and `JAVA17_HOME` environment variables. More to that, since 8.10 release, Gradle has deprecated the usage of the any JDKs below JDK-16. For smooth development experience, the recommendation is to install at least [JDK 17](https://adoptium.net/temurin/releases/?version=17) or [JDK 21](https://adoptium.net/temurin/releases/?version=21). If you still want to build with JDK-11 only, please add `-Dorg.gradle.warning.mode=none` when invoking any Gradle build task from command line, for example:
@@ -178,6 +178,23 @@ Run OpenSearch using `gradlew run`.
178178
./gradlew run -PinstalledPlugins="['plugin1', 'plugin2']"
179179
```
180180

181+
External plugins may also be fetched and installed from maven snapshots:
182+
183+
```bash
184+
./gradlew run -PinstalledPlugins="['opensearch-job-scheduler', 'opensearch-sql-plugin']"
185+
```
186+
187+
You can specify a plugin version to pull to test a specific version in the org.opensearch.plugin groupId:
188+
```bash
189+
./gradlew run -PinstalledPlugins="['opensearch-job-scheduler:3.3.x.x']"
190+
```
191+
192+
or install with fully qualified maven coordinates:
193+
```bash
194+
./gradlew run -PinstalledPlugins="['com.example:my-cool-plugin:3.3.x.x']"
195+
```
196+
197+
181198
That will build OpenSearch and start it, writing its log above Gradle's status message. We log a lot of stuff on startup, specifically these lines tell you that OpenSearch is ready.
182199

183200
```

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ kotlin = "1.7.10"
2222
antlr4 = "4.13.1"
2323
guava = "33.2.1-jre"
2424
gson = "2.13.2"
25-
opensearchprotobufs = "0.13.0"
25+
opensearchprotobufs = "0.18.0"
2626
protobuf = "3.25.8"
2727
jakarta_annotation = "1.3.5"
2828
google_http_client = "1.44.1"

gradle/run.gradle

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* under the License.
2929
*/
3030
import org.opensearch.gradle.testclusters.RunTask
31+
import org.opensearch.gradle.VersionProperties
3132

3233
apply plugin: 'opensearch.testclusters'
3334

@@ -41,8 +42,45 @@ testClusters {
4142
if (numNodes > 1) numberOfNodes = numNodes
4243
if (findProperty("installedPlugins")) {
4344
installedPlugins = Eval.me(installedPlugins)
45+
46+
def resolveMavenPlugin = { coords ->
47+
// Add default groupId if not fully qualified (less than 2 colons)
48+
String[] parts = coords.split(':')
49+
if (parts.length == 2 && parts[0].contains('.')) {
50+
throw new IllegalArgumentException("version is required if groupdId is specified '${coords}' Use format: groupId:artifactId:version")
51+
}
52+
String fullCoords = parts.length < 3 ? 'org.opensearch.plugin:' + coords : coords
53+
def config = project.configurations.detachedConfiguration(
54+
project.dependencies.create(fullCoords)
55+
)
56+
config.resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
57+
plugin(project.layout.file(project.provider { config.singleFile }))
58+
}
59+
4460
for (String p : installedPlugins) {
45-
plugin('plugins:'.concat(p))
61+
// check if its a local plugin first
62+
if (project.findProject(':plugins:' + p) != null) {
63+
plugin('plugins:' + p)
64+
} else {
65+
// attempt to fetch it from maven
66+
project.repositories.mavenLocal()
67+
project.repositories {
68+
maven {
69+
name = 'OpenSearch Snapshots'
70+
url = 'https://central.sonatype.com/repository/maven-snapshots/'
71+
}
72+
}
73+
if (p.contains(':')) {
74+
// Maven coordinates with version specified
75+
String coords = p.contains('@') ? p : (p + '@zip')
76+
resolveMavenPlugin(coords)
77+
} else {
78+
// Not found locally, try Maven with current OS version + 0
79+
String version = VersionProperties.getOpenSearch().replace('-SNAPSHOT', '.0-SNAPSHOT')
80+
String coords = p + ':' + version + '@zip'
81+
resolveMavenPlugin(coords)
82+
}
83+
}
4684
if (p.equals("arrow-flight-rpc")) {
4785
// Add system properties for Netty configuration
4886
systemProperty 'io.netty.allocator.numDirectArenas', '1'

modules/transport-grpc/licenses/protobufs-0.13.0.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e8dc93c60df892184d7c2010e1bd4f15a777c292

modules/transport-grpc/spi/licenses/protobufs-0.13.0.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e8dc93c60df892184d7c2010e1bd4f15a777c292

modules/transport-grpc/spi/src/test/java/org/opensearch/transport/grpc/spi/QueryBuilderProtoConverterTests.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ private QueryContainer createMockTermQueryContainer() {
9999
* Helper method to create a mock range query container
100100
*/
101101
private QueryContainer createMockRangeQueryContainer() {
102-
return QueryContainer.newBuilder()
103-
.setRange(org.opensearch.protobufs.RangeQuery.newBuilder().setField("range_field").build())
104-
.build();
102+
return QueryContainer.newBuilder().setRange(org.opensearch.protobufs.RangeQuery.newBuilder().build()).build();
105103
}
106104

107105
/**

modules/transport-grpc/src/main/java/org/opensearch/transport/grpc/proto/request/common/FetchSourceContextProtoUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public static FetchSourceContext parseFromProtoRequest(org.opensearch.protobufs.
4545
// Set up source context if source parameters are provided
4646
if (request.hasXSource()) {
4747
switch (request.getXSource().getSourceConfigParamCase()) {
48-
case BOOL_VALUE:
49-
fetchSource = request.getXSource().getBoolValue();
48+
case BOOL:
49+
fetchSource = request.getXSource().getBool();
5050
break;
5151
case STRING_ARRAY:
5252
sourceIncludes = request.getXSource().getStringArray().getStringArrayList().toArray(new String[0]);
@@ -84,8 +84,8 @@ public static FetchSourceContext parseFromProtoRequest(org.opensearch.protobufs.
8484
if (request.hasXSource()) {
8585
SourceConfigParam source = request.getXSource();
8686

87-
if (source.hasBoolValue()) {
88-
fetchSource = source.getBoolValue();
87+
if (source.hasBool()) {
88+
fetchSource = source.getBool();
8989
} else {
9090
sourceIncludes = source.getStringArray().getStringArrayList().toArray(new String[0]);
9191
}

0 commit comments

Comments
 (0)