From 11bce3df3e5e13a148361dc604cb42b8cfdeded4 Mon Sep 17 00:00:00 2001 From: owaiskazi19 Date: Tue, 28 Feb 2023 18:50:26 +0000 Subject: [PATCH 1/2] Bumps snakeyaml to 2.0 Signed-off-by: owaiskazi19 --- CHANGELOG.md | 1 + buildSrc/version.properties | 2 +- libs/x-content/licenses/snakeyaml-1.33.jar.sha1 | 1 - libs/x-content/licenses/snakeyaml-2.0.jar.sha1 | 1 + .../main/java/org/opensearch/extensions/ExtensionsManager.java | 3 +-- 5 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 libs/x-content/licenses/snakeyaml-1.33.jar.sha1 create mode 100644 libs/x-content/licenses/snakeyaml-2.0.jar.sha1 diff --git a/CHANGELOG.md b/CHANGELOG.md index c8f6276a25961..670f7a43c35eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Bump `joni` from 2.1.44 to 2.1.45 - Bump `commons-io:commons-io` from 2.7 to 2.11.0 - Bump `org.jruby.joni:joni` from 2.1.45 to 2.1.48 +- Bump `snakeyaml` from 1.33 to 2.0 ([#6511](https://github.com/opensearch-project/OpenSearch/pull/6511)) ### Changed - [CCR] Add getHistoryOperationsFromTranslog method to fetch the history snapshot from translogs ([#3948](https://github.com/opensearch-project/OpenSearch/pull/3948)) diff --git a/buildSrc/version.properties b/buildSrc/version.properties index 98e62437e3bbd..b2dbbabaa0330 100644 --- a/buildSrc/version.properties +++ b/buildSrc/version.properties @@ -10,7 +10,7 @@ spatial4j = 0.7 jts = 1.15.0 jackson = 2.14.2 jackson_databind = 2.14.2 -snakeyaml = 1.33 +snakeyaml = 2.0 icu4j = 70.1 supercsv = 2.4.0 # Update to 2.17.2+ is breaking OpenSearchJsonLayout (see https://issues.apache.org/jira/browse/LOG4J2-3562) diff --git a/libs/x-content/licenses/snakeyaml-1.33.jar.sha1 b/libs/x-content/licenses/snakeyaml-1.33.jar.sha1 deleted file mode 100644 index c8a323290e7ba..0000000000000 --- a/libs/x-content/licenses/snakeyaml-1.33.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -2cd0a87ff7df953f810c344bdf2fe3340b954c69 \ No newline at end of file diff --git a/libs/x-content/licenses/snakeyaml-2.0.jar.sha1 b/libs/x-content/licenses/snakeyaml-2.0.jar.sha1 new file mode 100644 index 0000000000000..d09dea5564729 --- /dev/null +++ b/libs/x-content/licenses/snakeyaml-2.0.jar.sha1 @@ -0,0 +1 @@ +3aab2116756442bf0d4cd1c089b24d34c3baa253 \ No newline at end of file diff --git a/server/src/main/java/org/opensearch/extensions/ExtensionsManager.java b/server/src/main/java/org/opensearch/extensions/ExtensionsManager.java index 323e0c7acd715..dd73797a0bc59 100644 --- a/server/src/main/java/org/opensearch/extensions/ExtensionsManager.java +++ b/server/src/main/java/org/opensearch/extensions/ExtensionsManager.java @@ -67,7 +67,6 @@ import org.opensearch.transport.TransportService; import org.yaml.snakeyaml.Yaml; import org.opensearch.env.EnvironmentSettingsResponse; -import org.yaml.snakeyaml.constructor.SafeConstructor; /** * The main class for managing Extension communication with the OpenSearch Node. @@ -558,7 +557,7 @@ public String executor() { } private ExtensionsSettings readFromExtensionsYml(Path filePath) throws IOException { - Yaml yaml = new Yaml(new SafeConstructor()); + Yaml yaml = new Yaml(); try (InputStream inputStream = Files.newInputStream(filePath)) { Map obj = yaml.load(inputStream); if (obj == null) { From 88d2cd83e5a914b08e6132807a820c2886ebc73e Mon Sep 17 00:00:00 2001 From: owaiskazi19 Date: Tue, 28 Feb 2023 22:58:17 +0000 Subject: [PATCH 2/2] Moved changelog under 2.x Signed-off-by: owaiskazi19 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 670f7a43c35eb..184fa6f125f5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Bump `joni` from 2.1.44 to 2.1.45 - Bump `commons-io:commons-io` from 2.7 to 2.11.0 - Bump `org.jruby.joni:joni` from 2.1.45 to 2.1.48 -- Bump `snakeyaml` from 1.33 to 2.0 ([#6511](https://github.com/opensearch-project/OpenSearch/pull/6511)) ### Changed - [CCR] Add getHistoryOperationsFromTranslog method to fetch the history snapshot from translogs ([#3948](https://github.com/opensearch-project/OpenSearch/pull/3948)) @@ -77,6 +76,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Dependencies - Bump `org.apache.logging.log4j:log4j-core` from 2.18.0 to 2.20.0 ([#6490](https://github.com/opensearch-project/OpenSearch/pull/6490)) - Bump `com.azure:azure-storage-common` from 12.19.3 to 12.20.0 ([#6492](https://github.com/opensearch-project/OpenSearch/pull/6492) +- Bump `snakeyaml` from 1.33 to 2.0 ([#6511](https://github.com/opensearch-project/OpenSearch/pull/6511)) ### Changed - Require MediaType in Strings.toString API ([#6009](https://github.com/opensearch-project/OpenSearch/pull/6009))