-
Notifications
You must be signed in to change notification settings - Fork 265
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
chore: add isManifest function to determine a manifest #6707
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cdrage
requested review from
dgolovin and
axel7083
and removed request for
a team
April 8, 2024 13:47
cdrage
force-pushed
the
add-is-manifest
branch
2 times, most recently
from
April 8, 2024 14:00
b1df702
to
c497fcb
Compare
benoitf
reviewed
Apr 8, 2024
benoitf
reviewed
Apr 8, 2024
Switching to draft for two things:
You are right @benoitf with
So we have to make sure history is blank / does not exist as well. |
Updated and ready for review. Requires #6713 before merging.
|
TODO:
{
"Id": "ee301c921b8aadc002973b2e0c3da17d701dcd994b606769a7e6eaa100b81d44",
"ParentId": "",
"RepoTags": [
"docker.io/library/hello-world:latest"
],
"RepoDigests": [
"docker.io/library/hello-world@sha256:2d4e459f4ecb5329407ae3e47cbc107a2fbace221354ca75960af4c047b3cb13",
"docker.io/library/hello-world@sha256:53641cd209a4fecfc68e21a99871ce8c6920b2e7502df0a20671c6fccc73a7c6"
],
"Created": 1683046167,
"Size": 23301,
"SharedSize": 0,
"VirtualSize": 23301,
"Labels": null,
"Containers": 0,
"Names": [
"docker.io/library/hello-world:latest"
],
"Digest": "sha256:53641cd209a4fecfc68e21a99871ce8c6920b2e7502df0a20671c6fccc73a7c6",
"History": [
"docker.io/library/hello-world:latest"
]
} |
Ready for another review, test has been added 💯 |
### What does this PR do? Adds a guessIsManifest function to try and determine if an image is a manifest or not: - By checking the repotags and digests - Checking labels does not exist, as labels are not added when creating a manifest - VirtualSize is under 1MB as a manifest list is just text that points to other images We are unable to check the history (manifest commonly has no history) as Dockerode API does not support getting the history of the image. ### Screenshot / video of UI <!-- If this PR is changing UI, please include screenshots or screencasts showing the difference --> N/A ### What issues does this PR fix or reference? <!-- Include any related issues from Podman Desktop repository (or from another issue tracker). --> Closes containers#6690 ### How to test this PR? <!-- Please explain steps to verify the functionality, do not forget to provide unit/component tests --> - [X] Tests are covering the bug fix or the new feature Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
benoitf
approved these changes
Apr 8, 2024
1 task
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
still approving |
benoitf
reviewed
Apr 8, 2024
Co-authored-by: Florent BENOIT <fbenoit@redhat.com> Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
chore: add isManifest function to determine a manifest
What does this PR do?
Adds a guessIsManifest function to try and determine if an image is a
manifest or not:
a manifest
to other images
We are unable to check the history (manifest commonly has no history) as
Dockerode API does not support getting the history of the image.
Screenshot / video of UI
N/A
What issues does this PR fix or reference?
Closes #6690
How to test this PR?
Signed-off-by: Charlie Drage charlie@charliedrage.com