https://flyte.org logo
#ask-the-community
Title
# ask-the-community
r

Robert Ambrus

07/12/2023, 1:25 PM
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.
d

David Espejo (he/him)

07/12/2023, 3:59 PM
Hi @Robert Ambrus 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?
r

Robert Ambrus

07/12/2023, 4:00 PM
no, we are on EKS
d

David Espejo (he/him)

07/12/2023, 4:00 PM
ok, in that case, dropping the container wouldn't help I think. Workflow executions are stored in the DB
r

Robert Ambrus

07/12/2023, 4:01 PM
ok
so probably we need to archive or delete, right?
d

David Espejo (he/him)

07/12/2023, 4:03 PM
yes, I think so
r

Robert Ambrus

07/12/2023, 4:03 PM
all right, will do, thank you!
g

Geert

07/12/2023, 5:04 PM
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
y

Yee

07/12/2023, 8:41 PM
how old are these? there should be cleanup logic.
g

Geert

07/13/2023, 7:13 AM
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?
3 Views