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

Dashboards sanitizer #930

Merged
merged 10 commits into from
Sep 10, 2024
Merged

Dashboards sanitizer #930

merged 10 commits into from
Sep 10, 2024

Conversation

gyalai-aws
Copy link
Contributor

Description

[Describe what this change achieves]
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.

  • Category (New feature)
  • Why these changes are required?
    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.
  • What is the old behavior before changes and new behavior after changes?

Issues Resolved

[List any issues this PR will resolve]

Is this a backport? If so, please add backport PR # and/or commits #

Testing

  • Unit testing
  • Manually tested the kibana objects extracted from V8 hrough 7.11

Check List

  • New functionality includes testing
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented
  • 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.

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 73.78049% with 129 lines in your changes missing coverage. Please review.

Project coverage is 78.66%. Comparing base (3396fce) to head (c54a780).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...opensearch/migrations/dashboards/SanitizerCli.java 0.00% 36 Missing ⚠️
...tions/dashboards/converter/DashboardConverter.java 79.38% 20 Missing and 7 partials ⚠️
...igrations/dashboards/savedobjects/SavedObject.java 77.58% 10 Missing and 3 partials ⚠️
...rg/opensearch/migrations/dashboards/Sanitizer.java 79.66% 10 Missing and 2 partials ⚠️
...ons/dashboards/converter/SavedObjectConverter.java 80.35% 8 Missing and 3 partials ⚠️
...s/dashboards/converter/VisualizationConverter.java 76.92% 6 Missing and 3 partials ⚠️
...ons/dashboards/savedobjects/SavedObjectParser.java 57.14% 6 Missing and 3 partials ⚠️
.../migrations/dashboards/savedobjects/Dashboard.java 80.00% 4 Missing and 2 partials ⚠️
.../migrations/dashboards/savedobjects/Reference.java 60.00% 4 Missing ⚠️
.../migrations/dashboards/converter/UrlConverter.java 90.00% 0 Missing and 1 partial ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #930      +/-   ##
============================================
- Coverage     78.83%   78.66%   -0.17%     
- Complexity     2430     2515      +85     
============================================
  Files           372      386      +14     
  Lines         14489    14981     +492     
  Branches        875      920      +45     
============================================
+ Hits          11422    11785     +363     
- Misses         2531     2636     +105     
- Partials        536      560      +24     
Flag Coverage Δ
gradle-test 75.19% <73.78%> (-0.07%) ⬇️
python-test 88.63% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@peternied peternied self-assigned this Sep 6, 2024
Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

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

Thanks for iterating on this change great to see test cases included, I've got a couple of outstanding questions.

dashboardsSanitizer/build.gradle Outdated Show resolved Hide resolved
dashboardsSanitizer/build.gradle Outdated Show resolved Hide resolved
dashboardsSanitizer/README.md Show resolved Hide resolved
Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

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

@gyalai-aws Thanks for the updates, it looks like there are some pull request checks that are failing, one for style check and another for compilation error. Please address these.

I've created a pull request [1] to make an update to the readme, please merge this into your branch as it has our messaging and guidance for experimental tools - congratulations on being the first.

Once the CI issue and readme updates have been completed, this can can be merged. Thanks!

@peternied peternied changed the title Dashboards sanitizer v2 Dashboards sanitizer Sep 10, 2024
@peternied peternied mentioned this pull request Sep 10, 2024
4 tasks
@peternied peternied merged commit 82d5748 into opensearch-project:main Sep 10, 2024
14 of 15 checks passed
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.

3 participants