-
Notifications
You must be signed in to change notification settings - Fork 37
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
Adds Create Ingest Pipeline Step #44
Conversation
Signed-off-by: Joshua Palis <jpalis@amazon.com>
…ments Signed-off-by: Joshua Palis <jpalis@amazon.com>
Signed-off-by: Joshua Palis <jpalis@amazon.com>
…rather than from content Signed-off-by: Joshua Palis <jpalis@amazon.com>
Signed-off-by: Joshua Palis <jpalis@amazon.com>
Signed-off-by: Joshua Palis <jpalis@amazon.com>
…avadoc error Signed-off-by: Joshua Palis <jpalis@amazon.com>
Codecov Report
@@ Coverage Diff @@
## main #44 +/- ##
============================================
+ Coverage 68.33% 73.87% +5.54%
- Complexity 48 65 +17
============================================
Files 7 8 +1
Lines 180 245 +65
Branches 18 22 +4
============================================
+ Hits 123 181 +58
- Misses 48 54 +6
- Partials 9 10 +1
|
Signed-off-by: Joshua Palis <jpalis@amazon.com>
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.
Initial review. Looks good so far!
src/main/java/org/opensearch/flowframework/workflow/CreateIngestPipelineStep.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/CreateIngestPipelineStep.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/CreateIngestPipelineStep.java
Outdated
Show resolved
Hide resolved
…kflow data for required fields Signed-off-by: Joshua Palis <jpalis@amazon.com>
Signed-off-by: Joshua Palis <jpalis@amazon.com>
Signed-off-by: Joshua Palis <jpalis@amazon.com>
…st body generator Signed-off-by: Joshua Palis <jpalis@amazon.com>
Signed-off-by: Joshua Palis <jpalis@amazon.com>
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.
Some similar comments to #38
src/main/java/org/opensearch/flowframework/workflow/CreateIngestPipelineStep.java
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/CreateIngestPipelineStep.java
Show resolved
Hide resolved
...rg/opensearch/flowframework/workflow/CreateIngestPipeline/CreateIngestPipelineStepTests.java
Outdated
Show resolved
Hide resolved
...rg/opensearch/flowframework/workflow/CreateIngestPipeline/CreateIngestPipelineStepTests.java
Outdated
Show resolved
Hide resolved
...rg/opensearch/flowframework/workflow/CreateIngestPipeline/CreateIngestPipelineStepTests.java
Outdated
Show resolved
Hide resolved
...rg/opensearch/flowframework/workflow/CreateIngestPipeline/CreateIngestPipelineStepTests.java
Outdated
Show resolved
Hide resolved
...rg/opensearch/flowframework/workflow/CreateIngestPipeline/CreateIngestPipelineStepTests.java
Outdated
Show resolved
Hide resolved
...rg/opensearch/flowframework/workflow/CreateIngestPipeline/CreateIngestPipelineStepTests.java
Outdated
Show resolved
Hide resolved
...rg/opensearch/flowframework/workflow/CreateIngestPipeline/CreateIngestPipelineStepTests.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Joshua Palis <jpalis@amazon.com>
Signed-off-by: Joshua Palis <jpalis@amazon.com>
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.
Overall LGTM with few comments.
src/main/java/org/opensearch/flowframework/workflow/CreateIngestPipelineStep.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/workflow/CreateIngestPipelineStep.java
Outdated
Show resolved
Hide resolved
...rg/opensearch/flowframework/workflow/CreateIngestPipeline/CreateIngestPipelineStepTests.java
Outdated
Show resolved
Hide resolved
...rg/opensearch/flowframework/workflow/CreateIngestPipeline/CreateIngestPipelineStepTests.java
Show resolved
Hide resolved
Signed-off-by: Joshua Palis <jpalis@amazon.com>
Signed-off-by: Joshua Palis <jpalis@amazon.com>
src/main/java/org/opensearch/flowframework/workflow/CreateIngestPipelineStep.java
Show resolved
Hide resolved
* Initial create ingest pipeline implementation Signed-off-by: Joshua Palis <jpalis@amazon.com> * Adding TODOs for storing response to global context index, fixing comments Signed-off-by: Joshua Palis <jpalis@amazon.com> * Updating workflowData interface, modifying CreateIngestPipelineStep Signed-off-by: Joshua Palis <jpalis@amazon.com> * updating workflow data extraction to read pipelineId from parameters rather than from content Signed-off-by: Joshua Palis <jpalis@amazon.com> * removing unecessary cast Signed-off-by: Joshua Palis <jpalis@amazon.com> * Pulls all required data from content rather than from params, fixes javadoc error Signed-off-by: Joshua Palis <jpalis@amazon.com> * fixing comments Signed-off-by: Joshua Palis <jpalis@amazon.com> * addressing PR comments, adding switch statement to handle parsing workflow data for required fields Signed-off-by: Joshua Palis <jpalis@amazon.com> * Adding entry import Signed-off-by: Joshua Palis <jpalis@amazon.com> * fixing comments Signed-off-by: Joshua Palis <jpalis@amazon.com> * Adds unit tests for create ingest pipeline step, fixes pipeline request body generator Signed-off-by: Joshua Palis <jpalis@amazon.com> * Adding failure tests Signed-off-by: Joshua Palis <jpalis@amazon.com> * Addressing PR comments Signed-off-by: Joshua Palis <jpalis@amazon.com> * Addressing PR comments Signed-off-by: Joshua Palis <jpalis@amazon.com> * Fixing workflow data Signed-off-by: Joshua Palis <jpalis@amazon.com> --------- Signed-off-by: Joshua Palis <jpalis@amazon.com> (cherry picked from commit 1d22bee) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Adds Create Ingest Pipeline Step (#44) * Initial create ingest pipeline implementation * Adding TODOs for storing response to global context index, fixing comments * Updating workflowData interface, modifying CreateIngestPipelineStep * updating workflow data extraction to read pipelineId from parameters rather than from content * removing unecessary cast * Pulls all required data from content rather than from params, fixes javadoc error * fixing comments * addressing PR comments, adding switch statement to handle parsing workflow data for required fields * Adding entry import * fixing comments * Adds unit tests for create ingest pipeline step, fixes pipeline request body generator * Adding failure tests * Addressing PR comments * Addressing PR comments * Fixing workflow data --------- (cherry picked from commit 1d22bee) Signed-off-by: Joshua Palis <jpalis@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Joshua Palis <jpalis@amazon.com>
#47) * Add WorkflowStepFactory class Signed-off-by: Daniel Widdis <widdis@gmail.com> * Add XContent classes representing Template JSON Signed-off-by: Daniel Widdis <widdis@gmail.com> * Add parse methods for the Template XContent Signed-off-by: Daniel Widdis <widdis@gmail.com> * Cleanup parsing, javadocs, and demo output Signed-off-by: Daniel Widdis <widdis@gmail.com> * Refactor to use field name constants, get tests working again Signed-off-by: Daniel Widdis <widdis@gmail.com> * Separate WorkflowNode and ProcessNode functionality Signed-off-by: Daniel Widdis <widdis@gmail.com> * Fix demos to align with template field names Signed-off-by: Daniel Widdis <widdis@gmail.com> * Add workflow, node, and edge tests Signed-off-by: Daniel Widdis <widdis@gmail.com> * Add Template tests Signed-off-by: Daniel Widdis <widdis@gmail.com> * Refactor TemplateParser to WorkflowProcessSorter Signed-off-by: Daniel Widdis <widdis@gmail.com> * Test exceptional cases Signed-off-by: Daniel Widdis <widdis@gmail.com> * Finish up exceptional cases Signed-off-by: Daniel Widdis <widdis@gmail.com> * Fix a template field name bug in demo Signed-off-by: Daniel Widdis <widdis@gmail.com> * Rebase with #34 Signed-off-by: Daniel Widdis <widdis@gmail.com> * Rebase changes from #54 Signed-off-by: Daniel Widdis <widdis@gmail.com> * Integrate thread pool executor service Signed-off-by: Daniel Widdis <widdis@gmail.com> * Fix flaky ProcessNodeTests by removing orTimeout Signed-off-by: Daniel Widdis <widdis@gmail.com> * Rebase and refactor with #44 Signed-off-by: Daniel Widdis <widdis@gmail.com> * Fix demos and remove DataDemo Signed-off-by: Daniel Widdis <widdis@gmail.com> * Use non-deprecated mapping method for CreateIndexStep Signed-off-by: Daniel Widdis <widdis@gmail.com> * Eliminate casting and deprecation warnings on test classes Signed-off-by: Daniel Widdis <widdis@gmail.com> * Remove unused/leftover demo class Signed-off-by: Daniel Widdis <widdis@gmail.com> * Typo Signed-off-by: Daniel Widdis <widdis@gmail.com> * Don't offer steps as an alternative to nodes Signed-off-by: Daniel Widdis <widdis@gmail.com> * Move Workflow into package with all the other parsing classes Signed-off-by: Daniel Widdis <widdis@gmail.com> * Move process sequencing classes into workflow package Signed-off-by: Daniel Widdis <widdis@gmail.com> * Add PipelineProcessor class and XContent parsing, rename package Signed-off-by: Daniel Widdis <widdis@gmail.com> --------- Signed-off-by: Daniel Widdis <widdis@gmail.com>
#47) * Add WorkflowStepFactory class Signed-off-by: Daniel Widdis <widdis@gmail.com> * Add XContent classes representing Template JSON Signed-off-by: Daniel Widdis <widdis@gmail.com> * Add parse methods for the Template XContent Signed-off-by: Daniel Widdis <widdis@gmail.com> * Cleanup parsing, javadocs, and demo output Signed-off-by: Daniel Widdis <widdis@gmail.com> * Refactor to use field name constants, get tests working again Signed-off-by: Daniel Widdis <widdis@gmail.com> * Separate WorkflowNode and ProcessNode functionality Signed-off-by: Daniel Widdis <widdis@gmail.com> * Fix demos to align with template field names Signed-off-by: Daniel Widdis <widdis@gmail.com> * Add workflow, node, and edge tests Signed-off-by: Daniel Widdis <widdis@gmail.com> * Add Template tests Signed-off-by: Daniel Widdis <widdis@gmail.com> * Refactor TemplateParser to WorkflowProcessSorter Signed-off-by: Daniel Widdis <widdis@gmail.com> * Test exceptional cases Signed-off-by: Daniel Widdis <widdis@gmail.com> * Finish up exceptional cases Signed-off-by: Daniel Widdis <widdis@gmail.com> * Fix a template field name bug in demo Signed-off-by: Daniel Widdis <widdis@gmail.com> * Rebase with #34 Signed-off-by: Daniel Widdis <widdis@gmail.com> * Rebase changes from #54 Signed-off-by: Daniel Widdis <widdis@gmail.com> * Integrate thread pool executor service Signed-off-by: Daniel Widdis <widdis@gmail.com> * Fix flaky ProcessNodeTests by removing orTimeout Signed-off-by: Daniel Widdis <widdis@gmail.com> * Rebase and refactor with #44 Signed-off-by: Daniel Widdis <widdis@gmail.com> * Fix demos and remove DataDemo Signed-off-by: Daniel Widdis <widdis@gmail.com> * Use non-deprecated mapping method for CreateIndexStep Signed-off-by: Daniel Widdis <widdis@gmail.com> * Eliminate casting and deprecation warnings on test classes Signed-off-by: Daniel Widdis <widdis@gmail.com> * Remove unused/leftover demo class Signed-off-by: Daniel Widdis <widdis@gmail.com> * Typo Signed-off-by: Daniel Widdis <widdis@gmail.com> * Don't offer steps as an alternative to nodes Signed-off-by: Daniel Widdis <widdis@gmail.com> * Move Workflow into package with all the other parsing classes Signed-off-by: Daniel Widdis <widdis@gmail.com> * Move process sequencing classes into workflow package Signed-off-by: Daniel Widdis <widdis@gmail.com> * Add PipelineProcessor class and XContent parsing, rename package Signed-off-by: Daniel Widdis <widdis@gmail.com> --------- Signed-off-by: Daniel Widdis <widdis@gmail.com> (cherry picked from commit 734f9c2) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…Template Parsing (#60) Add WorkflowStep Factory and implement XContent-based Template Parsing (#47) * Add WorkflowStepFactory class * Add XContent classes representing Template JSON * Add parse methods for the Template XContent * Cleanup parsing, javadocs, and demo output * Refactor to use field name constants, get tests working again * Separate WorkflowNode and ProcessNode functionality * Fix demos to align with template field names * Add workflow, node, and edge tests * Add Template tests * Refactor TemplateParser to WorkflowProcessSorter * Test exceptional cases * Finish up exceptional cases * Fix a template field name bug in demo * Rebase with #34 * Rebase changes from #54 * Integrate thread pool executor service * Fix flaky ProcessNodeTests by removing orTimeout * Rebase and refactor with #44 * Fix demos and remove DataDemo * Use non-deprecated mapping method for CreateIndexStep * Eliminate casting and deprecation warnings on test classes * Remove unused/leftover demo class * Typo * Don't offer steps as an alternative to nodes * Move Workflow into package with all the other parsing classes * Move process sequencing classes into workflow package * Add PipelineProcessor class and XContent parsing, rename package --------- (cherry picked from commit 734f9c2) Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Adds CreateIngestPipelineStep for workflow set up. In this current state, this step is hardcoded to parse the necessary information from the
WorkflowData
related to thetext_embedding
processor.Issues Resolved
#24
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.