Hi community, Is there an easy way to clean up the...
# flyte-support
a
Hi community, Is there an easy way to clean up the Flyte workspace and delete all the workflows and tasks? I guess we can drop and recreate the container that is persisting the state.
a
Hi @aloof-painting-18735 you can delete workflow executions (see https://docs.flyte.org/projects/flytectl/en/latest/gen/flytectl_delete.html) You can also archive workflows but not delete them
are you using sandbox?
a
no, we are on EKS
a
ok, in that case, dropping the container wouldn't help I think. Workflow executions are stored in the DB
a
ok
so probably we need to archive or delete, right?
a
yes, I think so
a
all right, will do, thank you!
s
Relating to this, was wondering how to clean up already completed executions:
Copy code
flytectl get execution -p tmp -d development -o yaml | yq -r '.[].id.name' | xargs -I {} flytectl delete execution -p tmp -d development {}
Gives for executions in all kind of phases (
ABORTED
,
FAILED
,
SUCCEEDED
):
Copy code
Error: rpc error: code = FailedPrecondition desc = Cannot abort an already terminate workflow execution
t
how old are these? there should be cleanup logic.
s
These are all created in a single day (so max 8hrs), but since I was experimenting a lot I wanted to clean them up and declutter. Would they get auto-removed after a while?