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

[Bug] Ensure stability of JSON output across builds #558

Open
dandavison opened this issue May 10, 2024 · 1 comment
Open

[Bug] Ensure stability of JSON output across builds #558

dandavison opened this issue May 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dandavison
Copy link
Contributor

dandavison commented May 10, 2024

After some head-scratching regarding inconsistent whitespace in JSON output, @cretz determined that the problem was the deliberate injection of random whitespace here: protocolbuffers/protobuf-go@582ab3d

(The random bool they use is constant within a build but random across builds)

We should ensure our JSON output is stable across builds.

The problem can be repro'd with temporal workflow show -w <wid> --event-details

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

cretz commented May 10, 2024

Note that this is deterministic from build to build, so you have to recompile in differing ways to see the issue. The solution is likely to run any proto JSON result through json.Indent or json.Compact depending on which JSON formatting is desired.

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