Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into fix_noop
Browse files Browse the repository at this point in the history
  • Loading branch information
gaobinlong committed Dec 20, 2023
2 parents 1a589b6 + 2c8ee19 commit 9e4c674
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
echo "### Compatible components" >> "${{ github.workspace }}/results.txt" && grep -e 'Compatible component' $HOME/gradlew-check.out | sed -e 's/Compatible component: \[\(.*\)\]/- \1/' >> "${{ github.workspace }}/results.txt"
- name: Upload results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: results.txt
path: ${{ github.workspace }}/results.txt
Expand All @@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download results
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: results.txt

Expand Down
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Adding slf4j license header to LoggerMessageFormat.java ([#11069](https://github.com/opensearch-project/OpenSearch/pull/11069))
- [BWC and API enforcement] Introduce checks for enforcing the API restrictions ([#11175](https://github.com/opensearch-project/OpenSearch/pull/11175))
- Create separate transport action for render search template action ([#11170](https://github.com/opensearch-project/OpenSearch/pull/11170))
- Add additional handling in SearchTemplateRequest when simulate is set to true ([#11591](https://github.com/opensearch-project/OpenSearch/pull/11591))

### Dependencies
- Bump Lucene from 9.7.0 to 9.8.0 ([10276](https://github.com/opensearch-project/OpenSearch/pull/10276))
- Bump `commons-io:commons-io` from 2.13.0 to 2.15.1 ([#10294](https://github.com/opensearch-project/OpenSearch/pull/10294), [#11001](https://github.com/opensearch-project/OpenSearch/pull/11001), [#11002](https://github.com/opensearch-project/OpenSearch/pull/11002), [#11446](https://github.com/opensearch-project/OpenSearch/pull/11446), [#11554](https://github.com/opensearch-project/OpenSearch/pull/11554))
- Bump `com.google.api.grpc:proto-google-common-protos` from 2.10.0 to 2.25.1 ([#10208](https://github.com/opensearch-project/OpenSearch/pull/10208), [#10298](https://github.com/opensearch-project/OpenSearch/pull/10298))
- Bump `com.netflix.nebula.ospackage-base` from 11.4.0 to 11.5.0 ([#10295](https://github.com/opensearch-project/OpenSearch/pull/10295))
- Bump `com.netflix.nebula.ospackage-base` from 11.4.0 to 11.6.0 ([#10295](https://github.com/opensearch-project/OpenSearch/pull/10295), [#11630](https://github.com/opensearch-project/OpenSearch/pull/11630))
- Bump `org.apache.zookeeper:zookeeper` from 3.9.0 to 3.9.1 ([#10506](https://github.com/opensearch-project/OpenSearch/pull/10506))
- Bump `de.thetaphi:forbiddenapis` from 3.5.1 to 3.6 ([#10508](https://github.com/opensearch-project/OpenSearch/pull/10508))
- Bump `org.codehaus.woodstox:stax2-api` from 4.2.1 to 4.2.2 ([#10639](https://github.com/opensearch-project/OpenSearch/pull/10639))
- Bump `org.bouncycastle:bc-fips` from 1.0.2.3 to 1.0.2.4 ([#10297](https://github.com/opensearch-project/OpenSearch/pull/10297))
- Bump `com.google.http-client:google-http-client` from 1.43.2 to 1.43.3 ([#10635](https://github.com/opensearch-project/OpenSearch/pull/10635))
- Bump `com.squareup.okio:okio` from 3.5.0 to 3.6.0 ([#10637](https://github.com/opensearch-project/OpenSearch/pull/10637))
- Bump `com.squareup.okio:okio` from 3.5.0 to 3.7.0 ([#10637](https://github.com/opensearch-project/OpenSearch/pull/10637), [#11632](https://github.com/opensearch-project/OpenSearch/pull/11632))
- Bump `org.apache.logging.log4j:log4j-core` from 2.20.0 to 2.22.0 ([#10858](https://github.com/opensearch-project/OpenSearch/pull/10858), [#11000](https://github.com/opensearch-project/OpenSearch/pull/11000), [#11270](https://github.com/opensearch-project/OpenSearch/pull/11270))
- Bump `aws-actions/configure-aws-credentials` from 2 to 4 ([#10504](https://github.com/opensearch-project/OpenSearch/pull/10504))
- Bump `stefanzweifel/git-auto-commit-action` from 4 to 5 ([#11171](https://github.com/opensearch-project/OpenSearch/pull/11171))
Expand All @@ -143,7 +144,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Bump `com.squareup.okhttp3:okhttp` from 4.11.0 to 4.12.0 ([#10861](https://github.com/opensearch-project/OpenSearch/pull/10861))
- Bump `org.apache.commons:commons-text` from 1.10.0 to 1.11.0 ([#11344](https://github.com/opensearch-project/OpenSearch/pull/11344))
- Bump `reactor-netty-core` from 1.1.12 to 1.1.13 ([#11350](https://github.com/opensearch-project/OpenSearch/pull/11350))
- Bump `com.gradle.enterprise` from 3.14.1 to 3.15.1 ([#11339](https://github.com/opensearch-project/OpenSearch/pull/11339))
- Bump `com.gradle.enterprise` from 3.14.1 to 3.16.1 ([#11339](https://github.com/opensearch-project/OpenSearch/pull/11339), [#11629](https://github.com/opensearch-project/OpenSearch/pull/11629))
- Bump `actions/setup-java` from 3 to 4 ([#11447](https://github.com/opensearch-project/OpenSearch/pull/11447))
- Bump `commons-net:commons-net` from 3.9.0 to 3.10.0 ([#11450](https://github.com/opensearch-project/OpenSearch/pull/11450))
- Bump `org.apache.maven:maven-model` from 3.9.4 to 3.9.6 ([#11445](https://github.com/opensearch-project/OpenSearch/pull/11445))
Expand Down Expand Up @@ -196,6 +197,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Fix bug where replication lag grows post primary relocation ([#11238](https://github.com/opensearch-project/OpenSearch/pull/11238))
- Fix noop_update_total metric in indexing stats cannot be updated by bulk API ([#11485](https://github.com/opensearch-project/OpenSearch/pull/11485))
- Fix template setting override for replication type ([#11417](https://github.com/opensearch-project/OpenSearch/pull/11417))
- Fix Automatic addition of protocol broken in #11512 ([#11609](https://github.com/opensearch-project/OpenSearch/pull/11609))

### Security

Expand Down
2 changes: 1 addition & 1 deletion distribution/packages/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import java.util.regex.Pattern
*/

plugins {
id "com.netflix.nebula.ospackage-base" version "11.5.0"
id "com.netflix.nebula.ospackage-base" version "11.6.0"
}

void addProcessFilesTask(String type, boolean jdk) {
Expand Down
10 changes: 5 additions & 5 deletions distribution/src/config/jvm.options
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
8-10:-XX:+UseCMSInitiatingOccupancyOnly

## G1GC Configuration
# NOTE: G1 GC is only supported on JDK version 10 or later
# to use G1GC, uncomment the next two lines and update the version on the
# following three lines to your version of the JDK
# 10:-XX:-UseConcMarkSweepGC
# 10:-XX:-UseCMSInitiatingOccupancyOnly
# NOTE: G1GC is the default GC for all JDKs 11 and newer
11-:-XX:+UseG1GC
# See https://github.com/elastic/elasticsearch/pull/46169 for the history
# behind these settings, but the tl;dr is that default values can lead
# to situations where heap usage grows enough to trigger a circuit breaker
# before GC kicks in.
11-:-XX:G1ReservePercent=25
11-:-XX:InitiatingHeapOccupancyPercent=30

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,25 @@ public void writeTo(StreamOutput out) throws IOException {

@Override
public String[] indices() {
if (request == null) {
return new String[0];
}
return request.indices();
}

@Override
public IndicesOptions indicesOptions() {
if (request == null) {
return SearchRequest.DEFAULT_INDICES_OPTIONS;
}
return request.indicesOptions();
}

@Override
public IndicesRequest indices(String... indices) {
if (request == null) {
return new SearchRequest(new String[0]).indices(indices);
}
return request.indices(indices);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

package org.opensearch.script.mustache;

import org.opensearch.action.search.SearchRequest;
import org.opensearch.core.common.io.stream.Writeable;
import org.opensearch.script.ScriptType;
import org.opensearch.search.RandomSearchRequestGenerator;
Expand Down Expand Up @@ -110,4 +111,19 @@ public static SearchTemplateRequest createRandomRequest() {
request.setRequest(RandomSearchRequestGenerator.randomSearchRequest(SearchSourceBuilder::searchSource));
return request;
}

public void testSimulatedSearchTemplateRequest() {
SearchTemplateRequest request = new SearchTemplateRequest();
request.setSimulate(true);

assertEquals(0, request.indices().length);
assertEquals(SearchRequest.DEFAULT_INDICES_OPTIONS, request.indicesOptions());
assertEquals(2, request.indices("index1", "index2").indices().length);

SearchTemplateRequest randomRequest = createRandomRequest();
int expectedIndicesLength = randomRequest.indices().length;
request.setSimulate(true);

assertEquals(expectedIndicesLength, randomRequest.indices().length);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected String getFullEndpoint(String endpoint) {
if (!Strings.hasText(endpoint)) {
return null;
}
if (endpoint.startsWith("http")) {
if (endpoint.startsWith("http://") || endpoint.startsWith("https://")) {
return endpoint;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ public void testGetFullEndpointWithScheme() {

String endpoint = awsEc2ServiceImpl.getFullEndpoint(clientSettings.endpoint);
assertEquals("http://ec2.us-west-2.amazonaws.com", endpoint);

assertEquals("http://httpserver.example.com", awsEc2ServiceImpl.getFullEndpoint("http://httpserver.example.com"));

assertEquals("https://httpserver.example.com", awsEc2ServiceImpl.getFullEndpoint("https://httpserver.example.com"));
}

public void testGetFullEndpointWithoutScheme() {
Expand All @@ -222,6 +226,8 @@ public void testGetFullEndpointWithoutScheme() {
String endpoint = awsEc2ServiceImpl.getFullEndpoint(clientSettings.endpoint);
assertEquals("https://ec2.us-west-2.amazonaws.com", endpoint);

assertEquals("https://httpserver.example.com", awsEc2ServiceImpl.getFullEndpoint("httpserver.example.com"));

assertNull(awsEc2ServiceImpl.getFullEndpoint(""));
}
}
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

plugins {
id "com.gradle.enterprise" version "3.15.1"
id "com.gradle.enterprise" version "3.16.1"
}

ext.disableBuildCache = hasProperty('DISABLE_BUILD_CACHE') || System.getenv().containsKey('DISABLE_BUILD_CACHE')
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/hdfs-fixture/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ dependencies {
runtimeOnly("com.squareup.okhttp3:okhttp:4.12.0") {
exclude group: "com.squareup.okio"
}
runtimeOnly "com.squareup.okio:okio:3.6.0"
runtimeOnly "com.squareup.okio:okio:3.7.0"
runtimeOnly "org.xerial.snappy:snappy-java:1.1.10.5"
}

0 comments on commit 9e4c674

Please sign in to comment.