Convert DanglingOnly to Filters for docker image prune#28535
Convert DanglingOnly to Filters for docker image prune#28535vdemeester merged 1 commit intomoby:masterfrom
docker image prune#28535Conversation
|
SGTM It would be great if we can support --until="5min ago" as well. Also it would be great if we can have support for network (another PR) |
|
Should we use |
|
/cc @mlaventure |
|
IMO we should have both filter and until for CLI, but for API, we only need filter. |
|
I do agree with @thaJeztah, it's the same as |
|
SGTM, current prune has not been very useful for CI machines so far, really want prune by age for that use case. |
|
I'm with @vdemeester and @thaJeztah can we have a |
|
Thanks all. Let me update the PR based on the comments. |
|
I noticed that currently, However, if we takes a filter, then this field could very well be replaced with Should we convert |
|
@yongtang sure, why not. |
|
Would |
|
@thaJeztah both should work. Currently danglingOnly default to true and |
6d2d708 to
778d074
Compare
|
The PR has been updated. Now the |
There was a problem hiding this comment.
nit: how about Filters: pruneFilters
cli/command/container/prune.go
Outdated
cli/command/system/prune.go
Outdated
There was a problem hiding this comment.
Let's dedup this "all vs dangling" logic
cli/command/system/prune.go
Outdated
cli/command/system/prune.go
Outdated
There was a problem hiding this comment.
can you support filter for volume and network as well?
(can be another PR)
cli/command/image/prune.go
Outdated
There was a problem hiding this comment.
I think we don't need to deprecate the --all CLI option, because it is short and easy to use
There was a problem hiding this comment.
I also vote to keep --all
Since 1.13 has been already freezed, I do think the 1.13
1.14
WDYT? |
|
I know we've frozen the branch yet, but I think i'd rather we make an exception and replace |
|
Agree with @AkihiroSuda and @mlaventure (discussed briefly with @AkihiroSuda earlier today). It's not released yet, so we can still modify. It's better done now, than having to officially deprecate / change after release |
|
Thanks all for the review. I am also in favor of replacing I will update the PR based on the comments shortly. |
778d074 to
d259199
Compare
03c8104 to
5426403
Compare
This fix convert DanglingOnly in ImagesPruneConfig to Filters, so that it is possible to maintain API compatibility in the future. Several integration tests have been added to cover changes. This fix is related to 28497. A follow up to this PR will be done once this PR is merged. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
5426403 to
a6be56b
Compare
This fix is a follow up for comment moby#28535 (comment) This fix provides `--filter until=<timestamp>` for `docker container/image prune`. This fix adds `--filter until=<timestamp>` to `docker container/image prune` so that it is possible to specify a timestamp and prune those containers/images that are earlier than the timestamp. Related docs has been updated Several integration tests have been added to cover changes. This fix fixes moby#28497. This fix is related to moby#28535. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Convert DanglingOnly to Filters for `docker image prune`
Convert DanglingOnly to Filters for `docker image prune`
This fix is a follow up for comment moby/moby#28535 (comment) This fix provides `--filter until=<timestamp>` for `docker container/image prune`. This fix adds `--filter until=<timestamp>` to `docker container/image prune` so that it is possible to specify a timestamp and prune those containers/images that are earlier than the timestamp. Related docs has been updated Several integration tests have been added to cover changes. This fix fixes #28497. This fix is related to #28535. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Upstream-commit: e2416af0136b72d369de53ff7928d7cc603d4f46 Component: cli
This fix is a follow up for comment moby/moby#28535 (comment) This fix provides `--filter until=<timestamp>` for `docker container/image prune`. This fix adds `--filter until=<timestamp>` to `docker container/image prune` so that it is possible to specify a timestamp and prune those containers/images that are earlier than the timestamp. Related docs has been updated Several integration tests have been added to cover changes. This fix fixes #28497. This fix is related to #28535. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Upstream-commit: 337483496b355b61d3aa4fd4b4f4853e59be646a Component: cli
This fix is a follow up for comment moby/moby#28535 (comment) This fix provides `--filter until=<timestamp>` for `docker container/image prune`. This fix adds `--filter until=<timestamp>` to `docker container/image prune` so that it is possible to specify a timestamp and prune those containers/images that are earlier than the timestamp. Related docs has been updated Several integration tests have been added to cover changes. This fix fixes #28497. This fix is related to #28535. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Upstream-commit: fdd6879b68d2587d1c88282a9b5e2da6566af25d Component: cli
This fix is a follow up for comment moby/moby#28535 (comment) This fix provides `--filter until=<timestamp>` for `docker container/image prune`. This fix adds `--filter until=<timestamp>` to `docker container/image prune` so that it is possible to specify a timestamp and prune those containers/images that are earlier than the timestamp. Related docs has been updated Several integration tests have been added to cover changes. This fix fixes #28497. This fix is related to #28535. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
|
Hi, I'm very very sorry in advance for this newbie question 😬, but I can't understand the definition of The usage of the words only and all brings my confusion. I'd expect to read something like this (if my understanding is correct): Or: Or: By the way, which is the default value for Thanks in advance for your help! My apologies if these questions are duplicated (I couldn't find them elsewhere). |
- What I did
This fix is part of fix for #28497
This fix convert DanglingOnly in ImagesPruneConfig to Filters, so that it is possible to maintain API compatibility in the future.
A follow up to this PR will be done once this PR is merged.
- How I did it
- How to verify it
Several integration tests have been added to cover changes.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
This fix is related to #28497.
Signed-off-by: Yong Tang yong.tang.github@outlook.com