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

[Backport 2.x] Adds REST APIs for creating and provisioning a workflow (#63) #96

Merged

Conversation

joshpalis
Copy link
Member

Manual Backport of #63

…roject#63)

* Inital implementation, set up rest/transport actions, registration, pending global context index, state index implementations

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

* Addressing PR comments, seting params to snake case, removing redundant param default value, setting workflow request to read/write optional string

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

* Introducing getExecutorBuilders extension point to FlowFramworkPlugin, added FixedExecutorBuilder thread pool for provisioning tasks, set up async workflow execution, added TODOs for state/GC index handling

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

* updating unit tests for FlowFrameworkPluginTests, adding WorkflowRequestResponse unit tests

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

* Adding validate/toXContent tests for workflow request/responses

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

* Adding unit tests for create and provision rest actions

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

* Addressing PR comments (Part 1). Moving common vlaues to CommonValue class

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

* Addressing PR comments (Part 2), adding globalcontexthandler to create components, added updateTemplate(), indexExists() methods to handler and createIndex step respecitvely. Implemented CreateWorkflow/ProvisionWorkflow transport actions

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

* Addressing PR comments (Part 3)

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

* Removing TODOs for RestAction constructors, adding basic unit tests for added methods in CreateIndexStep, GlobalContextHandler

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

* Adding CreateWorkflowTransportAction unit tests

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

* Adding intial failure test case for the ProvisionWorkflowTransportAction. Still need to add tests for success case

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

* Updating base URI namespace to workflow instead of workflows

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

* Addressing PR comment, updating invalid template config test, removing field via string replacement

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

* Add success test case for ProvisionWorkflowTransportAction

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

* Updating global context index mapping for template version and compatibility version fields from int to text

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

* Fixing bugs, changed GC index mapping so that template/compatibility versions are of type text, added GC template document readers/writers, modified tests. Still need to add test cases for the new readers/writers

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

* Updating GlobalContextHandler.updateTemplate() to use toDocumentSource instead of toXContent()

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

* Replacing exceptions with FlowFrameworException

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

* Resolving javadoc warnings

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

* Cleaning up TODOs

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

* Addressing PR comments

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

* Addressing PR comments, moving some common template parsing methods to a common TemplateUtil class

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

---------

Signed-off-by: Joshua Palis <jpalis@amazon.com>
(cherry picked from commit 014475d)
@owaiskazi19 owaiskazi19 merged commit e0e3316 into opensearch-project:2.x Oct 16, 2023
8 checks passed
@joshpalis joshpalis deleted the backport/backport-63-to-2.x branch October 16, 2023 17:18
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.

2 participants