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] Support optional force deletion of certain resources #748

Closed
ohltyler opened this issue Jun 20, 2024 · 6 comments · Fixed by #763
Closed

[FEATURE] Support optional force deletion of certain resources #748

ohltyler opened this issue Jun 20, 2024 · 6 comments · Fixed by #763
Assignees
Labels
enhancement New feature or request v2.16.0 Issues targeting release v2.16.0

Comments

@ohltyler
Copy link
Member

ohltyler commented Jun 20, 2024

Currently, certain resources are blocked from being deleted during deprovisioning, including indices, as a precaution to prevent users from accidentally deleting potential data.

By allowing the ability to delete such resources if the user explicitly wants to, this gives users more flexibility. It simplifies the experience of performing iterative testing / rapid prototyping on a workflow, where users may be constantly deprovisioning / reprovisioning resources.

On the frontend, the UX is focused on iterative testing of workflows, most of which involve index creation. Currently, this causes errors during reprovisioning due to the created index resource existing. There are frontend-only solutions for this problem, but ideally this is allowed directly from the backend for consistency and ease of use for API users.

Proposal: an allow_delete list param - a fine-grained parameter for deleting any specially-handled resources specified in the list of resource types passed

POST .../_deprovision?allow_delete=index,ingest_pipeline,foo
{
"workflow_id" : "abc"
}

Internally, we can add a delete index workflow step (and for any other resources that have this guardrail) that will only be executed when the parameter logic specifies as such.

Additionally, we may want some notification / visibility to users on such scenarios. See #579 for details.

@ohltyler ohltyler added the enhancement New feature or request label Jun 20, 2024
@ohltyler ohltyler added v2.16.0 Issues targeting release v2.16.0 and removed untriaged labels Jun 20, 2024
@dbwiddis
Copy link
Member

Do you think matching the workflow step type (e.g., delete_index) or the workflow step id (e.g., foo_index) is better?

@dbwiddis dbwiddis self-assigned this Jun 21, 2024
@ohltyler
Copy link
Member Author

Do you think matching the workflow step type (e.g., delete_index) or the workflow step id (e.g., foo_index) is better?

From user-facing view, the latter makes more sense to me. They may not know / care about the internal workflow step type, but just know they want to delete foo_index. Additionally, specifying the particular resource may prevent more complexity / logic on the backend to try to determine which resource a user actually wants to delete (e.g., only specify delete_index but have a workflow with 3 index creations, do we delete one? all? etc.)

@dbwiddis
Copy link
Member

From user-facing view, the latter makes more sense to me. They may not know / care about the internal workflow step type, but just know they want to delete foo_index.

That was my thinking as well. It's also easily obtainable on the resources list that they're deprovisioning so both backend code and frontend code (hey here's the resources, check the "force delete" box on the ones you want) can see them.

Only remaining complication I see is how to indicate which resources require force delete. I'll think about that....

@minalsha
Copy link
Collaborator

minalsha commented Jul 8, 2024

@dbwiddis could you please link doc issue created for this feature?

@ohltyler
Copy link
Member Author

ohltyler commented Jul 8, 2024

@dbwiddis could you please link doc issue created for this feature?

It is linked in the linked PR #763 : opensearch-project/documentation-website#7639

@minalsha
Copy link
Collaborator

minalsha commented Jul 8, 2024

ahh my bad. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v2.16.0 Issues targeting release v2.16.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants