Skip to content

🐛 BUG: deployments list shows 🟩 Active when it's not #4459

Description

@mbforbes

Which Cloudflare product(s) does this pertain to?

Wrangler core

What version(s) of the tool(s) are you using?

3.15.0

What version of Node are you using?

20.9.0

What operating system are you using?

Mac

Describe the Bug

My bug involves trying to take down a worker and then bring it back up.

My understanding is that to take down a worker, I must delete it (wrangler delete). So, imagine I want to take down a worker, then bring it back up. The worker depends on secrets, which wrangler delete also removes. So I add the secrets back first. Steps shown next.

Reproduction

wrangler delete
# I tried uploading twice, but it actually succeeds on the first try!
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.

There are several surprising things here, so let me try to summarize with a table:

Step Expected Actual
Take down a deployment without deleting the deployment history wrangler undeploy or
wrangler down or
wrangler unpublish
(none)
If wrangler secrets:bulk [file] shows ✘ [ERROR] 🚨 N secrets failed to upload, have the secrets actually been uploaded? no yes
Does wrangler secrets:bulk [file] cause n Upload from Wrangler 🤠s for n secrets? no yes
Does wrangler secrets:bulk [file] show no error message on the first try with no deployment? yes no
if wrangler deployments list shows 🟩 Active, is the deployment active? yes no

My apologies if I missed a cleaner way to un-deploy a worker! If it's easier that I file a separate issue for each row of the table, please let me know and I'm happy to do so.

(edits: accidentally submitted too early)

Metadata

Metadata

Labels

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions