Skip to content

Commit 67120c5

Browse files
authored
Merge branch 'main' into issue/4174
2 parents d12e874 + ff2d5be commit 67120c5

File tree

226 files changed

+9224
-656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+9224
-656
lines changed

.ci/bwcVersions

+1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@ BWC_VERSION:
5151
- "2.2.1"
5252
- "2.2.2"
5353
- "2.3.0"
54+
- "2.3.1"
5455
- "2.4.0"

CHANGELOG.md

+40-16
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
99
- Add support for s390x architecture ([#4001](https://github.com/opensearch-project/OpenSearch/pull/4001))
1010
- Github workflow for changelog verification ([#4085](https://github.com/opensearch-project/OpenSearch/pull/4085))
1111
- Point in time rest layer changes for create and delete PIT API ([#4064](https://github.com/opensearch-project/OpenSearch/pull/4064))
12+
- Point in time rest layer changes for list PIT and PIT segments API ([#4388](https://github.com/opensearch-project/OpenSearch/pull/4388))
1213
- Added @dreamer-89 as an Opensearch maintainer ([#4342](https://github.com/opensearch-project/OpenSearch/pull/4342))
1314
- Added release notes for 1.3.5 ([#4343](https://github.com/opensearch-project/OpenSearch/pull/4343))
1415
- Added release notes for 2.2.1 ([#4344](https://github.com/opensearch-project/OpenSearch/pull/4344))
@@ -19,37 +20,53 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1920
- Update previous release bwc version to 2.4.0 ([#4455](https://github.com/opensearch-project/OpenSearch/pull/4455))
2021
- 2.3.0 release notes ([#4457](https://github.com/opensearch-project/OpenSearch/pull/4457))
2122
- Added missing javadocs for `:distribution:tools` modules ([#4483](https://github.com/opensearch-project/OpenSearch/pull/4483))
22-
23-
### Dependencies
24-
25-
- Bumps `reactive-streams` from 1.0.3 to 1.0.4
26-
23+
- Add BWC version 2.3.1 ([#4513](https://github.com/opensearch-project/OpenSearch/pull/4513))
24+
- [Segment Replication] Add snapshot and restore tests for segment replication feature ([#3993](https://github.com/opensearch-project/OpenSearch/pull/3993))
25+
- Added missing javadocs for `:example-plugins` modules ([#4540](https://github.com/opensearch-project/OpenSearch/pull/4540))
26+
- Add missing Javadoc tag descriptions in unit tests ([#4629](https://github.com/opensearch-project/OpenSearch/pull/4629))
27+
2728
### Dependencies
29+
- Bumps `log4j-core` from 2.18.0 to 2.19.0
30+
- Bumps `reactor-netty-http` from 1.0.18 to 1.0.23
31+
- Bumps `jettison` from 1.5.0 to 1.5.1
2832

29-
- Bumps `org.gradle.test-retry` from 1.4.0 to 1.4.1
30-
- Bumps `reactor-netty-core` from 1.0.19 to 1.0.22
3133

3234
### Dependencies
33-
34-
- Bumps `com.diffplug.spotless` from 6.9.1 to 6.10.0
35-
- Bumps `xmlbeans` from 5.1.0 to 5.1.1
36-
- Bumps azure-core-http-netty from 1.12.0 to 1.12.4([#4160](https://github.com/opensearch-project/OpenSearch/pull/4160))
37-
- Bumps azure-core from 1.27.0 to 1.31.0([#4160](https://github.com/opensearch-project/OpenSearch/pull/4160))
38-
- Bumps azure-storage-common from 12.16.0 to 12.18.0([#4160](https://github.com/opensearch-project/OpenSearch/pull/4160))
35+
- Bumps `xmlbeans` from 5.1.0 to 5.1.1 ([#4354](https://github.com/opensearch-project/OpenSearch/pull/4354))
36+
- Bumps `azure-core-http-netty` from 1.12.0 to 1.12.4 ([#4160](https://github.com/opensearch-project/OpenSearch/pull/4160))
37+
- Bumps `azure-core` from 1.27.0 to 1.31.0 ([#4160](https://github.com/opensearch-project/OpenSearch/pull/4160))
38+
- Bumps `azure-storage-common` from 12.16.0 to 12.18.0 ([#4160](https://github.com/opensearch-project/OpenSearch/pull/4160))
39+
- Bumps `org.gradle.test-retry` from 1.4.0 to 1.4.1 ([#4411](https://github.com/opensearch-project/OpenSearch/pull/4411))
40+
- Bumps `reactor-netty-core` from 1.0.19 to 1.0.22 ([#4447](https://github.com/opensearch-project/OpenSearch/pull/4447))
41+
- Bumps `reactive-streams` from 1.0.3 to 1.0.4 ([#4488](https://github.com/opensearch-project/OpenSearch/pull/4488))
42+
- Bumps `com.diffplug.spotless` from 6.10.0 to 6.11.0 ([#4547](https://github.com/opensearch-project/OpenSearch/pull/4547))
43+
- Bumps `reactor-core` from 3.4.18 to 3.4.23 ([#4548](https://github.com/opensearch-project/OpenSearch/pull/4548))
44+
- Bumps `jempbox` from 1.8.16 to 1.8.17 ([#4550](https://github.com/opensearch-project/OpenSearch/pull/4550))
45+
- Bumps `hadoop-hdfs` from 3.3.3 to 3.3.4 ([#4644](https://github.com/opensearch-project/OpenSearch/pull/4644))
3946

4047
### Changed
4148

4249
- Dependency updates (httpcore, mockito, slf4j, httpasyncclient, commons-codec) ([#4308](https://github.com/opensearch-project/OpenSearch/pull/4308))
4350
- Use RemoteSegmentStoreDirectory instead of RemoteDirectory ([#4240](https://github.com/opensearch-project/OpenSearch/pull/4240))
4451
- Plugin ZIP publication groupId value is configurable ([#4156](https://github.com/opensearch-project/OpenSearch/pull/4156))
52+
- Weighted round-robin scheduling policy for shard coordination traffic ([#4241](https://github.com/opensearch-project/OpenSearch/pull/4241))
4553
- Add index specific setting for remote repository ([#4253](https://github.com/opensearch-project/OpenSearch/pull/4253))
4654
- [Segment Replication] Update replicas to commit SegmentInfos instead of relying on SIS files from primary shards. ([#4402](https://github.com/opensearch-project/OpenSearch/pull/4402))
4755
- [CCR] Add getHistoryOperationsFromTranslog method to fetch the history snapshot from translogs ([#3948](https://github.com/opensearch-project/OpenSearch/pull/3948))
56+
- [Remote Store] Change behaviour in replica recovery for remote translog enabled indices ([#4318](https://github.com/opensearch-project/OpenSearch/pull/4318))
57+
- PUT api for weighted shard routing ([#4272](https://github.com/opensearch-project/OpenSearch/pull/4272))
58+
- Unmute test RelocationIT.testRelocationWhileIndexingRandom ([#4580](https://github.com/opensearch-project/OpenSearch/pull/4580))
59+
- Add DecommissionService and helper to execute awareness attribute decommissioning ([#4084](https://github.com/opensearch-project/OpenSearch/pull/4084))
60+
- Further simplification of the ZIP publication implementation ([#4360](https://github.com/opensearch-project/OpenSearch/pull/4360))
61+
- Relax visibility of the HTTP_CHANNEL_KEY and HTTP_SERVER_CHANNEL_KEY to make it possible for the plugins to access associated Netty4HttpChannel / Netty4HttpServerChannel instance ([#4638](https://github.com/opensearch-project/OpenSearch/pull/4638))
62+
- Load the deprecated master role in a dedicated method instead of in setAdditionalRoles() ([#4582](https://github.com/opensearch-project/OpenSearch/pull/4582))
4863
- Improve Gradle pre-commit checks to pre-empt Jenkins build ([#4174](https://github.com/opensearch-project/OpenSearch/pull/4660))
4964

5065
### Deprecated
5166

5267
### Removed
68+
- Remove deprecated code to add node name into log pattern of log4j property file ([#4568](https://github.com/opensearch-project/OpenSearch/pull/4568))
69+
- Unused object and import within TransportClusterAllocationExplainAction ([#4639](https://github.com/opensearch-project/OpenSearch/pull/4639))
5370

5471
### Fixed
5572

@@ -70,11 +87,15 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
7087
- [Segment Replication] Update flaky testOnNewCheckpointFromNewPrimaryCancelOngoingReplication unit test ([#4414](https://github.com/opensearch-project/OpenSearch/pull/4414))
7188
- Fixed the `_cat/shards/10_basic.yml` test cases fix.
7289
- [Segment Replication] Fix timeout issue by calculating time needed to process getSegmentFiles ([#4426](https://github.com/opensearch-project/OpenSearch/pull/4426))
73-
- [Bug]: gradle check failing with java heap OutOfMemoryError (([#4328](https://github.com/opensearch-project/OpenSearch/
90+
- [Bug]: gradle check failing with java heap OutOfMemoryError ([#4328](https://github.com/opensearch-project/OpenSearch/))
7491
- `opensearch.bat` fails to execute when install path includes spaces ([#4362](https://github.com/opensearch-project/OpenSearch/pull/4362))
7592
- Getting security exception due to access denied 'java.lang.RuntimePermission' 'accessDeclaredMembers' when trying to get snapshot with S3 IRSA ([#4469](https://github.com/opensearch-project/OpenSearch/pull/4469))
7693
- Fixed flaky test `ResourceAwareTasksTests.testTaskIdPersistsInThreadContext` ([#4484](https://github.com/opensearch-project/OpenSearch/pull/4484))
7794
- Fixed the ignore_malformed setting to also ignore objects ([#4494](https://github.com/opensearch-project/OpenSearch/pull/4494))
95+
- [Segment Replication] Ignore lock file when testing cleanupAndPreserveLatestCommitPoint ([#4544](https://github.com/opensearch-project/OpenSearch/pull/4544))
96+
- Updated jackson to 2.13.4 and snakeyml to 1.32 ([#4556](https://github.com/opensearch-project/OpenSearch/pull/4556))
97+
- [Bug]: Fixed invalid location of JDK dependency for arm64 architecture([#4613](https://github.com/opensearch-project/OpenSearch/pull/4613))
98+
- [Bug]: Alias filter lost after rollover ([#4499](https://github.com/opensearch-project/OpenSearch/pull/4499))
7899

79100
### Security
80101

@@ -87,6 +108,10 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
87108
- Github workflow for changelog verification ([#4085](https://github.com/opensearch-project/OpenSearch/pull/4085))
88109
- Label configuration for dependabot PRs ([#4348](https://github.com/opensearch-project/OpenSearch/pull/4348))
89110
- Added RestLayer Changes for PIT stats ([#4217](https://github.com/opensearch-project/OpenSearch/pull/4217))
111+
- Added GeoBounds aggregation on GeoShape field type.([#4266](https://github.com/opensearch-project/OpenSearch/pull/4266))
112+
- Addition of Doc values on the GeoShape Field
113+
- Addition of GeoShape ValueSource level code interfaces for accessing the DocValues.
114+
- Addition of Missing Value feature in the GeoShape Aggregations.
90115

91116
### Changed
92117

@@ -100,6 +125,5 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
100125
- Commit workflow for dependabot changelog helper ([#4331](https://github.com/opensearch-project/OpenSearch/pull/4331))
101126

102127
### Security
103-
104-
[unreleased]: https://github.com/opensearch-project/OpenSearch/compare/2.2.0...HEAD
128+
[Unreleased]: https://github.com/opensearch-project/OpenSearch/compare/2.2.0...HEAD
105129
[2.x]: https://github.com/opensearch-project/OpenSearch/compare/2.2.0...2.x

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ plugins {
5555
id 'lifecycle-base'
5656
id 'opensearch.docker-support'
5757
id 'opensearch.global-build-info'
58-
id "com.diffplug.spotless" version "6.10.0" apply false
58+
id "com.diffplug.spotless" version "6.11.0" apply false
5959
id "org.gradle.test-retry" version "1.4.1" apply false
6060
id "test-report-aggregation"
6161
id 'jacoco-report-aggregation'

buildSrc/src/main/java/org/opensearch/gradle/Jdk.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public void setArchitecture(final String architecture) {
128128
"unknown architecture [" + jdkArchitecture + "] for jdk [" + name + "], must be one of " + ALLOWED_ARCHITECTURES
129129
);
130130
}
131-
this.architecture.set(architecture);
131+
this.architecture.set(jdkArchitecture);
132132
}
133133

134134
public String getBaseVersion() {

buildSrc/src/main/java/org/opensearch/gradle/pluginzip/Publish.java

+36-47
Original file line numberDiff line numberDiff line change
@@ -9,83 +9,72 @@
99

1010
import org.gradle.api.Plugin;
1111
import org.gradle.api.Project;
12-
import org.gradle.api.logging.Logger;
13-
import org.gradle.api.logging.Logging;
1412
import org.gradle.api.publish.PublishingExtension;
1513
import org.gradle.api.publish.maven.MavenPublication;
16-
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin;
1714

1815
import java.nio.file.Path;
1916
import org.gradle.api.Task;
17+
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin;
2018

2119
public class Publish implements Plugin<Project> {
2220

23-
private static final Logger LOGGER = Logging.getLogger(Publish.class);
24-
25-
public final static String EXTENSION_NAME = "zipmavensettings";
21+
// public final static String PLUGIN_ZIP_PUBLISH_POM_TASK = "generatePomFileForPluginZipPublication";
2622
public final static String PUBLICATION_NAME = "pluginZip";
2723
public final static String STAGING_REPO = "zipStaging";
28-
public final static String PLUGIN_ZIP_PUBLISH_POM_TASK = "generatePomFileForPluginZipPublication";
29-
public final static String LOCALMAVEN = "publishToMavenLocal";
3024
public final static String LOCAL_STAGING_REPO_PATH = "/build/local-staging-repo";
31-
public String zipDistributionLocation = "/build/distributions/";
25+
// TODO: Does the path ^^ need to use platform dependant file separators ?
26+
27+
private boolean isZipPublicationPresent(Project project) {
28+
PublishingExtension pe = project.getExtensions().findByType(PublishingExtension.class);
29+
if (pe == null) {
30+
return false;
31+
}
32+
return pe.getPublications().findByName(PUBLICATION_NAME) != null;
33+
}
3234

33-
public static void configMaven(Project project) {
35+
private void addLocalMavenRepo(Project project) {
3436
final Path buildDirectory = project.getRootDir().toPath();
35-
project.getPluginManager().apply(MavenPublishPlugin.class);
3637
project.getExtensions().configure(PublishingExtension.class, publishing -> {
3738
publishing.repositories(repositories -> {
3839
repositories.maven(maven -> {
3940
maven.setName(STAGING_REPO);
4041
maven.setUrl(buildDirectory.toString() + LOCAL_STAGING_REPO_PATH);
4142
});
4243
});
44+
});
45+
}
46+
47+
private void addZipArtifact(Project project) {
48+
project.getExtensions().configure(PublishingExtension.class, publishing -> {
4349
publishing.publications(publications -> {
4450
MavenPublication mavenZip = (MavenPublication) publications.findByName(PUBLICATION_NAME);
45-
46-
if (mavenZip == null) {
47-
mavenZip = publications.create(PUBLICATION_NAME, MavenPublication.class);
51+
if (mavenZip != null) {
52+
mavenZip.artifact(project.getTasks().named("bundlePlugin"));
4853
}
49-
50-
String groupId = mavenZip.getGroupId();
51-
if (groupId == null) {
52-
// The groupId is not customized thus we get the value from "project.group".
53-
// See https://docs.gradle.org/current/userguide/publishing_maven.html#sec:identity_values_in_the_generated_pom
54-
groupId = getProperty("group", project);
55-
}
56-
57-
String artifactId = project.getName();
58-
String pluginVersion = getProperty("version", project);
59-
mavenZip.artifact(project.getTasks().named("bundlePlugin"));
60-
mavenZip.setGroupId(groupId);
61-
mavenZip.setArtifactId(artifactId);
62-
mavenZip.setVersion(pluginVersion);
6354
});
6455
});
6556
}
6657

67-
static String getProperty(String name, Project project) {
68-
if (project.hasProperty(name)) {
69-
Object property = project.property(name);
70-
if (property != null) {
71-
return property.toString();
72-
}
73-
}
74-
return null;
75-
}
76-
7758
@Override
7859
public void apply(Project project) {
60+
project.getPluginManager().apply("nebula.maven-base-publish");
61+
project.getPluginManager().apply(MavenPublishPlugin.class);
7962
project.afterEvaluate(evaluatedProject -> {
80-
configMaven(project);
81-
Task validatePluginZipPom = project.getTasks().findByName("validatePluginZipPom");
82-
if (validatePluginZipPom != null) {
83-
project.getTasks().getByName("validatePluginZipPom").dependsOn("generatePomFileForNebulaPublication");
84-
}
85-
Task publishPluginZipPublicationToZipStagingRepository = project.getTasks()
86-
.findByName("publishPluginZipPublicationToZipStagingRepository");
87-
if (publishPluginZipPublicationToZipStagingRepository != null) {
88-
publishPluginZipPublicationToZipStagingRepository.dependsOn("generatePomFileForNebulaPublication");
63+
if (isZipPublicationPresent(project)) {
64+
addLocalMavenRepo(project);
65+
addZipArtifact(project);
66+
Task validatePluginZipPom = project.getTasks().findByName("validatePluginZipPom");
67+
if (validatePluginZipPom != null) {
68+
validatePluginZipPom.dependsOn("generatePomFileForNebulaPublication");
69+
}
70+
Task publishPluginZipPublicationToZipStagingRepository = project.getTasks()
71+
.findByName("publishPluginZipPublicationToZipStagingRepository");
72+
if (publishPluginZipPublicationToZipStagingRepository != null) {
73+
publishPluginZipPublicationToZipStagingRepository.dependsOn("generatePomFileForNebulaPublication");
74+
}
75+
} else {
76+
project.getLogger()
77+
.warn(String.format("Plugin 'opensearch.pluginzip' is applied but no '%s' publication is defined.", PUBLICATION_NAME));
8978
}
9079
});
9180
}

0 commit comments

Comments
 (0)