opensearch-project / opensearch-migrations

Migrate, upgrade, compare, and replicate OpenSearch clusters with ease.
https://aws.amazon.com/solutions/implementations/migration-assistant-for-amazon-opensearch-service/
Apache License 2.0
39 stars 28 forks source link

Cluster tools #1124

Closed AndreKurait closed 1 week ago

AndreKurait commented 2 weeks ago

Description

Creates library cluster_tools for an easy to extend library of tools around opensearch business logic for migrations.

Ships with tools: create_index, change_shards, enable/disable_compatibility_mode

Was getting some codecov failures, added retry akin to security repo

Issues Resolved

https://opensearch.atlassian.net/browse/MIGRATIONS-2201

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

Testing

Unit testing and some manual testing

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.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 86.50000% with 27 lines in your changes missing coverage. Please review.

Project coverage is 80.63%. Comparing base (48da9ce) to head (be19bc3). Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
...onConsole/cluster_tools/src/cluster_tools/utils.py 61.76% 13 Missing :warning:
...ionConsole/cluster_tools/src/cluster_tools/main.py 82.60% 12 Missing :warning:
...onConsole/cluster_tools/src/tools/change_shards.py 96.22% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1124 +/- ## ============================================ + Coverage 80.51% 80.63% +0.12% - Complexity 2871 2910 +39 ============================================ Files 393 399 +6 Lines 14554 14829 +275 Branches 1000 1007 +7 ============================================ + Hits 11718 11958 +240 - Misses 2229 2260 +31 - Partials 607 611 +4 ``` | [Flag](https://app.codecov.io/gh/opensearch-project/opensearch-migrations/pull/1124/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | Coverage Δ | | |---|---|---| | [gradle-test](https://app.codecov.io/gh/opensearch-project/opensearch-migrations/pull/1124/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | `78.66% <ø> (+0.06%)` | :arrow_up: | | [python-test](https://app.codecov.io/gh/opensearch-project/opensearch-migrations/pull/1124/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | `89.75% <86.50%> (-0.59%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.