Skip to content

Unstable JSON output in CLI tests due to protojson formatting #6430

@sachin9058

Description

@sachin9058

Describe the issue

CLI JSON output generated via protojson is not stable across environments.
Specifically, spacing differences (e.g., extra spaces after :) can vary between local runs and CI, even when the underlying data is identical.

This causes golden tests that rely on exact JSON string matching to fail intermittently.

To Reproduce

  1. Run CLI tests that include JSON golden output (e.g., artifact get)
  2. Compare outputs across different environments (local vs CI)
  3. Observe differences in spacing/formatting (extra spaces after :)
  4. Tests fail due to string mismatch despite identical data

What version are you using?

Latest main (after #6420 / #6417 changes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions