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

[Console] Status for RFS Backfill #771

Merged

Conversation

mikaylathompson
Copy link
Collaborator

@mikaylathompson mikaylathompson commented Jun 26, 2024

Description

Add status output for backfill if the backfill type is RFS running on ECS.

console backfill status will print:

  • status (e.g. BackfillStatus.RUNNING, BackfillStatus.STOPPED, etc.)
  • number of running instances
  • number of pending instances
  • number of desired instances

Additionally, if --deep-check is added to the command, it will query the .migrations_working_state index on the target cluster and check how many shards are remaining.

root@ip-12-0-3-146:~# console backfill status
BackfillStatus.STOPPED
Running=0
Pending=0
Desired=15
root@ip-12-0-3-146:~# console backfill status --deep-check
BackfillStatus.RUNNING
Running=12
Pending=3
Desired=15
Remaining shards: 11
root@ip-12-0-3-146:~# console backfill status --deep-check
BackfillStatus.RUNNING
Running=15
Pending=0
Desired=15
Remaining shards: 0

Issues Resolved

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

Testing

Unit tests added, plus manual testing on ECS

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.

Signed-off-by: Mikayla Thompson <thomika@amazon.com>
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 86.56716% with 9 lines in your changes missing coverage. Please review.

Project coverage is 87.56%. Comparing base (a978c0a) to head (b1a89de).
Report is 1 commits behind head on main.

Files Patch % Lines
...b/console_link/console_link/models/backfill_rfs.py 83.87% 5 Missing ⚠️
...ib/console_link/console_link/models/ecs_service.py 82.35% 3 Missing ⚠️
...le/lib/console_link/console_link/logic/backfill.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##               main     #771       +/-   ##
=============================================
+ Coverage     68.51%   87.56%   +19.05%     
=============================================
  Files           275       50      -225     
  Lines         11596     3242     -8354     
  Branches        735        0      -735     
=============================================
- Hits           7945     2839     -5106     
+ Misses         3248      403     -2845     
+ Partials        403        0      -403     
Flag Coverage Δ
gradle-test ?
python-test 87.56% <86.56%> (+0.19%) ⬆️

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.

if exitcode != ExitCode.SUCCESS:
raise click.ClickException(message)
click.echo(message)
if len(message) == 2:
Copy link
Member

Choose a reason for hiding this comment

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

nit: For consistency, can we just have the message be a single string with '\n'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yup, this was ugly, I like that better.

Signed-off-by: Mikayla Thompson <thomika@amazon.com>
Signed-off-by: Mikayla Thompson <thomika@amazon.com>
Signed-off-by: Mikayla Thompson <thomika@amazon.com>
@mikaylathompson mikaylathompson merged commit d2118be into opensearch-project:main Jun 26, 2024
13 checks passed
@mikaylathompson mikaylathompson deleted the console-lib-rfs-status branch June 26, 2024 15:42
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.

2 participants