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

cmd: Make -o json an alias for -o jsobpb #826

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

gandro
Copy link
Member

@gandro gandro commented Dec 19, 2022

This commit removes the old deprecated JSON output and fully replaces it with the newer JSONPB output (based on proto3's json mapping).

This is a breaking change, users of -o json will have to adopt the output parsing slightly: Each emitted object is now wrapped in a GetFlowsResponse, which means that the flow object (the root of the previous JSON output) is now accessible via the .flow attribute.

For example, a query of the form hubble observe -o json | jq .source.labels now needs to be written as hubble observe -o json | jq .flow.source.labels.

This commit removes the old deprecated JSON output and fully replaces it
with the newer JSONPB output (based on proto3's json mapping).

This is a breaking change, users of `-o json` will have to adopt the
output parsing slightly: Each emitted object is now wrapped in a
`GetFlowsResponse`, which means that the flow object (the root of the
previous JSON output) is now accessible via the `.flow` attribute. For
example, a query of the form `hubble observe -o json | jq
.source.labels` now needs to be written as `hubble observe -o json | jq
.flow.source.labels`.

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
@gandro gandro added ⌨️ area/cli Impacts the command line interface of any command in the repository. release-note/major This PR introduces major new functionality to Hubble. breaking-change Breaks compatibility with previous versions labels Dec 19, 2022
@gandro gandro requested a review from a team as a code owner December 19, 2022 10:24
@gandro gandro requested review from kaworu and removed request for a team December 19, 2022 10:24
Copy link
Member

@christarazi christarazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's happening!

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Dec 19, 2022
@kaworu kaworu merged commit d6eff50 into master Dec 20, 2022
@kaworu kaworu deleted the pr/gandro/remove-legacy-json-output branch December 20, 2022 08:35
@rolinh rolinh mentioned this pull request Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⌨️ area/cli Impacts the command line interface of any command in the repository. breaking-change Breaks compatibility with previous versions ready-to-merge This PR has passed all tests and received consensus from code owners to merge. 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

3 participants