Skip to content

Commit db3e068

Browse files
author
Peter Alfonsi
committed
Merge remote-tracking branch 'upstream/main' into cache-impl-size-setting-bugfix
Signed-off-by: Peter Alfonsi <[email protected]>
2 parents c75fb9f + 57a6605 commit db3e068

File tree

242 files changed

+17029
-482
lines changed

Some content is hidden

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

242 files changed

+17029
-482
lines changed

.github/workflows/detect-breaking-change.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
with:
1818
cache-disabled: true
1919
arguments: japicmp
20-
gradle-version: 8.7
20+
gradle-version: 8.11
2121
build-root-directory: server
2222
- if: failure()
2323
run: cat server/build/reports/java-compatibility/report.txt

.github/workflows/gradle-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
116116
- name: Upload Coverage Report
117117
if: success()
118-
uses: codecov/codecov-action@v4
118+
uses: codecov/codecov-action@v5
119119
with:
120120
token: ${{ secrets.CODECOV_TOKEN }}
121121
files: ./codeCoverage.xml

CHANGELOG.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,41 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2020
- Add vertical scaling and SoftReference for snapshot repository data cache ([#16489](https://github.com/opensearch-project/OpenSearch/pull/16489))
2121
- Support prefix list for remote repository attributes([#16271](https://github.com/opensearch-project/OpenSearch/pull/16271))
2222
- Add new configuration setting `synonym_analyzer`, to the `synonym` and `synonym_graph` filters, enabling the specification of a custom analyzer for reading the synonym file ([#16488](https://github.com/opensearch-project/OpenSearch/pull/16488)).
23+
- Add stats for remote publication failure and move download failure stats to remote methods([#16682](https://github.com/opensearch-project/OpenSearch/pull/16682/))
24+
- Added a precaution to handle extreme date values during sorting to prevent `arithmetic_exception: long overflow` ([#16812](https://github.com/opensearch-project/OpenSearch/pull/16812)).
25+
- Add search replica stats to segment replication stats API ([#16678](https://github.com/opensearch-project/OpenSearch/pull/16678))
26+
- Introduce a setting to disable download of full cluster state from remote on term mismatch([#16798](https://github.com/opensearch-project/OpenSearch/pull/16798/))
2327

2428
### Dependencies
2529
- Bump `com.google.cloud:google-cloud-core-http` from 2.23.0 to 2.47.0 ([#16504](https://github.com/opensearch-project/OpenSearch/pull/16504))
2630
- Bump `google-auth-library-oauth2-http` from 1.7.0 to 1.29.0 in /plugins/repository-gcs ([#16520](https://github.com/opensearch-project/OpenSearch/pull/16520))
27-
- Bump `com.azure:azure-storage-common` from 12.25.1 to 12.27.1 ([#16521](https://github.com/opensearch-project/OpenSearch/pull/16521))
28-
- Bump `com.google.apis:google-api-services-compute` from v1-rev20240407-2.0.0 to v1-rev20241021-2.0.0 ([#16502](https://github.com/opensearch-project/OpenSearch/pull/16502), [#16548](https://github.com/opensearch-project/OpenSearch/pull/16548))
31+
- Bump `com.azure:azure-storage-common` from 12.25.1 to 12.28.0 ([#16521](https://github.com/opensearch-project/OpenSearch/pull/16521), [#16808](https://github.com/opensearch-project/OpenSearch/pull/16808))
32+
- Bump `com.google.apis:google-api-services-compute` from v1-rev20240407-2.0.0 to v1-rev20241105-2.0.0 ([#16502](https://github.com/opensearch-project/OpenSearch/pull/16502), [#16548](https://github.com/opensearch-project/OpenSearch/pull/16548), [#16613](https://github.com/opensearch-project/OpenSearch/pull/16613))
2933
- Bump `com.azure:azure-storage-blob` from 12.23.0 to 12.28.1 ([#16501](https://github.com/opensearch-project/OpenSearch/pull/16501))
3034
- Bump `org.apache.hadoop:hadoop-minicluster` from 3.4.0 to 3.4.1 ([#16550](https://github.com/opensearch-project/OpenSearch/pull/16550))
31-
- Bump `org.apache.xmlbeans:xmlbeans` from 5.2.1 to 5.2.2 ([#16612](https://github.com/opensearch-project/OpenSearch/pull/16612))
32-
- Bump `com.nimbusds:nimbus-jose-jwt` from 9.41.1 to 9.46 ([#16611](https://github.com/opensearch-project/OpenSearch/pull/16611))
35+
- Bump `org.apache.xmlbeans:xmlbeans` from 5.2.1 to 5.3.0 ([#16612](https://github.com/opensearch-project/OpenSearch/pull/16612), [#16854](https://github.com/opensearch-project/OpenSearch/pull/16854))
36+
- Bump `com.nimbusds:nimbus-jose-jwt` from 9.41.1 to 9.47 ([#16611](https://github.com/opensearch-project/OpenSearch/pull/16611), [#16807](https://github.com/opensearch-project/OpenSearch/pull/16807))
3337
- Bump `lycheeverse/lychee-action` from 2.0.2 to 2.1.0 ([#16610](https://github.com/opensearch-project/OpenSearch/pull/16610))
3438
- Bump `me.champeau.gradle.japicmp` from 0.4.4 to 0.4.5 ([#16614](https://github.com/opensearch-project/OpenSearch/pull/16614))
3539
- Bump `mockito` from 5.14.1 to 5.14.2, `objenesis` from 3.2 to 3.3 and `bytebuddy` from 1.15.4 to 1.15.10 ([#16655](https://github.com/opensearch-project/OpenSearch/pull/16655))
3640
- Bump `Netty` from 4.1.114.Final to 4.1.115.Final ([#16661](https://github.com/opensearch-project/OpenSearch/pull/16661))
3741
- Bump `org.xerial.snappy:snappy-java` from 1.1.10.6 to 1.1.10.7 ([#16665](https://github.com/opensearch-project/OpenSearch/pull/16665))
42+
- Bump `codecov/codecov-action` from 4 to 5 ([#16667](https://github.com/opensearch-project/OpenSearch/pull/16667))
43+
- Bump `org.apache.logging.log4j:log4j-core` from 2.24.1 to 2.24.3 ([#16718](https://github.com/opensearch-project/OpenSearch/pull/16718), [#16858](https://github.com/opensearch-project/OpenSearch/pull/16858))
44+
- Bump `jackson` from 2.17.2 to 2.18.2 ([#16733](https://github.com/opensearch-project/OpenSearch/pull/16733))
45+
- Bump `ch.qos.logback:logback-classic` from 1.2.13 to 1.5.12 ([#16716](https://github.com/opensearch-project/OpenSearch/pull/16716))
46+
- Bump `com.azure:azure-identity` from 1.13.2 to 1.14.2 ([#16778](https://github.com/opensearch-project/OpenSearch/pull/16778))
47+
- Bump Apache Lucene from 9.12.0 to 9.12.1 ([#16846](https://github.com/opensearch-project/OpenSearch/pull/16846))
48+
- Bump `com.gradle.develocity` from 3.18.2 to 3.19 ([#16855](https://github.com/opensearch-project/OpenSearch/pull/16855))
49+
- Bump `org.jline:jline` from 3.27.1 to 3.28.0 ([#16857](https://github.com/opensearch-project/OpenSearch/pull/16857))
50+
- Bump `com.azure:azure-core` from 1.51.0 to 1.54.1 ([#16856](https://github.com/opensearch-project/OpenSearch/pull/16856))
3851

3952
### Changed
53+
- Indexed IP field supports `terms_query` with more than 1025 IP masks [#16391](https://github.com/opensearch-project/OpenSearch/pull/16391)
54+
- Make entries for dependencies from server/build.gradle to gradle version catalog ([#16707](https://github.com/opensearch-project/OpenSearch/pull/16707))
4055

4156
### Deprecated
57+
- Performing update operation with default pipeline or final pipeline is deprecated ([#16712](https://github.com/opensearch-project/OpenSearch/pull/16712))
4258

4359
### Removed
4460

@@ -51,6 +67,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5167
- Fix rollover alias supports restored searchable snapshot index([#16483](https://github.com/opensearch-project/OpenSearch/pull/16483))
5268
- Fix permissions error on scripted query against remote snapshot ([#16544](https://github.com/opensearch-project/OpenSearch/pull/16544))
5369
- Fix `doc_values` only (`index:false`) IP field searching for masks ([#16628](https://github.com/opensearch-project/OpenSearch/pull/16628))
70+
- Fix stale cluster state custom file deletion ([#16670](https://github.com/opensearch-project/OpenSearch/pull/16670))
71+
- [Tiered Caching] Fix bug in cache stats API ([#16560](https://github.com/opensearch-project/OpenSearch/pull/16560))
72+
- Bound the size of cache in deprecation logger ([16702](https://github.com/opensearch-project/OpenSearch/issues/16702))
73+
- Ensure consistency of system flag on IndexMetadata after diff is applied ([#16644](https://github.com/opensearch-project/OpenSearch/pull/16644))
74+
- Skip remote-repositories validations for node-joins when RepositoriesService is not in sync with cluster-state ([#16763](https://github.com/opensearch-project/OpenSearch/pull/16763))
75+
- Fix _list/shards API failing when closed indices are present ([#16606](https://github.com/opensearch-project/OpenSearch/pull/16606))
76+
- Fix remote shards balance ([#15335](https://github.com/opensearch-project/OpenSearch/pull/15335))
5477
- Fix max request cache size settings not working properly with pluggable caching ([#16636](https://github.com/opensearch-project/OpenSearch/pull/16636))
5578

5679
### Security

build.gradle

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,20 @@ Map<String, String> buildMetadataMap = buildMetadataValue.tokenize(';').collectE
162162
return [key, value]
163163
}
164164

165-
/**
166-
* Using 'git' command line (if available), tries to fetch the commit date of the current revision
167-
* @return commit date of the current revision or 0 if it is not available
168-
*/
165+
// See please https://docs.gradle.org/8.11/userguide/service_injection.html#execoperations
166+
interface InjectedExecOps {
167+
@Inject ExecOperations getExecOps()
168+
}
169+
170+
/**
171+
* Using 'git' command line (if available), tries to fetch the commit date of the current revision
172+
* @return commit date of the current revision or 0 if it is not available
173+
*/
169174
long gitRevisionDate = {
175+
def execOps = project.objects.newInstance(InjectedExecOps)
170176
// Try to get last commit date as Unix timestamp
171177
try (ByteArrayOutputStream stdout = new ByteArrayOutputStream()) {
172-
ExecResult result = project.exec(spec -> {
178+
ExecResult result = execOps.execOps.exec(spec -> {
173179
spec.setIgnoreExitValue(true);
174180
spec.setStandardOutput(stdout);
175181
spec.commandLine("git", "log", "-1", "--format=%ct");
@@ -362,7 +368,7 @@ allprojects {
362368
if ((dep instanceof ProjectDependency) == false) {
363369
return
364370
}
365-
Project upstreamProject = dep.dependencyProject
371+
Project upstreamProject = project.project(dep.path)
366372
if (upstreamProject == null) {
367373
return
368374
}
@@ -438,7 +444,7 @@ gradle.projectsEvaluated {
438444

439445
configurations.matching { it.canBeResolved }.all { Configuration configuration ->
440446
dependencies.matching { it instanceof ProjectDependency }.all { ProjectDependency dep ->
441-
Project upstreamProject = dep.dependencyProject
447+
Project upstreamProject = project.project(dep.path)
442448
if (upstreamProject != null) {
443449
if (project.path == upstreamProject.path) {
444450
// TODO: distribution integ tests depend on themselves (!), fix that

buildSrc/src/main/groovy/org/opensearch/gradle/plugin/OptionalDependenciesPlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class OptionalDependenciesPlugin implements Plugin<Project> {
7979

8080
if (foundDep) {
8181
if (foundDep.optional) {
82-
foundDep.optional.value = 'true'
82+
foundDep.optional*.value = 'true'
8383
} else {
8484
foundDep.appendNode(OPTIONAL_IDENTIFIER, 'true')
8585
}

buildSrc/src/main/groovy/org/opensearch/gradle/test/TestWithDependenciesPlugin.groovy

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,12 @@ class TestWithDependenciesPlugin implements Plugin<Project> {
5656

5757
project.configurations.testImplementation.dependencies.all { Dependency dep ->
5858
// this closure is run every time a compile dependency is added
59-
if (dep instanceof ProjectDependency && dep.dependencyProject.plugins.hasPlugin(PluginBuildPlugin)) {
60-
project.gradle.projectsEvaluated {
61-
addPluginResources(project, dep.dependencyProject)
59+
if (dep instanceof ProjectDependency) {
60+
Project dependencyProject = project.project(((ProjectDependency)dep).path)
61+
if (dependencyProject.plugins.hasPlugin(PluginBuildPlugin)) {
62+
project.gradle.projectsEvaluated {
63+
addPluginResources(project, dependencyProject)
64+
}
6265
}
6366
}
6467
}

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ public class LoggedExec extends Exec implements FileSystemOperationsAware {
7171
private Consumer<Logger> outputLogger;
7272
private FileSystemOperations fileSystemOperations;
7373

74+
interface InjectedExecOps {
75+
@Inject
76+
ExecOperations getExecOps();
77+
}
78+
7479
@Inject
7580
public LoggedExec(FileSystemOperations fileSystemOperations) {
7681
this.fileSystemOperations = fileSystemOperations;
@@ -133,15 +138,17 @@ public void setSpoolOutput(boolean spoolOutput) {
133138
}
134139

135140
public static ExecResult exec(Project project, Action<ExecSpec> action) {
136-
return genericExec(project::exec, action);
141+
final InjectedExecOps execOps = project.getObjects().newInstance(InjectedExecOps.class);
142+
return exec(execOps.getExecOps(), action);
137143
}
138144

139145
public static ExecResult exec(ExecOperations execOperations, Action<ExecSpec> action) {
140146
return genericExec(execOperations::exec, action);
141147
}
142148

143149
public static ExecResult javaexec(Project project, Action<JavaExecSpec> action) {
144-
return genericExec(project::javaexec, action);
150+
final InjectedExecOps execOps = project.getObjects().newInstance(InjectedExecOps.class);
151+
return genericExec(execOps.getExecOps()::javaexec, action);
145152
}
146153

147154
/** Returns JVM arguments suitable for a short-lived forked task */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public String call() throws Exception {
121121
Node dependencyNode = dependenciesNode.appendNode("dependency");
122122
dependencyNode.appendNode("groupId", dependency.getGroup());
123123
ProjectDependency projectDependency = (ProjectDependency) dependency;
124-
String artifactId = getArchivesBaseName(projectDependency.getDependencyProject());
124+
String artifactId = getArchivesBaseName(project.project(projectDependency.getPath()));
125125
dependencyNode.appendNode("artifactId", artifactId);
126126
dependencyNode.appendNode("version", dependency.getVersion());
127127
dependencyNode.appendNode("scope", "compile");

0 commit comments

Comments
 (0)