-
Notifications
You must be signed in to change notification settings - Fork 286
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
[Maintenance-2930] Review use of JSON Flattener #3674
[Maintenance-2930] Review use of JSON Flattener #3674
Conversation
Signed-off-by: Prabhas Kurapati <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @prabhask5, thank you for the fix.
Could you please:
- add a Unit test for the
JsonFlattener
class - the library and all it dependencies needs to be excluded as well form
build.gradle
- fix all java compiler warnings, this is the reason why build did not pass
@willyborankin I'm getting a type safety warning that's causing the java builds to fail. I could not find a way to fix it while still using a generic cast, so I'm manually suppressing it as a temp fix. Please let me know if you know any better fix. Thanks! |
Signed-off-by: Prabhas Kurapati <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3674 +/- ##
=========================================
+ Coverage 0 64.91% +64.91%
=========================================
Files 0 293 +293
Lines 0 20796 +20796
Branches 0 3411 +3411
=========================================
+ Hits 0 13500 +13500
- Misses 0 5606 +5606
- Partials 0 1690 +1690
|
Signed-off-by: Prabhas Kurapati <[email protected]>
src/test/java/org/opensearch/security/support/JsonFlattenerTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opensearch/security/support/JsonFlattenerTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Prabhas Kurapati <[email protected]>
@willyborankin @DarshitChanpura I added more complex tests- lmk if I should write some for the helper functions. Ty! |
Signed-off-by: Prabhas Kurapati <[email protected]>
### Description Implement JsonFlattener helper class as written in #2926 to deprecate the use of the unnecessary JsonFlattener third party module. * Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation) Maintenance * Why these changes are required? The JsonFlattener module was being utilized in only one place for one specific purpose, so these functions can be implemented as part of the OpenSearch codebase instead of importing an unnecessary third party module. * What is the old behavior before changes and new behavior after changes? Hopefully nothing. ### Issues Resolved - #2930 Is this a backport? If so, please add backport PR # and/or commits # No ### Testing Tests checked to make sure functions are not broken. ### Check List - [x] New functionality includes testing - [x] New functionality has been documented - [x] 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Prabhas Kurapati <[email protected]> (cherry picked from commit 87de7e2) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Backport 87de7e2 from #3674. --------- Signed-off-by: Prabhas Kurapati <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Darshit Chanpura <[email protected]>
) ### Description Implement JsonFlattener helper class as written in opensearch-project#2926 to deprecate the use of the unnecessary JsonFlattener third party module. * Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation) Maintenance * Why these changes are required? The JsonFlattener module was being utilized in only one place for one specific purpose, so these functions can be implemented as part of the OpenSearch codebase instead of importing an unnecessary third party module. * What is the old behavior before changes and new behavior after changes? Hopefully nothing. ### Issues Resolved - opensearch-project#2930 Is this a backport? If so, please add backport PR # and/or commits # No ### Testing Tests checked to make sure functions are not broken. ### Check List - [x] New functionality includes testing - [x] New functionality has been documented - [x] 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Prabhas Kurapati <[email protected]>
Description
Implement JsonFlattener helper class as written in #2926 to deprecate the use of the unnecessary JsonFlattener third party module.
Maintenance
The JsonFlattener module was being utilized in only one place for one specific purpose, so these functions can be implemented as part of the OpenSearch codebase instead of importing an unnecessary third party module.
Hopefully nothing.
Issues Resolved
Is this a backport? If so, please add backport PR # and/or commits #
No
Testing
Tests checked to make sure functions are not broken.
Check List
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.