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

[FEATURE] Add fine-grained provisioning #717

Closed
8 of 11 tasks
joshpalis opened this issue May 20, 2024 · 0 comments
Closed
8 of 11 tasks

[FEATURE] Add fine-grained provisioning #717

joshpalis opened this issue May 20, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@joshpalis
Copy link
Member

joshpalis commented May 20, 2024

Is your feature request related to a problem?

Currently, a user has the ability to create a template and provision resources but does not have the ability to update the provisioned resources without first de-provisioning the entire workflow. To improve the user experience, we should add the ability to provision new or update existing resources for a workflow that has been previously executed.

What solution would you like?

To enable fine-grained provisioning, it will be necessary to support the following update APIs as WorkflowSteps in order to execute these on the resources already created.

The directional idea is to utilize the update API to handle updates to provisioned workflows with the status COMPLETED. Through the update API, the user will provide an updated template and workflow_id pointing to the already provisioned workflow. This will allow us to compare the diff, execute the related update API (if one exists), and update the resources of that provisioned workflow.

Update API :

// (Currently implemented) Updates a NOT_STARTED template, full document replacement. Fails if template is COMPLETED
PUT /_plugins/_flow_framework/workflow/<workflow_id>
{
    <updated template>
}

// (For fine-grained provisioning) Updates a COMPLETED template
PUT /_plugins/_flow_framework/workflow/<workflow_id>?provision=true
{
    <updated template>
}

Task Breakdown :

  • Update WorkflowResources to include a related Update WorkflowStep for each of the existing WorkflowSteps
  • Add support for the above Update WorkflowSteps
  • Update the CreateWorkflowTransportAction to consider the case in which a workflow has a status of COMPLETED
  • Topologically sort both the given updated template and existing template into separate lists of ProcessNode and compare, identifying new and updated nodes.
  • Execute the necessary action for the new list of ProcessNode, either update or provision, updating the related state index document when necessary

Do you have any additional context?

This capability is intended to support the following use cases :

  • fine-grained update to be able to update an existing create ingest pipeline / create search pipeline step
  • fine grained provision to execute the update of ingest pipeline / search pipeline
  • fine grained provision to add an ingest pipeline step / search pipeline step
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants