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

[Discussion] Names history support for images #4566

Closed
2 tasks done
saschagrunert opened this issue Nov 26, 2019 · 10 comments · Fixed by #4568
Closed
2 tasks done

[Discussion] Names history support for images #4566

saschagrunert opened this issue Nov 26, 2019 · 10 comments · Fixed by #4568
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@saschagrunert
Copy link
Member

saschagrunert commented Nov 26, 2019

Since containers/storage#422 is merged I'd like to discuss how we would like to add this feature to libpod. Basically, we now have the information at hand which names an image had in the past (due to retag or untag), which allows two new use cases:

  • Provide more information than the name <none> if a image got untagged
  • Undo an image tag operation

Do we want to add an additional column to podman images, like PREVOUS NAMES?
Do we want to fallback to the names history if the image name would be <none>?

@vrothberg
Copy link
Member

Do we want to add an additional column to podman images, like PREVOUS NAMES?

Sounds good to me, but I would make it conditional via a CLI flag (--previous-names or --history etc.). Currently, the podman-images output is small enough to fit into a standard terminal size. Printing previous names by default, however, can lead to situations where a single image can render the output unreadable.

Do we want to fallback to the names history if the image name would be <none>?

I would not change existing semantics/behavior.

@mheon
Copy link
Member

mheon commented Nov 26, 2019

Agree with Valentin here

@rhatdan
Copy link
Member

rhatdan commented Nov 26, 2019

--no-trunc could be modified to handle this.

@vrothberg
Copy link
Member

--no-trunc could be modified to handle this.

That would imply that we display a PREVOUS NAMES column by default which I wouldn't like to do for the aforementioned reasons - it would still clutter the current output.

@rhatdan
Copy link
Member

rhatdan commented Nov 26, 2019

I was thinking of using REPOs or TAGS for this.
Something like

podman images --no-trunc
REPOSITORY                        TAG    IMAGE ID                                                                CREATED       SIZE
<none>,docker.io/library/fedora   <none> sha256:a2e245db8bd33174f8fe8cdeed17136905f76b789039ae42e455aabf6dc6d135 5 weeks ago   5.82 MB

@saschagrunert
Copy link
Member Author

I saw that there is some name preservation on image tagging: https://github.com/containers/libpod/blob/c2dfef544476dba671db3ef65b095da9ec18bbf1/libpod/image/image.go#L537-L544

that's also why the Names field is a slice 🤔

...I'll spin up a PR in the next minutes, let's discuss the implementation details there. 👍

@vrothberg
Copy link
Member

Please wait before investing time. I like Dan's proposal but it would display wrong names as those are not valid references anymore.

@vrothberg
Copy link
Member

Please wait before investing time. I like Dan's proposal but it would display wrong names as those are not valid references anymore.

It might also break existing users parsing the output.

@saschagrunert
Copy link
Member Author

Please wait before investing time. I like Dan's proposal but it would display wrong names as those are not valid references anymore.

Too late, I already spent time on this. 💚

It might also break existing users parsing the output.

That was my concern too.

@rhatdan
Copy link
Member

rhatdan commented Nov 27, 2019

I am fine with the --history flag and the way you are doing it now. After playing with the Buildah version, I like this.

@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 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants