Is there a proper way to “un-deploy” a worker rather than deleting it (i.e.,
I’ve been taking down my worker by deleting it, but I’m running into several issues around secrets and false deployments when I want to deploy the worker again.
Here’s an example reproduction:
wrangler delete wrangler secret:bulk secrets.json # ✘ [ERROR] 🚨 1 secrets failed to upload yarn wrangler secret list # shows the secrets actually there wrangler secret:bulk secrets.json # ✨ 1 secrets successfully uploaded wrangler deployments list
The output of the final
wrangler deployments list shows:
Deployment ID: (redacted) Created on: 2023-11-16T20:05:07.411569Z Author: (redacted) Source: Upload from Wrangler 🤠 Deployment ID: (redacted) Created on: 2023-11-16T20:05:08.648391Z Author: (redacted) Source: Secret Change from Wrangler 🤠 Deployment ID: (redacted) Created on: 2023-11-16T20:05:30.410174Z Author: (redacted) Source: Secret Change from Wrangler 🤠 🟩 Active
Trying with multiple (n) secrets, I see that I get n
Upload from Wrangler 🤠s followed by n
Secret Change from Wrangler 🤠s.
However, when I visit my deployment (at
https://[app].[uname].workers.dev/), I get the “There is nothing here yet” page.
In other words, uploading secrets:
- says it fails, but it doesn’t
- automatically deploys my app (several times)
- … but doesn’t actually deploy my app (it’s not running)
- makes wrangler confused about whether my app is deployed
There are several surprising things here, so let me try to summarize with a table:
|Take down a deployment without deleting the deployment history||
Apologies in advance if I’m super confused here and doing something wrong. Anyone else have experience taking workers down and up more gracefully than I’m achieving?
P.S. I opened a GitHub issue (
https://github.com/cloudflare/workers-sdk/issues/4459) describing this as well, but I figured it could be a good candidate for a community question as well.