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

cli: Deprecate -o json, recommend -o jsonpb instead #738

Merged
merged 1 commit into from
Jun 7, 2022

Conversation

gandro
Copy link
Member

@gandro gandro commented Jun 7, 2022

The -o json output had been added to Hubble very early, when we
assumed that all relevant information would be contained in the Flow
protobuf message. Hubble has however since gained the -o jsonpb
output, which contains additional information such as the node name
which produced the network flow.

More importantly, -o json cannot be piped into hubble observe for
additional filtering, therefore further limiting its usability. To avoid
users accidentally using -o json instead of the likely more correct
-o jsonpb, this commit deprecates -o json and prints a warning to
stderr whenever it is used.

This allows us to fully remove -o json in a future release.

@gandro gandro requested review from a team and glibsm and removed request for a team June 7, 2022 10:12
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label PR is blocked until the release note is set label Jun 7, 2022
@gandro gandro added release-note/major This PR introduces major new functionality to Hubble. and removed dont-merge/needs-release-note-label PR is blocked until the release note is set labels Jun 7, 2022
pkg/printer/options.go Outdated Show resolved Hide resolved
The `-o json` output had been added to Hubble very early, when we
assumed that all relevant information would be contained in the `Flow`
protobuf message. Hubble has however since gained the `-o jsonpb`
output, which contains additional information such as the node name
which produced the network flow.

More importantly, `-o json` cannot be piped into `hubble observe` for
additional filtering, therefore further limiting its usability. To avoid
users accidentally using `-o json` instead of the likely more correct
`-o jsonpb`, this commit deprecates `-o json` and prints a warning to
stderr whenever it is used.

This allows us to fully remove `-o json` in a future release.

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
@gandro gandro force-pushed the pr/gandro/deprecate-json-output branch from 67f5162 to 379e2fb Compare June 7, 2022 13:02
@gandro gandro merged commit 6d06b2a into master Jun 7, 2022
@gandro gandro deleted the pr/gandro/deprecate-json-output branch June 7, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/major This PR introduces major new functionality to Hubble.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants