-
Notifications
You must be signed in to change notification settings - Fork 202
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
pkg/report: fix IsJSON() #1226
pkg/report: fix IsJSON() #1226
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
When a user request --format `{{json .}}` they would want the go template parser to handle it. Currently we overwrite this and assume that `{{json .}}` equals `json`. This is not correct. When the output is a range (array), i.e. podman ps, it should return one json object per line and not a json array which is the case with `json`. This is required for docker compat. Fixes containers/podman#16436 Signed-off-by: Paul Holzinger <[email protected]>
/hold |
containers/podman#16446 for podman tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/lgtm |
wait, the podman PR has red test! This will break vendoring. |
The PR containers#1226 was merged to soon, it breaks podman tests and backwards compat. `{{json}}` is not a valid template but it worked before the same as `json` so we should keep that. Fixes up commit 152c840 Signed-off-by: Paul Holzinger <[email protected]>
The PR containers#1226 was merged to soon, it breaks podman tests and backwards compat. `{{json}}` and `{{json.}}` are not valid templates but it worked before the same as `json` so we should keep that for compat reasons. Fixes up commit 152c840 Signed-off-by: Paul Holzinger <[email protected]>
When a user request --format
{{json .}}
they would want the go template parser to handle it. Currently we overwrite this and assume that{{json .}}
equalsjson
. This is not correct. When the output is a range (array), i.e. podman ps, it should return one json object per line and not a json array which is the case withjson
.This is required for docker compat.
Fixes containers/podman#16436