Add support for reference query param in List Images#1941
Merged
eddumelendez merged 5 commits intomasterfrom Oct 6, 2022
Merged
Add support for reference query param in List Images#1941eddumelendez merged 5 commits intomasterfrom
reference query param in List Images#1941eddumelendez merged 5 commits intomasterfrom
Conversation
`filter` query param was removed in Docker API 1.41. Using `reference` query param will allow to use format <image-name>[:<tag>].
bsideup
reviewed
Sep 10, 2022
bsideup
reviewed
Sep 10, 2022
| * | ||
| * @param reference string in the form {@code <image-name>[:<tag>]} | ||
| */ | ||
| ListImagesCmd withReferenceFilter(String reference); |
Member
There was a problem hiding this comment.
Thinking out loud: should we add withFilter(String name, Collection<String> value) and make these methods default implementations that would call it?
Contributor
There was a problem hiding this comment.
What is the reason for having it as a default method rather than in the Impl class? Binary compatibility if there are implementations of ListImagesCmd by users out there?
Member
Author
There was a problem hiding this comment.
This is a good point to not break existing implementations. However, FiltersBuilder belongs to the core module, not the api
kiview
approved these changes
Sep 28, 2022
bsideup
reviewed
Sep 28, 2022
| List<Image> images = dockerRule.getClient().listImagesCmd().withReferenceFilter("docker-java/busybox") | ||
| .exec(); | ||
| assertThat(images, hasSize(1)); | ||
| dockerRule.getClient().removeImageCmd("docker-java/busybox:" + tag).exec(); |
Member
There was a problem hiding this comment.
Should be in finally block here and listImagesWithFilter
Member
Author
There was a problem hiding this comment.
this one should too, right?
This file contains hidden or 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
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.
filterquery param was removed in Docker API 1.41. Usingreferencequery param will allow to use format
<image-name>[:<tag>].