We're using the API to tear down workers but their KV bindings are not being torn down with them.

This leads to a deleted worker but its KV namespace hangs around:
await cf.workers.scripts.delete(script, { account_id })
await cf.workers.scripts.delete(script, { account_id })
How can we cascade delete the KV namspace?
4 Replies
Walshy
Walshy8mo ago
You can check the bindings I guess before delete and then delete those namespaces?
jasonkuhrt
jasonkuhrtOP8mo ago
Yeah doing that manually, now, should work, but there is a "force" option and I'm wondering if that would cause cascade?
kian
kian8mo ago
I'm not aware of any cascade delete for bindings in the API
Walshy
Walshy8mo ago
Yeah nothing in the API. We don't like touching other resources (especially deletes). Very very easy to go wrong
Want results from more Discord servers?
Add your server