Search
Get Started
CD
Cloudflare Developers
•
2y ago
jasonkuhrt
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
?
Cloudflare Developers
Join
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
83,043
Members
View on Discord
Was this page helpful?
Yes
No
W
Walshy
•
5/3/24, 1:27 PM
You can check the bindings I guess before delete and then delete those namespaces
?
J
jasonkuhrt
OP
•
5/3/24, 1:32 PM
Yeah doing that manually
, now
, should work
, but there is a
"force
" option and I
'm wondering if that would cause cascade
?
K
kian
•
5/3/24, 3:35 PM
I
'm not aware of any cascade delete for bindings in the API
W
Walshy
•
5/3/24, 5:46 PM
Yeah nothing in the API
. We don
't like touching other resources
(especially deletes
)
. Very very easy to go wrong