-
Notifications
You must be signed in to change notification settings - Fork 27
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
Dashboards sanitizer #910
Dashboards sanitizer #910
Conversation
Signed-off-by: Arun Lakshmanan <[email protected]>
Signed-off-by: Arun Lakshmanan <[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.
Wow! You made my weekend @arunx2, thanks for putting hard work into this! Really great to see this, I'll unblock the CI for you, can you see about getting all the checks to come back passing while you work on some of the changes?
* @throws JsonProcessingException | ||
* @throws IOException | ||
*/ | ||
public void makeCompatibleToOS() throws JsonProcessingException, IOException { |
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.
Lets move this into the transformation project, in that project can you:
- You'll need to add a new entity called Document.
- Create a new transformation rule called something like
OSComptaibleDashboardObject
- Make that class implementing
TransformationRule<Document>
with the functionality you've got in Dashboard.java
Please feel free to take inspiration from the existing transformation
transformation/src/main/java/org/opensearch/migrations/transformation/rules/IndexMappingTypeRemoval.java
package org.opensearch.migrations.dashboards; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
class SanitizerTest { |
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.
Lets add some test cases to covers the key scenarios for objects that are compatible and transformed along with a couple of cases where they cannot be transformed.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #910 +/- ##
=============================================
- Coverage 88.63% 73.64% -15.00%
- Complexity 0 1958 +1958
=============================================
Files 68 349 +281
Lines 3809 13703 +9894
Branches 0 799 +799
=============================================
+ Hits 3376 10091 +6715
- Misses 433 3125 +2692
- Partials 0 487 +487
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Description
This tool helps to migrate Kibana objects to OpenSearch dashboards object by fixing the versions for compatible objects and removing the object that are incompatible with OpenSearch Dashboards.
The Kibana object that are created after the fork are not compatible with OpenSearch Dashboards. To avoid recreating all the dashboards, this tool helps to fix the compatible objects.
Issues Resolved
[List any issues this PR will resolve]
Is this a backport? If so, please add backport PR # and/or commits #
Testing
Manually tested the kibana objects extracted from V7.11 through 7.17, Not tested with objects in V8.x
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.