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][workflow] Delete virtual actor after use #18848

Closed
1 of 2 tasks
yuanchi2807 opened this issue Sep 23, 2021 · 5 comments · Fixed by #19178
Closed
1 of 2 tasks

[Feature][workflow] Delete virtual actor after use #18848

yuanchi2807 opened this issue Sep 23, 2021 · 5 comments · Fixed by #19178
Assignees
Labels
enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks workflow

Comments

@yuanchi2807
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

Workflow virtual actors are persistent on backend storage. Provide a function to delete or clean up the artifacts and free up storage space.

Use case

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@yuanchi2807 yuanchi2807 added enhancement Request for new feature and/or capability workflow-usability workflow labels Sep 23, 2021
@fishbone
Copy link
Contributor

I'd propose the following API:

workflow.delete(workflow_id="")

@yuanchi2807
Copy link
Contributor Author

I'd propose the following API:

workflow.delete(workflow_id="")

That'd work prefectly.

@fishbone fishbone added this to the Workflows Pre-Beta milestone Sep 24, 2021
@fishbone fishbone assigned wuisawesome and unassigned fishbone Sep 24, 2021
@fishbone fishbone added the P1 Issue that should be fixed within a few weeks label Sep 29, 2021
@fishbone
Copy link
Contributor

fishbone commented Sep 29, 2021

workflow.delete(namespace="ns", workflow_id="id") # delete job id in namespace ns
workflow.delete(namespace="ns") # delete the whole namespace ns
workflow.delete(workflow_id="id")

@wuisawesome
Copy link
Contributor

Some proposed behavior for the edge cases here:

What do when you delete a running workflow?

Let's leave it undefined for now (since we don't have workflow.cancel)

Calling delete on a non-existent workflow?

Do nothing, maybe print a warning? (this provides idempotency).

@fishbone
Copy link
Contributor

fishbone commented Oct 7, 2021

Yes, for a running one, we should workflow.cancel and then delete.

wuisawesome pushed a commit that referenced this issue Oct 8, 2021
Why are these changes needed?
This PR implements workflow.delete which allows users to delete the information in storage related to a workflow. (This assumes the workflow isn't currently running).

Related issue number
Closes #18848
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks workflow
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants