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

Adds Create Ingest Pipeline Step #44

Merged
merged 18 commits into from
Sep 25, 2023

Conversation

joshpalis
Copy link
Member

@joshpalis joshpalis commented Sep 18, 2023

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 the text_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.

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>
@github-actions github-actions bot added the backport 2.x backport PRs to 2.x branch label Sep 18, 2023
…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
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Merging #44 (9662632) into main (a530739) will increase coverage by 5.54%.
The diff coverage is 87.87%.

@@             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     
Files Coverage Δ
.../opensearch/flowframework/FlowFrameworkPlugin.java 0.00% <0.00%> (ø)
...owframework/workflow/CreateIngestPipelineStep.java 90.62% <90.62%> (ø)

Signed-off-by: Joshua Palis <jpalis@amazon.com>
Copy link
Member

@dbwiddis dbwiddis left a 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!

…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>
@joshpalis joshpalis marked this pull request as ready for review September 22, 2023 16:51
Signed-off-by: Joshua Palis <jpalis@amazon.com>
Copy link
Member

@dbwiddis dbwiddis left a 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

Signed-off-by: Joshua Palis <jpalis@amazon.com>
Signed-off-by: Joshua Palis <jpalis@amazon.com>
Copy link
Member

@owaiskazi19 owaiskazi19 left a 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.

Signed-off-by: Joshua Palis <jpalis@amazon.com>
Signed-off-by: Joshua Palis <jpalis@amazon.com>
@owaiskazi19 owaiskazi19 merged commit 1d22bee into opensearch-project:main Sep 25, 2023
10 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 25, 2023
* 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>
joshpalis added a commit that referenced this pull request Sep 25, 2023
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>
dbwiddis added a commit that referenced this pull request Sep 28, 2023
#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>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 28, 2023
#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>
dbwiddis pushed a commit that referenced this pull request Sep 28, 2023
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport PRs to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants