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

Snapshot status #757

Merged
merged 8 commits into from
Jun 25, 2024
Merged

Conversation

AndreKurait
Copy link
Member

@AndreKurait AndreKurait commented Jun 21, 2024

Description

Implements several changes for performance and usability:

  • Implements Snapshot Status
  • Adds Snapshot Max Throughput parameter to Create
  • Makes Snapshot Create Asynchronous with --wait option
  • Modifies RFS to support ES 7.17
  • Changes the RFS ECS Worker to use the right document migration main class
  • Adds Bash-Completion to migration console with support for console-link library
  • Fixes RFS logging pattern in Cloudwatch

  • Category: New Features
  • Why these changes are required? Usability improvements for RFS and Migration Console
  • What is the old behavior before changes and new behavior after changes?

Issues Resolved

MIGRATIONS-1792

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

Testing

Lots of manual testing locally and in the cloud

Follow up for more documentation and E2E cloud testing https://opensearch.atlassian.net/browse/MIGRATIONS-1808

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 Jun 21, 2024

Codecov Report

Attention: Patch coverage is 70.58824% with 45 lines in your changes missing coverage. Please review.

Project coverage is 88.13%. Comparing base (73f2092) to head (32b0d9f).
Report is 3 commits behind head on main.

Files Patch % Lines
...e/lib/console_link/console_link/models/snapshot.py 73.27% 31 Missing ⚠️
...rationConsole/lib/console_link/console_link/cli.py 61.53% 10 Missing ⚠️
...le/lib/console_link/console_link/logic/snapshot.py 50.00% 4 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##               main     #757       +/-   ##
=============================================
+ Coverage     68.50%   88.13%   +19.63%     
=============================================
  Files           270       48      -222     
  Lines         11175     3059     -8116     
  Branches        736        0      -736     
=============================================
- Hits           7655     2696     -4959     
+ Misses         3118      363     -2755     
+ Partials        402        0      -402     
Flag Coverage Δ
gradle-test ?
python-test 88.13% <70.58%> (-0.75%) ⬇️

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.

@AndreKurait AndreKurait force-pushed the SnapshotStatus branch 6 times, most recently from bdff322 to f268d4c Compare June 25, 2024 02:19
@AndreKurait AndreKurait marked this pull request as ready for review June 25, 2024 15:03
Copy link
Collaborator

@mikaylathompson mikaylathompson left a comment

Choose a reason for hiding this comment

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

Looks good! A couple questions, but no blockers.

@@ -72,40 +70,10 @@ public Path unpack() {
}
}

@Override
public void close() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we care about these things not getting cleaned up?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, we want to recycle tasks between shards with ECS. When this was in there, we were deleting the shard date before we reindexed it

IN_PROGRESS = "IN_PROGRESS"


def convert_snapshot_state_to_status(snapshot_state: str) -> Tuple[SnapshotStatus, str]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure I understand why we should have State & Status and what the difference is. Should we just use these States throughout?

Copy link
Member Author

Choose a reason for hiding this comment

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

State is the cluster response enum whereas Status is what we define. I had originally defined it when we were also storing status in a separate doc.

This helps us maintain a consistent Status despite state renaming across ES/OS versions

Copy link
Member

Choose a reason for hiding this comment

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

This doesn't feel right, we are embedding version handling deep in the console. I understand getting this in position for the demo, but this blends the responsibilities of the system quite a bit - it is going to make our codebase hard to maintain very quickly.

@AndreKurait What do you think of this, how should we capture the responsibility questions?

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved this to just return the state string that the cluster responds with

# Add sourcing of the completion script to .bashrc for persistence across sessions
echo '. /etc/bash_completion' >> ~/.bashrc

echo "Bash completion for console command has been set up and enabled."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for adding this!

@AndreKurait AndreKurait force-pushed the SnapshotStatus branch 3 times, most recently from e7597ba to 3351c06 Compare June 25, 2024 15:55
Signed-off-by: Andre Kurait <[email protected]>

Add Snapshot Status updates

Signed-off-by: Andre Kurait <[email protected]>

Snapshot improvements

Signed-off-by: Andre Kurait <[email protected]>

Use new Rfs Document Migration Main

Signed-off-by: Andre Kurait <[email protected]>

Fix create snapshot

Signed-off-by: Andre Kurait <[email protected]>

Updates

Signed-off-by: Andre Kurait <[email protected]>

Improvements

Signed-off-by: Andre Kurait <[email protected]>

Improve RFS log4j2.xml

Signed-off-by: Andre Kurait <[email protected]>

revert documentReindexer

Signed-off-by: Andre Kurait <[email protected]>

add logging for documentReindexer

Signed-off-by: Andre Kurait <[email protected]>

remove logging

Signed-off-by: Andre Kurait <[email protected]>

Update printing based on feedback

Signed-off-by: Andre Kurait <[email protected]>
Signed-off-by: Andre Kurait <[email protected]>
Signed-off-by: Andre Kurait <[email protected]>
Signed-off-by: Andre Kurait <[email protected]>
@AndreKurait AndreKurait force-pushed the SnapshotStatus branch 5 times, most recently from af22643 to 2c3058b Compare June 25, 2024 16:30
Signed-off-by: Andre Kurait <[email protected]>
IN_PROGRESS = "IN_PROGRESS"


def convert_snapshot_state_to_status(snapshot_state: str) -> Tuple[SnapshotStatus, str]:
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't feel right, we are embedding version handling deep in the console. I understand getting this in position for the demo, but this blends the responsibilities of the system quite a bit - it is going to make our codebase hard to maintain very quickly.

@AndreKurait What do you think of this, how should we capture the responsibility questions?

Signed-off-by: Andre Kurait <[email protected]>
@AndreKurait AndreKurait force-pushed the SnapshotStatus branch 4 times, most recently from ae734ee to 57016fc Compare June 25, 2024 17:57
Signed-off-by: Andre Kurait <[email protected]>
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 the updates @AndreKurait

@AndreKurait AndreKurait merged commit b62d0a3 into opensearch-project:main Jun 25, 2024
13 checks passed
@AndreKurait AndreKurait deleted the SnapshotStatus branch June 25, 2024 18:29
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