-
Notifications
You must be signed in to change notification settings - Fork 30
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
[Fetch Migration] Monitoring script for Data Prepper #264
[Fetch Migration] Monitoring script for Data Prepper #264
Conversation
Codecov Report
@@ Coverage Diff @@
## main #264 +/- ##
=========================================
Coverage 62.14% 62.14%
Complexity 619 619
=========================================
Files 82 82
Lines 3141 3141
Branches 292 292
=========================================
Hits 1952 1952
Misses 1013 1013
Partials 176 176
Flags with carried forward coverage won't be shown. Click here to find out more. |
39de240
to
92c8ce7
Compare
e58442a
to
a35e6d9
Compare
EDIT: Resolved after rebase on 8/21 |
a35e6d9
to
6928d2c
Compare
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.
Biggest issue is around error handling -- if any of the api calls fail, even transiently, the entire thing will crash.
prev_no_partitions_count = 0 | ||
terminal = False | ||
target_doc_count = int(args.target_count) | ||
while not terminal: |
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.
How high is the risk that a doc fails to be written for whatever reason, and we're stuck here forever because doc_count is never >= target? Should we also have a timeout value that if doc_count doesn't change for X seconds/minutes, we give up?
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.
I think that's a good callout. I'll capture this as a follow up item in JIRA - https://opensearch.atlassian.net/browse/MIGRATIONS-1303
6928d2c
to
e4a5a9f
Compare
This change adds a monitor.py Python script that can monitor the running Data Prepper pipeline and shut it down once the target document count has been reached (as reported by Data Prepper's documentsSuccess Prometheus metric) and an idle pipeline is detected. Signed-off-by: Kartik Ganesh <[email protected]>
e4a5a9f
to
31ea718
Compare
Signed-off-by: Kartik Ganesh <[email protected]>
dc480fa
to
361edef
Compare
* main: [Fetch Migration] Monitoring script for Data Prepper (opensearch-project#264) Refactor secrets cache to sdk client (opensearch-project#278) Update humanReadableLogs script Update primary->source and shadow->target and documentation Add shadowRequest and connectionId to tuple Update tests for CRLF Use CRLF in NettyJsonToByteBufHandler Signed-off-by: Greg Schohn <[email protected]> # Conflicts: # TrafficCapture/trafficCaptureProxyServer/src/test/java/org/opensearch/migrations/trafficcapture/proxyserver/netty/ExpiringSubstitutableItemPoolTest.java # TrafficCapture/trafficReplayer/build.gradle # TrafficCapture/trafficReplayer/src/main/java/org/opensearch/migrations/replay/SourceTargetCaptureTuple.java # TrafficCapture/trafficReplayer/src/main/java/org/opensearch/migrations/replay/TrafficReplayer.java
Description
This change adds a
monitor.py
Python script that can monitor the running Data Prepper pipeline and shut it down once the target document count has been reached (as reported by Data Prepper'sdocumentsSuccess
Prometheus metric) and an idle pipeline is detected.Testing
Unit Tests
Integration Test
/shutdown
endpoint once the target doc count was reachedLimitations
_cat/indices
count of the target cluster. Handling this scenario is tracked in JIRA task MIGRATIONS-1228Check 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.