Add reference filter and deprecated filter param…#27872
Conversation
|
design LGTM |
dc77d9f to
3b052b2
Compare
|
All right, so I need to update the PR code to re-use path instead of the reference package 😓 |
|
@vdemeester Might be worthwhile to bolster the This has use in scope-matching and other applications. |
3b052b2 to
3208c24
Compare
3208c24 to
dd91673
Compare
vdemeester
left a comment
There was a problem hiding this comment.
Updated, than should fix the build but I have a question 👼
reference/reference.go
Outdated
There was a problem hiding this comment.
The lines below are to keep the current behaviour, not sure I like that… We might want to implement supporting foo/**/[ai]:ta* and keep the current behavior in images.go 👼 @stevvooe wdyt ?
There was a problem hiding this comment.
First, we should implement this in the upstream distribution package. These packages keep diverging and it is extremely disappointing.
As far as support goes, we should support globbing over any of the reference types.
There was a problem hiding this comment.
First, we should implement this in the upstream distribution package. These packages keep diverging and it is extremely disappointing.
❤️
reference/reference.go
Outdated
There was a problem hiding this comment.
Does this need to use ref.String()?
There was a problem hiding this comment.
If we want to support globbing over any of the reference types, yes we should do that.
reference/reference_test.go
Outdated
There was a problem hiding this comment.
The globbing in golang's stdlib doesn't support ** for multi-component match. This case is still valid but this pattern will only match foo/a/ba[rz], not foo/a/b/ba[rz]. I don't think we need to do more for this PR.
dd91673 to
4a872fe
Compare
|
Updated and depends on distribution/distribution#2039 👼 |
ee89d27 to
d66e676
Compare
d66e676 to
9220755
Compare
9220755 to
7883d0c
Compare
|
@vdemeester Should be unblocked, now! |
7883d0c to
6f3f4f6
Compare
|
@stevvooe It is, PR rebased 👼 |
cpuguy83
left a comment
There was a problem hiding this comment.
LGTM
Glad to see this one go.
There was a problem hiding this comment.
Minor minor nit, but store the value of the filter field instead of getting it twice.
… for `docker images`. This deprecates the `filter` param for the `/images` endpoint and make a new filter called `reference` to replace it. It does change the CLI side (still possible to do `docker images busybox:musl`) but changes the cli code to use the filter instead (so that `docker images --filter busybox:musl` and `docker images busybox:musl` act the same). Signed-off-by: Vincent Demeester <[email protected]>
6f3f4f6 to
820b809
Compare
|
LGTM |
|
ping @AkihiroSuda; |
| - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) | ||
| - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) | ||
| - **filter** - only return images with the specified name | ||
| - `reference`=(`<image-name>[:<tag>]`) |
There was a problem hiding this comment.
@vdemeester can you do a follow up PR to;
- add a line to the API changes; https://github.com/docker/docker/blob/master/docs/reference/api/docker_remote_api.md#v125-api-changes
- maybe add a note to the API reference about the deprecated option
There was a problem hiding this comment.
Yep I will do a followup for the docs 😉
|
@thaJeztah ah, it is discussed in #27938 I will try to find the solution ASAP.. |
|
@AkihiroSuda ah! yes, no problem, just wanted to let you know 😄 |
Add reference filter and deprecated filter param…
Add reference filter and deprecated filter param for
/images/json– it was a little bit too confusing for me betweenfilterandfilters.This deprecates the
filterparam for the/images/jsonendpoint and make a new filter calledreferenceto replace it. It does change the CLI side (still possible to dodocker images busybox:musl) but changes the cli code to use the filter instead (so thatdocker images --filter reference=busybox:muslanddocker images busybox:muslact the same)./cc @thaJeztah @cpuguy83 @tiborvass @stevvooe
🐸
Signed-off-by: Vincent Demeester [email protected]