-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Json output of podman ps lacks a human-readable time of creation #6594
Comments
Interested in opening a PR to fix this issue? |
Yeah, sure. I'll do it when I can. |
this is already fixed upstream in master. closing ....
|
Ah! I just realized that the output you're mentioning ^ is from Before V2 the key I'll try to put together a PR. |
Snipper of conversation with @baude on IRC:
I spent some time hacking on the code of listing of images + containers (commands
So my question here is, how this should be handled. Either do it the way it is done in EDIT: Based on @baude's answer on IRC I'd say the approach in |
What I was trying to express is that JSON is not typically meant for human consumption. Given that you are ingesting this straight into go, a conversion should be trivial. Whereas having it human readable makes the conversion more difficult and loses precision. |
Toolbox consumes the JSON emitted by Podman. Whenever the JSON changes in subtly incompatible ways it breaks something. eg., when the Similarly, in this case about We can handle things by adding version checks and otherwise adjusting the Toolbox code, but in general it would be nice if the JSON didn't keep changing. |
this is a major version change hence our excuse to do so. |
submit a pr, we can review it |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Json output of
podman ps
lacks a field with a human-readable time of the creation of the container. This string used to be (in Podman V1) in theCreated
field and the time used to be in theCreatedAt
field.From looking at the code the json-formated output is printed before the string is created (the string in fact is created but only for the default output).
Steps to reproduce the issue:
podman ps -a --format json
(Podman V2)podman ps -a --format json
(Podman V1)Describe the results you received:
Json-formated info about a container without a field with a human-readable time of creation.
Describe the results you expected:
Json-formated info about a container with a field with a human-readable time of creation.
Additional information you deem important (e.g. issue happens only occasionally):
Part of output of
podman ps -a --format json
withpodman-1.9.3-1.fc31.x86_64
:Part of output of
podman ps -a --format json
withpodman-2.0.0-rc5.fc32.x86_64
:Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):
Fedora Silverblue 32
The text was updated successfully, but these errors were encountered: