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

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

Closed
tomwheeler opened this issue May 21, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@tomwheeler
Copy link

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

  • OS and processor: M2 Mac
  • Temporal Version: CLI - temporal version 0.12.0 (server 1.23.0) (ui 2.26.2)
  • Are you using Docker or Kubernetes or building Temporal from source? No, I installed it using home-brew

Additional context

N/A

@tomwheeler tomwheeler added the bug Something isn't working label May 21, 2024
@cretz
Copy link
Member

cretz commented Jul 12, 2024

This should now be solved with #615 which properly uses shorthand payloads (i.e. decodes commonly formatted base64 ones)

@cretz cretz closed this as completed Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants