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

[index configuration tool] Change to parsing Data Prepper pipeline YAML as input #215

Merged
merged 3 commits into from
Jun 27, 2023

Conversation

kartg
Copy link
Member

@kartg kartg commented Jun 23, 2023

Description

This change consists of 3 commits:

  • The first one simply removes the use of Lark and Logstash-specific files.
  • The second commit updates the logic in index_configuration_tool to now accept a Data Prepper pipeline YAML file as input.
  • The third commit is a minor change that adds utility logic to test_constants.py to enable updating of the stored pickle output file if/when the test pipeline YAML file is updated. This code is commented out since it will only be triggered manually.

Issues Resolved

resolves #164

Testing

All unit tests pass.

$ python -m coverage run -m unittest
.....................
----------------------------------------------------------------------
Ran 21 tests in 0.028s

OK

$ python -m coverage report --omit "*/tests/*"
Name                  Stmts   Miss  Cover
-----------------------------------------
index_operations.py      29      2    93%
main.py                  79      0   100%
utils.py                 13      0   100%
-----------------------------------------
TOTAL                   121      2    98%

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: Kartik Ganesh <[email protected]>
…ML as input

This change removes support for Logstash input files and the use of the Lark library. Instead, index_configuration_tool now accepts a Data Prepper pipeline YAML file as input.

Signed-off-by: Kartik Ganesh <[email protected]>
@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Merging #215 (4e6d990) into main (5b13c59) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #215   +/-   ##
=======================================
  Coverage   91.51%   91.51%           
=======================================
  Files          25       25           
  Lines        1155     1155           
  Branches      122      122           
=======================================
  Hits         1057     1057           
  Misses         83       83           
  Partials       15       15           

This allows easy updating of the stored pickle output file if/when the test pipeline YAML file is updated. This code is commented out for now since it will only be triggered manually.

Signed-off-by: Kartik Ganesh <[email protected]>
index_configuration_tool/main.py Show resolved Hide resolved
index_configuration_tool/main.py Show resolved Hide resolved
@kartg kartg merged commit 3427af3 into opensearch-project:main Jun 27, 2023
@kartg kartg deleted the ict-data-prepper-yaml branch June 27, 2023 21:06
gregschohn added a commit to gregschohn/opensearch-migrations that referenced this pull request Jun 28, 2023
* main: (57 commits)
  [Index configuration tool] Add support for insecure HTTPS endpoint (opensearch-project#218)
  Refactor inner classes from ExpiringTrafficStreamMap into separate classes. One other refactorings to simplify data encapsulation between the main map itself and each ExpiringKeyQueue.
  Move ExpiringTrafficStreamMap file to a new package to accommodate refactoring in the next commit.
  Make getOrCreateNodeMap() less pessimistic and add a TODO for work that needs to be done to remove (or at least describe) an obscure and rare race condition.
  [index configuration tool] Change to parsing Data Prepper pipeline YAML as input (opensearch-project#215)
  changing argument and variable names + updating description
  run on any .py changes within the top cluster_migration_core directory
  run lint on all .py changes
  Removing accidentally included kafka.properties file
  Migrations-1150 - Enhance Setting Kafka Properties for Kafka Puller
  Disabling python related workflows for non-python directories
  Using wildcards to add coverage report files instead of adding individual files
  removing finalized
  renaming workflow + no longer double executing tests
  Introduce Copilot Deployments (opensearch-project#201)
  Wildcard isn't supported - add each cov file manually
  run gradle build instead of assemble
  Update codecov version
  Add github workflow
  Bump aws-cdk-lib in /deployment/cdk/opensearch-service-migration (opensearch-project#206)
  ...

Signed-off-by: Greg Schohn <[email protected]>

# Conflicts:
#	TrafficCapture/trafficReplayer/src/main/java/org/opensearch/migrations/replay/Accumulation.java
#	TrafficCapture/trafficReplayer/src/main/java/org/opensearch/migrations/replay/ExpiringTrafficStreamMap.java
#	TrafficCapture/trafficReplayer/src/main/java/org/opensearch/migrations/replay/CapturedTrafficToHttpTransactionAccumulator
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.

[Historical Data Migration] Data Prepper support in index_configuration_tool
2 participants