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
242 stars 32 forks source link

Output for `temporal workflow show` is base-64 encoded, unlike `tctl` #573

Open tomwheeler opened 1 month ago

tomwheeler commented 1 month ago

What are you really trying to do?

Describe the bug

When I run the samples-go/codec-server example and use tctl workflow show to view the output, the Event History displayed by the command shows inputs and outputs as plain text.

When I run what I believe is the equivalent command with the temporal CLI, the inputs and outputs shown in the Event History are base-64 encoded. This requires extra steps (copying the encoded data, pasting it into an echo command, and piping it to base64 -d) in order to convert it to the plain text representation that tctl showed by default.

I struggled to consider whether to file this as a bug or feature enhancement, but ultimately chose "bug" because I feel that this is a regression from what tctl did.

Minimal Reproduction

First, follow all the steps listed in the README for the samples-go/codec-server example. Step 6 instructs you to run this command:

tctl --codec_endpoint 'http://localhost:8081/{namespace}' workflow show --wid codecserver_workflowID

After you do so, observe that the Workflow Execution's input and output shown in the Event History displayed by that command are in plain text.

Now, run the following command, which I believe is the equivalent for the temporal CLI:

temporal --codec-endpoint '[http://localhost:8081/{namespace}](http://localhost:8081/%7Bnamespace%7D)' workflow show --workflow-id codecserver_workflowID

You should then observe that the Workflow Execution's input and output shown in the Event History displayed by that command are base-64 encoded.

To be clear, this issue is not attempting to point out that the temporal CLI's output has diminished readability due to being the Event History containing verbose chunks of JSON (that's certainly true, but is already covered by #110). This issue is specifically pointing out that the data is base64-encoded, and therefore isn't readable without additional manual steps to decode it.

Environment/Versions

Additional context

N/A