Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade mockito and byte-buddy version to align with opensearch core and Fix BWC test case failure #644

Merged
merged 4 commits into from
Mar 30, 2023

Conversation

Hailong-am
Copy link
Collaborator

@Hailong-am Hailong-am commented Mar 21, 2023

Description

  1. upgrade mockito and byte-buddy version to align with opensearch core
    Bump Mockito to 5.2.0 and ByteBuddy to 1.14.2 OpenSearch#6678

  2. To fix the BWC test case failure, we upgraded the BWC OpenSearch version to 2.7.0. The reason for this upgrade is that OpenSearch 3.0.0 will only be compatible with the latest version of 2.x, which for the time being is 2.7.0. Once we have a newer version, such as 2.8.0, we will need to upgrade to that version.

  3. Enable debug log for security run with docker

Issues Resolved

#643, #641

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@Hailong-am Hailong-am requested a review from a team March 21, 2023 08:22
@zhichao-aws
Copy link
Member

There are still two lines in notifications/core/build.gradle are hard coded
force "joda-time:joda-time:2.8.1" // Resolve for amazonaws
force "junit:junit:4.13.2"
Besides, notifications/build.gradle define variable "junit_version", and notifications/notifications/build.gradle use it to define version for org.junit.jupiter package. But in notifications/core/build.gradle, package org.junit.jupiter version are still hard-coded.
Maybe we can fix them if core versions are applicable.

@Hailong-am Hailong-am changed the title upgrade mockito and byte-buddy version to align with opensearch core upgrade mockito and byte-buddy version to align with opensearch core and Fix BWC test case failure Mar 30, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 30, 2023

Codecov Report

Merging #644 (af734c9) into main (5660e31) will increase coverage by 0.34%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main     #644      +/-   ##
============================================
+ Coverage     61.36%   61.70%   +0.34%     
  Complexity      112      112              
============================================
  Files            73       73              
  Lines          2472     2494      +22     
  Branches        265      265              
============================================
+ Hits           1517     1539      +22     
  Misses          778      778              
  Partials        177      177              
Flag Coverage Δ
opensearch-notifications 61.70% <ø> (+0.34%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...earch/notifications/core/NotificationCorePlugin.kt 84.61% <ø> (ø)
...org/opensearch/notifications/core/utils/Helpers.kt 100.00% <ø> (ø)
...org/opensearch/notifications/NotificationPlugin.kt 97.43% <ø> (ø)
...fications/action/CreateNotificationConfigAction.kt 81.81% <ø> (ø)
...fications/action/DeleteNotificationConfigAction.kt 81.81% <ø> (ø)
...earch/notifications/action/GetChannelListAction.kt 81.81% <ø> (ø)
...otifications/action/GetNotificationConfigAction.kt 81.81% <ø> (ø)
...ch/notifications/action/GetPluginFeaturesAction.kt 84.61% <ø> (ø)
.../notifications/action/PublishNotificationAction.kt 72.72% <ø> (ø)
...rch/notifications/action/SendNotificationAction.kt 81.81% <ø> (ø)
... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Hailong-am
Copy link
Collaborator Author

security test case failure due to docker could start, the cause for docker start failures is OpenSearch could not load PerformanceAnalyzerPlugin
java.lang.IllegalStateException: failed to load plugin class [org.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin]

Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:485) ~[?:?]
at java.security.AccessController.checkPermission(AccessController.java:1068) ~[?:?]
at java.lang.SecurityManager.checkPermission(SecurityManager.java:411) ~[?:?]
at java.lang.ClassLoader.checkClassLoaderPermission(ClassLoader.java:2070) ~[?:?]
at java.lang.ClassLoader.getParent(ClassLoader.java:1817) ~[?:?]
at org.opensearch.performanceanalyzer.collectors.AdmissionControlMetricsCollector.canLoadAdmissionControllerClasses(AdmissionControlMetricsCollector.java:179) ~[?:?]
at org.opensearch.performanceanalyzer.collectors.AdmissionControlMetricsCollector.(AdmissionControlMetricsCollector.java:50) ~[?:?]
at org.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin.(PerformanceAnalyzerPlugin.java:230) ~[?:?]
at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67) ~[?:?]
at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:484) ~[?:?]
at org.opensearch.plugins.PluginsService.loadPlugin(PluginsService.java:782) ~[opensearch-3.0.0.jar:3.0.0]
at org.opensearch.plugins.PluginsService.loadBundle(PluginsService.java:731) ~[opensearch-3.0.0.jar:3.0.0]
at org.opensearch.plugins.PluginsService.loadBundles(PluginsService.java:533) ~[opensearch-3.0.0.jar:3.0.0]
at org.opensearch.plugins.PluginsService.(PluginsService.java:195) ~[opensearch-3.0.0.jar:3.0.0]
at org.opensearch.node.Node.(Node.java:435) ~[opensearch-3.0.0.jar:3.0.0]
at org.opensearch.node.Node.(Node.java:362) ~[opensearch-3.0.0.jar:3.0.0]
at org.opensearch.bootstrap.Bootstrap$5.(Bootstrap.java:242) ~[opensearch-3.0.0.jar:3.0.0]
at org.opensearch.bootstrap.Bootstrap.setup(Bootstrap.java:242) ~[opensearch-3.0.0.jar:3.0.0]
at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:404) ~[opensearch-3.0.0.jar:3.0.0]
at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:180) ~[opensearch-3.0.0.jar:3.0.0]

@Hailong-am Hailong-am requested a review from lezzago March 30, 2023 03:21
Signed-off-by: Hailong Cui <[email protected]>
Copy link
Collaborator

@gaobinlong gaobinlong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@zhichao-aws zhichao-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Hailong-am Hailong-am merged commit 464fdb2 into opensearch-project:main Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants