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

fix --format {{json .}} output to match docker #16446

Merged
merged 1 commit into from
Nov 11, 2022

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Nov 8, 2022

--format json should not be the same as --format {{json .}}, the
later should actually run through the go template and thus create one
json object per entry instead of an json array.

Includes a vendor of c/common@main since it requires a fix from there as
well.

This matches docker compat.
Fixes #16436

Signed-off-by: Paul Holzinger [email protected]

Does this PR introduce a user-facing change?

Fix a bug with the `--format {{ json .}}` option which resulted in different output compared to docker.

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/release-note-label-needed Enforce release-note requirement, even if just None labels Nov 8, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 8, 2022

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 8, 2022
@rhatdan rhatdan changed the title fix --format {{json .}} output to match docker [WIP] fix --format {{json .}} output to match docker Nov 8, 2022
@rhatdan rhatdan changed the title [WIP] fix --format {{json .}} output to match docker fix --format {{json .}} output to match docker Nov 8, 2022
@rhatdan
Copy link
Member

rhatdan commented Nov 8, 2022

common patch has been merged upstream.

@Luap99
Copy link
Member Author

Luap99 commented Nov 8, 2022

common patch has been merged upstream.

Yes and this was wrong, as you can see the tests are failing here.

@mheon
Copy link
Member

mheon commented Nov 8, 2022

LGTM as soon as the issues with c/common are worked out

@Luap99 Luap99 force-pushed the format-json branch 2 times, most recently from 8fd8b65 to f88956d Compare November 8, 2022 18:13
`--format json` should not be the same as `--format {{json .}}`, the
later should actually run through the go template and thus create one
json object per entry instead of an json array.

Includes a vendor of c/common@main since it requires a fix from there as
well.

This matches docker compat.
Fixes containers#16436

Signed-off-by: Paul Holzinger <[email protected]>
@Luap99 Luap99 marked this pull request as ready for review November 9, 2022 17:00
@openshift-ci openshift-ci bot added release-note and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/release-note-label-needed Enforce release-note requirement, even if just None labels Nov 9, 2022
@umohnani8
Copy link
Member

LGTM

@baude
Copy link
Member

baude commented Nov 11, 2022

/lgtm

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling inspect with a {{json .}} template doesn't unwrap the object
6 participants