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] Allow provisioning of a completed workflow with no resources #537

Open
dbwiddis opened this issue Feb 23, 2024 · 3 comments
Open
Assignees
Labels
backlog Good to have functionality not critical for next release enhancement New feature or request

Comments

@dbwiddis
Copy link
Member

dbwiddis commented Feb 23, 2024

Is your feature request related to a problem?

Currently, we prevent provisioning a workflow twice. The intent of this restriction is to avoid duplicating resources. It's possible to provision a second time if you deprovision first. However, in the edge case where a workflow does not have any resources, the "deprovision" step is a no-op and should not be required.

What solution would you like?

The FlowFrameworkIndicesHandler currently has a boolean to check whether a workflow is started: https://github.com/opensearch-project/flow-framework/blob/main/src/main/java/org/opensearch/flowframework/indices/FlowFrameworkIndicesHandler.java#L491

This is checked in two REST actions to prevent modification: updating (PUT) a workflow and provisioning a workflow.

In both cases, if the provisioning is complete and there are no resources, there is no reason to prevent editing/provisioining; essentially deprovisioning (no-op) to reset the state.

This method should be updated to allow a COMPLETED provisioning with no resources to be considered the same as "not started". For performance reasons, the not started check should be done first, as the COMPELTED check requires an additional query of the state index to determine whether resources were provisioned.

What alternatives have you considered?

We may just want to allow a parameter, e.g, ?deprovision=true which would complete the deprovisioning (if any) prior to provisioning a second time. This would work well with the future "fine grained provisioning" feature where in some cases only a partial deprovisioning is required.

To eliminate the need for a resource check for a COMPLETED provision, we can consider another workflow state that we set when provisioning is complete and we have no resources, or we can rename NOT_STARTED to some neutral term, e.g., PROVISIONABLE, meaning there are no resources.

Do you have any additional context?

With the existing ML configuration steps, we don't expect this edge case often, but with automation steps which do not provision, as envisioned by #522, this may be a common situation.

@dbwiddis dbwiddis added enhancement New feature or request untriaged v2.13.0 Issues targeting release v2.13.0 v2.14.0 and removed untriaged v2.13.0 Issues targeting release v2.13.0 labels Feb 23, 2024
@dbwiddis
Copy link
Member Author

dbwiddis commented Mar 7, 2024

Given the potential for "fine grained provisioining" in the future, it seems the "alternative you have considered" is the best option. Allow a parameter like "deprovision=true" to fully or partially deprovision.

@xinlamzn
Copy link
Member

Is this a feature or bug-fix?

@dbwiddis
Copy link
Member Author

Is this a feature or bug-fix?

More of a feature as there's not really a bug. Provisioning a workflow that doesn't create resources is somewhat of an edge case. It's worth seeing how we fully integrate versioning with the front end before committing to a specific solution.

@joshpalis joshpalis added v2.15.0 and removed v2.14.0 labels Apr 8, 2024
@dbwiddis dbwiddis added backlog Good to have functionality not critical for next release and removed v2.15.0 labels May 9, 2024
@github-project-automation github-project-automation bot moved this to Upcoming release (TBD) in OpenSearch Project Roadmap Aug 30, 2024
@dbwiddis dbwiddis added the v2.18.0 Issues targeting release v2.18.0 label Sep 18, 2024
@dbwiddis dbwiddis removed the v2.18.0 Issues targeting release v2.18.0 label Oct 3, 2024
@minalsha minalsha assigned junweid62 and unassigned saimedhi Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Good to have functionality not critical for next release enhancement New feature or request
Projects
Status: Upcoming release (TBD)
Development

No branches or pull requests

5 participants