temporalio / cli

Command-line interface for running Temporal Server and interacting with Workflows, Activities, Namespaces, and other parts of Temporal
https://docs.temporal.io/cli
MIT License
251 stars 36 forks source link

[Bug] Improve CLI errors when namespace is incorrect #589

Closed robzienert closed 3 months ago

robzienert commented 3 months ago

What are you really trying to do?

Any action in the CLI that involves specifying a namespace.

Describe the bug

When an incorrect namespace is provided, the CLI returns a pretty unhelpful error message similar to: Error: unable to run workflow: context deadline exceeded. Unfamiliar users to Temporal will not look to see if they're providing the correct namespace, and instead escalate to a central team to debug.

Minimal Reproduction

Run a command that requires taking -n namespace flag, but provide it a namespace that does not exist.

Environment/Versions

I think this is global behavior.

Additional context

josh-berry commented 3 months ago

Hi @robzienert, can you tell me which specific commands you've observed this with? I've tried with a couple different commands (e.g. temporal operator namespace describe and temporal workflow describe) and they all return namespace not found or similar errors. Thanks!

josh-berry commented 3 months ago

I'm also unable to reproduce this with workflow start and workflow execute:

❯ temporal workflow execute -n asdf --task-queue q --type foo
time=2024-06-18T16:41:09.619 level=ERROR msg="failed starting workflow: Namespace asdf is not found."

❯ temporal workflow start -n asdf --task-queue q --type foo
time=2024-06-18T16:41:14.306 level=ERROR msg="failed starting workflow: Namespace asdf is not found."

So to make any progress I'm going to need an example showing which command is at issue. Thanks!

josh-berry commented 3 months ago

Closing since I haven't heard back.

@robzienert If you're still seeing this in the latest version of the CLI (v0.13.1), please feel free to reopen, and let us know: