Skip to content

Commit

Permalink
Merge branch 'main' into geojson
Browse files Browse the repository at this point in the history
  • Loading branch information
heemin32 authored Oct 19, 2022
2 parents e93d789 + eb33015 commit afad3e0
Show file tree
Hide file tree
Showing 36 changed files with 1,590 additions and 1,066 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Recommissioning of zone. REST layer support. ([#4624](https://github.com/opensearch-project/OpenSearch/pull/4604))
- Added in-flight cancellation of SearchShardTask based on resource consumption ([#4565](https://github.com/opensearch-project/OpenSearch/pull/4565))
- Apply reproducible builds configuration for OpenSearch plugins through gradle plugin ([#4746](https://github.com/opensearch-project/OpenSearch/pull/4746))
- Add groupId value propagation tests for ZIP publication task ([#4772](https://github.com/opensearch-project/OpenSearch/pull/4772))
- Add support for GeoJson Point type in GeoPoint field ([#4597](https://github.com/opensearch-project/OpenSearch/pull/4597))

### Dependencies
Expand All @@ -42,7 +43,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Bumps `azure-storage-common` from 12.18.0 to 12.18.1
- Bumps `forbiddenapis` from 3.3 to 3.4
- Bumps `gson` from 2.9.0 to 2.9.1
- Bumps `protobuf-java` from 3.21.2 to 3.21.7
- Bumps `protobuf-java` from 3.21.2 to 3.21.7k
- Bumps `azure-core` from 1.31.0 to 1.33.0
- Bumps `avro` from 1.11.0 to 1.11.1
- Bumps `woodstox-core` from 6.3.0 to 6.3.1
Expand All @@ -60,6 +61,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Bumps `jna` from 5.11.0 to 5.12.1 ([#4656](https://github.com/opensearch-project/OpenSearch/pull/4656))
- Update Jackson Databind to 2.13.4.2 (addressing CVE-2022-42003) ([#4779](https://github.com/opensearch-project/OpenSearch/pull/4779))
- Bumps `tika` from 2.4.0 to 2.5.0 ([#4791](https://github.com/opensearch-project/OpenSearch/pull/4791))
- Exclude jettison version brought in with hadoop-minicluster. ([#4787](https://github.com/opensearch-project/OpenSearch/pull/4787))
- Bump protobuf-java to 3.21.7 in repository-gcs and repository-hdfs ([#]())

### Changed
- Dependency updates (httpcore, mockito, slf4j, httpasyncclient, commons-codec) ([#4308](https://github.com/opensearch-project/OpenSearch/pull/4308))
- Use RemoteSegmentStoreDirectory instead of RemoteDirectory ([#4240](https://github.com/opensearch-project/OpenSearch/pull/4240))
Expand Down Expand Up @@ -87,6 +91,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fix weighted routing metadata deserialization error on process restart ([#4691](https://github.com/opensearch-project/OpenSearch/pull/4691))
- Refactor Base Action class javadocs to OpenSearch.API ([#4732](https://github.com/opensearch-project/OpenSearch/pull/4732))
- Migrate client transports to Apache HttpClient / Core 5.x ([#4459](https://github.com/opensearch-project/OpenSearch/pull/4459))
- Refactored BalancedAllocator.Balancer to LocalShardsBalancer ([#4761](https://github.com/opensearch-project/OpenSearch/pull/4761))
### Deprecated
### Removed
- Remove deprecated code to add node name into log pattern of log4j property file ([#4568](https://github.com/opensearch-project/OpenSearch/pull/4568))
Expand Down Expand Up @@ -136,8 +141,13 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fix new race condition in DecommissionControllerTests ([4688](https://github.com/opensearch-project/OpenSearch/pull/4688))
- Fix SearchStats (de)serialization (caused by https://github.com/opensearch-project/OpenSearch/pull/4616) ([#4697](https://github.com/opensearch-project/OpenSearch/pull/4697))
- Fixing Gradle warnings associated with publishPluginZipPublicationToXxx tasks ([#4696](https://github.com/opensearch-project/OpenSearch/pull/4696))
- [BUG]: Remove redundant field from GetDecommissionStateResponse ([#4751](https://github.com/opensearch-project/OpenSearch/pull/4751))
- Fixed randomly failing test ([4774](https://github.com/opensearch-project/OpenSearch/pull/4774))
- Update version check after backport ([4786](https://github.com/opensearch-project/OpenSearch/pull/4786))
- Fix decommission status update to non leader nodes ([4800](https://github.com/opensearch-project/OpenSearch/pull/4800))
- Fix recovery path for searchable snapshots ([4813](https://github.com/opensearch-project/OpenSearch/pull/4813))
- Fix bug in AwarenessAttributeDecommissionIT([4822](https://github.com/opensearch-project/OpenSearch/pull/4822))

### Security
- CVE-2022-25857 org.yaml:snakeyaml DOS vulnerability ([#4341](https://github.com/opensearch-project/OpenSearch/pull/4341))

Expand All @@ -158,6 +168,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- PR reference to checkout code for changelog verifier ([#4296](https://github.com/opensearch-project/OpenSearch/pull/4296))
- Commit workflow for dependabot changelog helper ([#4331](https://github.com/opensearch-project/OpenSearch/pull/4331))
- Better plural stemmer than minimal_english ([#4738](https://github.com/opensearch-project/OpenSearch/pull/4738))
- Disable merge on refresh in DiskThresholdDeciderIT ([#4828](https://github.com/opensearch-project/OpenSearch/pull/4828))

### Security
[Unreleased]: https://github.com/opensearch-project/OpenSearch/compare/2.2.0...HEAD
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,76 @@ public void useDefaultValues() throws IOException, URISyntaxException, XmlPullPa
assertEquals(model.getUrl(), "https://github.com/doe/sample-plugin");
}

/**
* If the `group` is defined in gradle's allprojects section then it does not have to defined in publications.
*/
@Test
public void allProjectsGroup() throws IOException, URISyntaxException, XmlPullParserException {
GradleRunner runner = prepareGradleRunnerFromTemplate("allProjectsGroup.gradle", "build", ZIP_PUBLISH_TASK);
BuildResult result = runner.build();

/** Check if build and {@value ZIP_PUBLISH_TASK} tasks have run well */
assertEquals(SUCCESS, result.task(":" + "build").getOutcome());
assertEquals(SUCCESS, result.task(":" + ZIP_PUBLISH_TASK).getOutcome());

// Parse the maven file and validate default values
MavenXpp3Reader reader = new MavenXpp3Reader();
Model model = reader.read(
new FileReader(
new File(
projectDir.getRoot(),
String.join(
File.separator,
"build",
"local-staging-repo",
"org",
"opensearch",
PROJECT_NAME,
"2.0.0.0",
PROJECT_NAME + "-2.0.0.0.pom"
)
)
)
);
assertEquals(model.getVersion(), "2.0.0.0");
assertEquals(model.getGroupId(), "org.opensearch");
}

/**
* The groupId value can be defined on several levels. This tests that the most internal level outweighs other levels.
*/
@Test
public void groupPriorityLevel() throws IOException, URISyntaxException, XmlPullParserException {
GradleRunner runner = prepareGradleRunnerFromTemplate("groupPriorityLevel.gradle", "build", ZIP_PUBLISH_TASK);
BuildResult result = runner.build();

/** Check if build and {@value ZIP_PUBLISH_TASK} tasks have run well */
assertEquals(SUCCESS, result.task(":" + "build").getOutcome());
assertEquals(SUCCESS, result.task(":" + ZIP_PUBLISH_TASK).getOutcome());

// Parse the maven file and validate default values
MavenXpp3Reader reader = new MavenXpp3Reader();
Model model = reader.read(
new FileReader(
new File(
projectDir.getRoot(),
String.join(
File.separator,
"build",
"local-staging-repo",
"level",
"3",
PROJECT_NAME,
"2.0.0.0",
PROJECT_NAME + "-2.0.0.0.pom"
)
)
)
);
assertEquals(model.getVersion(), "2.0.0.0");
assertEquals(model.getGroupId(), "level.3");
}

/**
* In this case the Publication entity is completely missing but still the POM file is generated using the default
* values including the groupId and version values obtained from the Gradle project object.
Expand Down
28 changes: 28 additions & 0 deletions buildSrc/src/test/resources/pluginzip/allProjectsGroup.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
plugins {
id 'java-gradle-plugin'
id 'opensearch.pluginzip'
}

version='2.0.0.0'

// A bundlePlugin task mockup
tasks.register('bundlePlugin', Zip.class) {
archiveFileName = "sample-plugin-${version}.zip"
destinationDirectory = layout.buildDirectory.dir('distributions')
from layout.projectDirectory.file('sample-plugin-source.txt')
}

allprojects {
group = 'org.opensearch'
}

publishing {
publications {
pluginZip(MavenPublication) { publication ->
pom {
name = "sample-plugin"
description = "pluginDescription"
}
}
}
}
30 changes: 30 additions & 0 deletions buildSrc/src/test/resources/pluginzip/groupPriorityLevel.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
plugins {
id 'java-gradle-plugin'
id 'opensearch.pluginzip'
}

version='2.0.0.0'

// A bundlePlugin task mockup
tasks.register('bundlePlugin', Zip.class) {
archiveFileName = "sample-plugin-${version}.zip"
destinationDirectory = layout.buildDirectory.dir('distributions')
from layout.projectDirectory.file('sample-plugin-source.txt')
}

allprojects {
group = 'level.1'
}

publishing {
publications {
pluginZip(MavenPublication) { publication ->
groupId = "level.2"
pom {
name = "sample-plugin"
description = "pluginDescription"
groupId = "level.3"
}
}
}
}
1 change: 1 addition & 0 deletions buildSrc/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ supercsv = 2.4.0
log4j = 2.17.1
slf4j = 1.7.36
asm = 9.3
jettison = 1.5.1

# when updating the JNA version, also update the version in buildSrc/build.gradle
jna = 5.12.1
Expand Down
2 changes: 1 addition & 1 deletion plugins/discovery-azure-classic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ dependencies {
api "com.sun.jersey:jersey-client:${versions.jersey}"
api "com.sun.jersey:jersey-core:${versions.jersey}"
api "com.sun.jersey:jersey-json:${versions.jersey}"
api 'org.codehaus.jettison:jettison:1.5.1'
api "org.codehaus.jettison:jettison:${versions.jettison}"
api 'com.sun.xml.bind:jaxb-impl:2.2.3-1'

// HACK: javax.xml.bind was removed from default modules in java 9, so we pull the api in here,
Expand Down
2 changes: 1 addition & 1 deletion plugins/repository-gcs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ dependencies {
api 'com.google.api:gax:2.17.0'
api 'org.threeten:threetenbp:1.4.4'
api 'com.google.protobuf:protobuf-java-util:3.20.0'
api 'com.google.protobuf:protobuf-java:3.19.3'
api 'com.google.protobuf:protobuf-java:3.21.7'
api 'com.google.code.gson:gson:2.9.0'
api 'com.google.api.grpc:proto-google-common-protos:2.8.0'
api 'com.google.api.grpc:proto-google-iam-v1:0.12.0'
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
96cfc7147192f1de72c3d7d06972155ffb7d180c
2 changes: 1 addition & 1 deletion plugins/repository-hdfs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ dependencies {
api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}"
api 'com.google.code.gson:gson:2.9.0'
runtimeOnly 'com.google.guava:guava:31.1-jre'
api 'com.google.protobuf:protobuf-java:3.21.4'
api 'com.google.protobuf:protobuf-java:3.21.7'
api "commons-logging:commons-logging:${versions.commonslogging}"
api 'commons-cli:commons-cli:1.5.0'
api "commons-codec:commons-codec:${versions.commonscodec}"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
96cfc7147192f1de72c3d7d06972155ffb7d180c
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@
"url": {
"paths": [
{
"path": "/_cluster/decommission/awareness/_status",
"methods": [
"path":"/_cluster/decommission/awareness/{awareness_attribute_name}/_status",
"methods":[
"GET"
]
],
"parts":{
"awareness_attribute_name":{
"type":"string",
"description":"Awareness attribute name"
}
}
}
]
}
Expand Down
Loading

0 comments on commit afad3e0

Please sign in to comment.