Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: delete site/assets namespace when a worker is deleted #2098

Merged

Conversation

threepointone
Copy link
Contributor

This patch deletes any site/asset kv namespaces associated with a worker when wrangler delete is used. It finds the namespace associated with a worker by using the names it would have otherwise used, and deletes it. It also does the same for the preview namespace that's used with wrangler dev.

@changeset-bot
Copy link

changeset-bot bot commented Oct 30, 2022

🦋 Changeset detected

Latest commit: 4ab7615

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This patch deletes any site/asset kv namespaces associated with a worker when `wrangler delete` is used. It finds the namespace associated with a worker by using the names it would have otherwise used, and deletes it. It also does the same for the preview namespace that's used with `wrangler dev`.
@threepointone threepointone force-pushed the deletes-site-assets-namespace branch from 5e35ed0 to 4ab7615 Compare October 30, 2022 15:17
@threepointone
Copy link
Contributor Author

image

"First time contributors" pssssh

@github-actions
Copy link
Contributor

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/3355995707/npm-package-wrangler-2098

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/2098/npm-package-wrangler-2098

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/3355995707/npm-package-wrangler-2098 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.developers.workers.dev/runs/3355995707/npm-package-cloudflare-pages-shared-2098

@codecov
Copy link

codecov bot commented Oct 30, 2022

Codecov Report

Merging #2098 (4ab7615) into main (2c1fd9d) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2098      +/-   ##
==========================================
+ Coverage   73.06%   73.12%   +0.05%     
==========================================
  Files         127      127              
  Lines        8595     8610      +15     
  Branches     2263     2264       +1     
==========================================
+ Hits         6280     6296      +16     
+ Misses       2315     2314       -1     
Impacted Files Coverage Δ
packages/wrangler/src/delete.ts 100.00% <100.00%> (ø)
packages/wrangler/src/sites.tsx 94.20% <100.00%> (ø)
...ackages/wrangler/src/__tests__/helpers/mock-bin.ts 100.00% <0.00%> (+5.26%) ⬆️

@rozenmd rozenmd merged commit 2a81cae into cloudflare:main Oct 30, 2022
@github-actions github-actions bot mentioned this pull request Oct 31, 2022
@threepointone threepointone deleted the deletes-site-assets-namespace branch October 31, 2022 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants