Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Bugs for dependabot changelog verifier workflow ([#4364](https://github.com/opensearch-project/OpenSearch/pull/4364))
- `opensearch.bat` fails to execute when install path includes spaces ([#4362](https://github.com/opensearch-project/OpenSearch/pull/4362))
- Fix error handling while reading analyzer mapping rules ((6d20423)[https://github.com/opensearch-project/OpenSearch/commit/6d20423f5920745463b1abc5f1daf6a786c41aa0])
- Fix for failing checkExtraction, checkLicense and checkNotice tasks for windows gradle check ([#4941](https://github.com/opensearch-project/OpenSearch/pull/4941))

### Security
- CVE-2022-25857 org.yaml:snakeyaml DOS vulnerability ([#4341](https://github.com/opensearch-project/OpenSearch/pull/4341))
## [2.x]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ public void apply(Project project) {
.create("distributionArchiveCheck", DistributionArchiveCheckExtension.class);

File archiveExtractionDir = calculateArchiveExtractionDir(project);

// sanity checks if archives can be extracted
TaskProvider<Copy> checkExtraction = registerCheckExtractionTask(project, buildDistTask, archiveExtractionDir);
checkExtraction.configure(InternalDistributionArchiveSetupPlugin.configure(buildTaskName));
TaskProvider<Task> checkLicense = registerCheckLicenseTask(project, checkExtraction);
checkLicense.configure(InternalDistributionArchiveSetupPlugin.configure(buildTaskName));

TaskProvider<Task> checkNotice = registerCheckNoticeTask(project, checkExtraction);
checkNotice.configure(InternalDistributionArchiveSetupPlugin.configure(buildTaskName));
TaskProvider<Task> checkTask = project.getTasks().named("check");
checkTask.configure(task -> {
task.dependsOn(checkExtraction);
Expand Down Expand Up @@ -118,7 +120,7 @@ public void execute(Task task) {
}

private TaskProvider<Task> registerCheckLicenseTask(Project project, TaskProvider<Copy> checkExtraction) {
TaskProvider<Task> checkLicense = project.getTasks().register("checkLicense", task -> {
return project.getTasks().register("checkLicense", task -> {
task.dependsOn(checkExtraction);
task.doLast(new Action<Task>() {
@Override
Expand All @@ -138,7 +140,6 @@ public void execute(Task task) {
}
});
});
return checkLicense;
}

private TaskProvider<Copy> registerCheckExtractionTask(Project project, TaskProvider<Task> buildDistTask, File archiveExtractionDir) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void apply(Project project) {
configureTarDefaults(project);
}

private Action<Task> configure(String name) {
static Action<Task> configure(String name) {
return (Task task) -> task.onlyIf(s -> {
if (OperatingSystem.current().isWindows()) {
// On Windows, include only Windows distributions and integTestZip
Expand Down