Skip to content

Commit a8aef7d

Browse files
authored
Merge branch 'main' into wkt
Signed-off-by: Heemin Kim <heemin@amazon.com>
2 parents 47ce156 + 3a0c0c0 commit a8aef7d

205 files changed

Lines changed: 3903 additions & 652 deletions

File tree

Some content is hidden

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

.github/ISSUE_TEMPLATE/failed_check.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/workflows/gradle-check.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permissions:
1414
jobs:
1515
check-files:
1616
runs-on: ubuntu-latest
17-
outputs:
17+
outputs:
1818
RUN_GRADLE_CHECK: ${{ steps.changed-files-specific.outputs.any_changed }}
1919
steps:
2020
- uses: actions/checkout@v4
@@ -26,7 +26,7 @@ jobs:
2626
release-notes/*.md
2727
.github/**
2828
*.md
29-
29+
3030
gradle-check:
3131
needs: check-files
3232
if: github.repository == 'opensearch-project/OpenSearch' && needs.check-files.outputs.RUN_GRADLE_CHECK == 'true'
@@ -158,20 +158,11 @@ jobs:
158158
159159
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure [a flaky test](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) unrelated to your change?
160160
161-
- name: Create Issue On Push Failure
162-
if: ${{ github.event_name == 'push' && failure() }}
163-
uses: dblock/create-a-github-issue@v3
164-
env:
165-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
166-
with:
167-
assignees: ${{ github.event.head_commit.author.username }}, ${{ github.triggering_actor }}
168-
filename: .github/ISSUE_TEMPLATE/failed_check.md
169-
170161
check-result:
171162
needs: [check-files, gradle-check]
172163
if: always()
173164
runs-on: ubuntu-latest
174165
steps:
175166
- name: Fail if gradle-check fails
176167
if: ${{ needs.check-files.outputs.RUN_GRADLE_CHECK && needs.gradle-check.result == 'failure' }}
177-
run: exit 1
168+
run: exit 1

CHANGELOG-3.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1717
### Dependencies
1818

1919
### Changed
20+
- Changed locale provider from COMPAT to CLDR ([#14345](https://github.com/opensearch-project/OpenSearch/pull/14345))
2021
- Migrate client transports to Apache HttpClient / Core 5.x ([#4459](https://github.com/opensearch-project/OpenSearch/pull/4459))
2122
- Change http code on create index API with bad input raising NotXContentException from 500 to 400 ([#4773](https://github.com/opensearch-project/OpenSearch/pull/4773))
2223
- Improve summary error message for invalid setting updates ([#4792](https://github.com/opensearch-project/OpenSearch/pull/4792))

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55

66
## [Unreleased 2.x]
77
### Added
8+
- Add fingerprint ingest processor ([#13724](https://github.com/opensearch-project/OpenSearch/pull/13724))
9+
- [Remote Store] Rate limiter for remote store low priority uploads ([#14374](https://github.com/opensearch-project/OpenSearch/pull/14374/))
810

911
### Dependencies
1012
- Bump `org.gradle.test-retry` from 1.5.8 to 1.5.9 ([#13442](https://github.com/opensearch-project/OpenSearch/pull/13442))
1113
- Update to Apache Lucene 9.11.0 ([#14042](https://github.com/opensearch-project/OpenSearch/pull/14042))
14+
- Bump `netty` from 4.1.110.Final to 4.1.111.Final ([#14356](https://github.com/opensearch-project/OpenSearch/pull/14356))
15+
- Bump `org.wiremock:wiremock-standalone` from 3.3.1 to 3.6.0 ([#14361](https://github.com/opensearch-project/OpenSearch/pull/14361))
16+
- Bump `reactor` from 3.5.17 to 3.5.18 ([#14395](https://github.com/opensearch-project/OpenSearch/pull/14395))
17+
- Bump `reactor-netty` from 1.1.19 to 1.1.20 ([#14395](https://github.com/opensearch-project/OpenSearch/pull/14395))
18+
- Bump `commons-net:commons-net` from 3.10.0 to 3.11.1 ([#14396](https://github.com/opensearch-project/OpenSearch/pull/14396))
19+
- Bump `org.apache.commons:commons-configuration2` from 2.10.1 to 2.11.0 ([#14399](https://github.com/opensearch-project/OpenSearch/pull/14399))
20+
- Bump `com.gradle.develocity` from 3.17.4 to 3.17.5 ([#14397](https://github.com/opensearch-project/OpenSearch/pull/14397))
1221

1322
### Changed
1423

@@ -17,6 +26,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1726
### Removed
1827

1928
### Fixed
29+
- Fix handling of Short and Byte data types in ScriptProcessor ingest pipeline ([#14379](https://github.com/opensearch-project/OpenSearch/issues/14379))
2030
- Switch to iterative version of WKT format parser ([#14086](https://github.com/opensearch-project/OpenSearch/pull/14086))
2131

2232
### Security

buildSrc/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ dependencies {
128128
testFixturesApi "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${props.getProperty('randomizedrunner')}"
129129
testFixturesApi gradleApi()
130130
testFixturesApi gradleTestKit()
131-
testImplementation 'org.wiremock:wiremock-standalone:3.3.1'
131+
testImplementation 'org.wiremock:wiremock-standalone:3.6.0'
132132
testImplementation "org.mockito:mockito-core:${props.getProperty('mockito')}"
133133
integTestImplementation('org.spockframework:spock-core:2.3-groovy-3.0') {
134134
exclude module: "groovy"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void execute(Task t) {
110110
if (BuildParams.getRuntimeJavaVersion() == JavaVersion.VERSION_1_8) {
111111
test.systemProperty("java.locale.providers", "SPI,JRE");
112112
} else {
113-
test.systemProperty("java.locale.providers", "SPI,COMPAT");
113+
test.systemProperty("java.locale.providers", "SPI,CLDR");
114114
if (test.getJavaVersion().compareTo(JavaVersion.VERSION_17) < 0) {
115115
test.jvmArgs("--illegal-access=warn");
116116
}

buildSrc/src/main/java/org/opensearch/gradle/info/GlobalBuildInfoPlugin.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,28 @@ private JavaVersion determineJavaVersion(String description, File javaHome, Java
199199
}
200200

201201
private JvmInstallationMetadata getJavaInstallation(File javaHome) {
202-
final InstallationLocation location = new InstallationLocation(javaHome, "Java home");
202+
InstallationLocation location = null;
203+
204+
try {
205+
try {
206+
// The InstallationLocation(File, String) is used by Gradle pre-8.8
207+
location = (InstallationLocation) MethodHandles.publicLookup()
208+
.findConstructor(InstallationLocation.class, MethodType.methodType(void.class, File.class, String.class))
209+
.invokeExact(javaHome, "Java home");
210+
} catch (Throwable ex) {
211+
// The InstallationLocation::userDefined is used by Gradle post-8.7
212+
location = (InstallationLocation) MethodHandles.publicLookup()
213+
.findStatic(
214+
InstallationLocation.class,
215+
"userDefined",
216+
MethodType.methodType(InstallationLocation.class, File.class, String.class)
217+
)
218+
.invokeExact(javaHome, "Java home");
219+
220+
}
221+
} catch (Throwable ex) {
222+
throw new IllegalStateException("Unable to find suitable InstallationLocation constructor / factory method", ex);
223+
}
203224

204225
try {
205226
try {

buildSrc/src/main/java/org/opensearch/gradle/internal/InternalDistributionArchiveSetupPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ private void configureGeneralTaskDefaults(Project project) {
148148
project.getTasks().withType(AbstractCopyTask.class).configureEach(t -> {
149149
t.dependsOn(project.getTasks().withType(EmptyDirTask.class));
150150
t.setIncludeEmptyDirs(true);
151-
t.setDirMode(0755);
152-
t.setFileMode(0644);
151+
t.dirPermissions(perms -> perms.unix(0755));
152+
t.filePermissions(perms -> perms.unix(0644));
153153
});
154154

155155
// common config across all archives

buildSrc/src/main/java/org/opensearch/gradle/precommit/DependencyLicensesPrecommitPlugin.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,14 @@
3333
package org.opensearch.gradle.precommit;
3434

3535
import org.opensearch.gradle.dependencies.CompileOnlyResolvePlugin;
36+
import org.opensearch.gradle.util.GradleUtils;
3637
import org.gradle.api.Project;
3738
import org.gradle.api.Task;
3839
import org.gradle.api.artifacts.Configuration;
3940
import org.gradle.api.artifacts.ProjectDependency;
41+
import org.gradle.api.file.FileCollection;
4042
import org.gradle.api.plugins.JavaPlugin;
43+
import org.gradle.api.provider.Provider;
4144
import org.gradle.api.tasks.TaskProvider;
4245

4346
public class DependencyLicensesPrecommitPlugin extends PrecommitPlugin {
@@ -48,15 +51,16 @@ public TaskProvider<? extends Task> createTask(Project project) {
4851
TaskProvider<DependencyLicensesTask> dependencyLicenses = project.getTasks()
4952
.register("dependencyLicenses", DependencyLicensesTask.class);
5053

54+
final Configuration runtimeClasspath = project.getConfigurations().getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME);
55+
final Configuration compileOnly = project.getConfigurations()
56+
.getByName(CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME);
57+
final Provider<FileCollection> provider = project.provider(
58+
() -> GradleUtils.getFiles(project, runtimeClasspath, dependency -> dependency instanceof ProjectDependency == false)
59+
.minus(compileOnly)
60+
);
61+
5162
// only require dependency licenses for non-opensearch deps
52-
dependencyLicenses.configure(t -> {
53-
Configuration runtimeClasspath = project.getConfigurations().getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME);
54-
Configuration compileOnly = project.getConfigurations()
55-
.getByName(CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME);
56-
t.setDependencies(
57-
runtimeClasspath.fileCollection(dependency -> dependency instanceof ProjectDependency == false).minus(compileOnly)
58-
);
59-
});
63+
dependencyLicenses.configure(t -> t.getDependencies().set(provider));
6064

6165
// we also create the updateShas helper task that is associated with dependencyLicenses
6266
project.getTasks().register("updateShas", UpdateShasTask.class, t -> t.setParentTask(dependencyLicenses));

buildSrc/src/main/java/org/opensearch/gradle/precommit/DependencyLicensesTask.java

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import org.gradle.api.file.FileCollection;
4040
import org.gradle.api.logging.Logger;
4141
import org.gradle.api.logging.Logging;
42+
import org.gradle.api.provider.Property;
4243
import org.gradle.api.tasks.Input;
4344
import org.gradle.api.tasks.InputDirectory;
4445
import org.gradle.api.tasks.InputFiles;
@@ -121,7 +122,7 @@ public class DependencyLicensesTask extends DefaultTask {
121122
/**
122123
* A collection of jar files that should be checked.
123124
*/
124-
private FileCollection dependencies;
125+
private Property<FileCollection> dependenciesProvider;
125126

126127
/**
127128
* The directory to find the license and sha files in.
@@ -158,12 +159,11 @@ public void mapping(Map<String, String> props) {
158159
}
159160

160161
@InputFiles
161-
public FileCollection getDependencies() {
162-
return dependencies;
163-
}
164-
165-
public void setDependencies(FileCollection dependencies) {
166-
this.dependencies = dependencies;
162+
public Property<FileCollection> getDependencies() {
163+
if (dependenciesProvider == null) {
164+
dependenciesProvider = getProject().getObjects().property(FileCollection.class);
165+
}
166+
return dependenciesProvider;
167167
}
168168

169169
@Optional
@@ -190,6 +190,11 @@ public void ignoreSha(String dep) {
190190

191191
@TaskAction
192192
public void checkDependencies() throws IOException, NoSuchAlgorithmException {
193+
if (dependenciesProvider == null) {
194+
throw new GradleException("No dependencies variable defined.");
195+
}
196+
197+
final FileCollection dependencies = dependenciesProvider.get();
193198
if (dependencies == null) {
194199
throw new GradleException("No dependencies variable defined.");
195200
}
@@ -226,7 +231,7 @@ public void checkDependencies() throws IOException, NoSuchAlgorithmException {
226231
}
227232
}
228233

229-
checkDependencies(licenses, notices, sources, shaFiles);
234+
checkDependencies(dependencies, licenses, notices, sources, shaFiles);
230235

231236
licenses.forEach((item, exists) -> failIfAnyMissing(item, exists, "license"));
232237

@@ -255,6 +260,7 @@ private void failIfAnyMissing(String item, Boolean exists, String type) {
255260
}
256261

257262
private void checkDependencies(
263+
FileCollection dependencies,
258264
Map<String, Boolean> licenses,
259265
Map<String, Boolean> notices,
260266
Map<String, Boolean> sources,

0 commit comments

Comments
 (0)