Skip to content

Commit c352d72

Browse files
fix(website): skip the dependents probe when deleting previews (#844)
* fix(website): skip the dependents probe when deleting previews wrangler delete probes the account's KV namespaces to warn about dependents — a call the deploy token (Workers Scripts scope only) cannot make, so it errored with auth 10000 after the delete had already succeeded. --force skips that probe; preview workers are assets-only with no bindings, so the check is pure overhead. A missing worker still errors and the || echo catches it. * chore: add changeset for preview delete --force
1 parent d31f4f8 commit c352d72

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

‎.changeset/preview-delete-force.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"nostream-website": patch
3+
---
4+
5+
Preview cleanup no longer trips the deploy token's missing KV scope: wrangler delete runs with --force, skipping the dependents probe that errored after a successful delete. Preview workers are assets-only, so nothing else changes.

‎.github/workflows/deploy-website-preview.yml‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,13 @@ jobs:
152152
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
153153
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
154154
run: |
155-
# A missing worker exits non-zero; treat already-gone as success.
156-
npx wrangler delete --config wrangler.preview.jsonc \
155+
# --force skips the "would this break dependents" probe, which calls
156+
# KV namespaces listing the deploy token's scope (Workers Scripts
157+
# only) cannot read — the probe errors with auth 10000 AFTER the
158+
# delete has already succeeded. Preview workers are assets-only
159+
# (no bindings), so the check is pure overhead. A missing worker
160+
# still errors and is caught below.
161+
npx wrangler delete --config wrangler.preview.jsonc --force \
157162
--name nostream-web-pr-${{ github.event.pull_request.number }} \
158163
|| echo "preview worker already absent"
159164

0 commit comments

Comments
 (0)