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

Improve messaging around wrangler rollback not being able to find a worker #3372

Closed
rozenmd opened this issue May 30, 2023 · 9 comments · Fixed by #4588
Closed

Improve messaging around wrangler rollback not being able to find a worker #3372

rozenmd opened this issue May 30, 2023 · 9 comments · Fixed by #4588
Labels
error-messaging Improving user facing error messages polish Small improvements to the experience wrangler Relating to the Wrangler CLI tool

Comments

@rozenmd
Copy link
Contributor

rozenmd commented May 30, 2023

Which Cloudflare product(s) does this pertain to?

Wrangler

What version of Wrangler are you using?

3.0.1

What operating system are you using?

Mac

Describe the Bug

npx wrangler@beta rollback
 ⛅️ wrangler 0.0.0-2956c31d
---------------------------
🚧`wrangler rollback` is a beta command. Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose


✘ [ERROR] A request to the Cloudflare API (/accounts/xxxx/workers/services/undefined) failed.

  workers.api.error.service_not_found [code: 10090]

  If you think this is a bug, please open an issue at:
  https://github.com/cloudflare/workers-sdk/issues/new/choose

If a worker name is required, the command should be rollback <deployment-id>, not rollback [deployment-id]

@rozenmd rozenmd added the bug Something that isn't working label May 30, 2023
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk May 30, 2023
@JacobMGEvans
Copy link
Contributor

The name is not required, the CLI structure is correct. Do you have any debug logs?

Thanks for reporting Max 😊

@rozenmd
Copy link
Contributor Author

rozenmd commented Jun 1, 2023

It makes a request against /accounts/xxxx/workers/services/undefined - after picking an account - sounds like it should be making me pick a worker too?

@admah
Copy link
Contributor

admah commented Jun 2, 2023

Like @JacobMGEvans said, thanks for reporting this. You should be able to run rollback without an ID. That should rollback the current Worker to the last deployment as described in the docs. I do think this is a bug.

@admah admah moved this from Untriaged to Backlog in workers-sdk Jun 2, 2023
@rozenmd
Copy link
Contributor Author

rozenmd commented Jun 3, 2023

Wait does the command need to be run within a project that contains a wrangler.toml?

@JacobMGEvans
Copy link
Contributor

Can you provide a repro and debug logs?

@JacobMGEvans JacobMGEvans self-assigned this Jun 7, 2023
@JacobMGEvans JacobMGEvans moved this from Backlog to In Progress in workers-sdk Jun 7, 2023
@JacobMGEvans JacobMGEvans added needs reproduction Needs reproduction from OP wrangler Relating to the Wrangler CLI tool labels Jun 7, 2023
@rozenmd
Copy link
Contributor Author

rozenmd commented Jun 7, 2023

@JacobMGEvans:

rozenmd@xxxxx asddf % cd ~
rozenmd@xxxxxxxxx ~ % npx wrangler@latest rollback
 ⛅️ wrangler 3.1.0
------------------
✔ Select an account › xxxxx@gmail.com's Account
🚧`wrangler rollback` is a beta command. Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose


✘ [ERROR] A request to the Cloudflare API (/accounts/xxxx/workers/services/undefined) failed.

  workers.api.error.service_not_found [code: 10090]

  If you think this is a bug, please open an issue at:
  https://github.com/cloudflare/workers-sdk/issues/new/choose

@rozenmd rozenmd removed the needs reproduction Needs reproduction from OP label Jun 9, 2023
@penalosa
Copy link
Contributor

@rozenmd wrangler rollback has to be run in a project with a wrangler.toml file, which is where it gets the Worker name

@github-project-automation github-project-automation bot moved this from In Progress to Done in workers-sdk Jun 15, 2023
@penalosa
Copy link
Contributor

We should probably provide better logging here, and allow specifying a worker name

@penalosa penalosa reopened this Jun 15, 2023
@github-project-automation github-project-automation bot moved this from Done to In Progress in workers-sdk Jun 15, 2023
@penalosa penalosa changed the title 🐛 BUG: wrangler rollback doesn't work 🐛 BUG: Improve messaging around wrangler rollback not being able to find a worker Jun 15, 2023
@penalosa penalosa added polish Small improvements to the experience and removed bug Something that isn't working labels Jun 15, 2023
@penalosa penalosa changed the title 🐛 BUG: Improve messaging around wrangler rollback not being able to find a worker Improve messaging around wrangler rollback not being able to find a worker Jun 15, 2023
@admah
Copy link
Contributor

admah commented Jun 15, 2023

That's a good idea @penalosa. This was originally designed in the context of running it in a project folder. Adding a --name option like wrangler deploy could work here.

@github-project-automation github-project-automation bot moved this from In Progress to Done in workers-sdk Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error-messaging Improving user facing error messages polish Small improvements to the experience wrangler Relating to the Wrangler CLI tool
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants