Remove two GetImages functions from API#12572
Conversation
64a53ac to
66aef6f
Compare
|
@jwhonce @flouthoc Looks like their is something special in the Docker API for handling dangling images. I went through the code to make sure libpod, docker-compat and local all use the same code paths. podman --remote images -a Are all passing exactly the same params and back the same content, but podman lists the images but the docker client does not. Any ideas? |
jwhonce
left a comment
There was a problem hiding this comment.
Compatibility needs to be doubled checked, missing call that populated/formatted fields.
There was a problem hiding this comment.
By skipping the call to ImageToImageSummary:
ImageSummary.VirtualSizewill be incorrect.- It appears
IDwill no longer be prefixed withsha256: ImageSummary.RepoDigestswill no longer be formatted rather the raw data will be returned.- ...
There was a problem hiding this comment.
I have fixed the sha256.
VirtualSize seems to be the same between the two calls. (It is always just size).
I switched libpod output for RepoDigests to match Dockers.
I did not see any others.
There was a problem hiding this comment.
For compat api we were ignoring manifest list I think merging this with common code would start printing manifest lists as well.
I have only looked at the code yet. But I'll need to try this out inoder to make it sure that we are not breaking any existing behavior.
There was a problem hiding this comment.
This filter
filterList = append(filterList, "manifest=false")
Should remove all manifest images for the DockerAPI.
01099cb to
8598899
Compare
|
@vrothberg PTAL at the error. In current podman we get an image named With the latest containers/common we get I think the second option looks correct, and we should fix the pull_test.go code, but want to verify with you. |
|
@rhatdan, I agree that the second one is correct. I should have check the tests in Podman and Buildah after it has merged. I will re-apply the PR in c/common and then open PRs in Podman/Buildah. |
|
@containers/podman-maintainers PTAL |
There was a problem hiding this comment.
@Luap99 I think these are dangling images from multistage builds. I dont think API should return these. But I can check what docker is returning.
There was a problem hiding this comment.
I mean the change should be removed, see containers/common@134e83f
@vrothberg fixed the problem in c/common so this is no longer needed
There was a problem hiding this comment.
Ah i see. Fair if that is fixed in upstream then check could be removed.
There was a problem hiding this comment.
Yes, that's not needed anymore.
There was a problem hiding this comment.
Yes, that's not needed anymore.
There was a problem hiding this comment.
Please remove the change here and also remove the filterPrefix function above
There was a problem hiding this comment.
We are blocking double duplicate filters. So if it has containers=external from some were else, then we don't want to add it again.
There was a problem hiding this comment.
@vrothberg fixed this in c/common see the comments above, you have to rebase this to get the latest common
|
Could you touch up the title plase @rhatdan? I think you meant "two", not "to". |
a759ee4 to
c3d779d
Compare
There was a problem hiding this comment.
This the same check where @Luap99 raised concern before. If this is handled by c/common then we might not need it. But I don't think there is any blocker if we are checking for duplicates.
so LGTM
There was a problem hiding this comment.
Yes, the dangling-logic can/should be removed.
There was a problem hiding this comment.
The dangling check is looking for dupicates. This function can be called in multiple different ways. And certain code paths and Remote API can pass in a filter with dangling=true already set, which ends up adding the dangling=true, which I am trying to prevent. If you are suggesting the common defaults to dangling=true?
There was a problem hiding this comment.
The code in question was added to work around the duplicate checks in c/common. In the meantime, c/common accepts duplicates as long as they use the same value, so we don't need the custom check here anymore.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold till @vrothberg @Luap99 confirm. |
[NO NEW TESTS NEEDED] This is just code cleanup. The remote API has three different GetImages functions, which I believe can be handled by just one function. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
|
@vrothberg @Luap99 Mergeme. |
|
/lgtm |
|
/hold cancel |
[NO NEW TESTS NEEDED] This is just code cleanup.
The remote API has three different GetImages functions, which I believe
can be handled by just one function.
Signed-off-by: Daniel J Walsh dwalsh@redhat.com
What this PR does / why we need it:
How to verify it
Which issue(s) this PR fixes:
Special notes for your reviewer: