Skip to content

volumes: prune: add --all / -a option - #4218

Merged
cpuguy83 merged 1 commit into
docker:masterfrom
thaJeztah:volumes_prune_all
Apr 20, 2023
Merged

volumes: prune: add --all / -a option#4218
cpuguy83 merged 1 commit into
docker:masterfrom
thaJeztah:volumes_prune_all

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

@codecov-commenter

codecov-commenter commented Apr 20, 2023

Copy link
Copy Markdown

Codecov Report

Merging #4218 (0dec5d2) into master (d4f2609) will increase coverage by 0.00%.
The diff coverage is 71.42%.

Additional details and impacted files
@@ Coverage Diff @@## master #4218 +/- ##
=======================================
Coverage 58.86% 58.86% =======================================
Files 572 572 Lines 49544 49572 +28 =======================================
+ Hits 29162 29182 +20 - Misses 18616 18624 +8 
Partials 1766 1766 

@thaJeztah

Copy link
Copy Markdown
MemberAuthor

Comment threadcli/command/volume/prune.go
@thaJeztah
thaJeztahforce-pushed the volumes_prune_all branch 2 times, most recently from 01f2f71 to bc52fb2CompareApril 20, 2023 13:14
Comment threadcontrib/completion/zsh/_docker Outdated

@felipecruz91felipecruz91 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment threadcli/command/volume/prune.go Outdated
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah

Copy link
Copy Markdown
MemberAuthor

updated; PTAL

@thaJeztah

Copy link
Copy Markdown
MemberAuthor

I'm wondering if we should backport this one for 23.0. It's a new flag, but I think we really just forgot to add this flag to the CLI (and it was the original intent to add it, we just overlooked it).

Basically, I want to avoid users having to get used to --filter all=1 (only for it to become mostly "obsolete" after 23.0)

@tianon

Copy link
Copy Markdown
Contributor

A backport to 23.x sounds sane to me 😅

@cpuguy83

Copy link
Copy Markdown
Collaborator

Backport also SGTM.

@cpuguy83
cpuguy83 merged commit 26a7357 into docker:masterApr 20, 2023
@thaJeztah
thaJeztah deleted the volumes_prune_all branch April 20, 2023 22:09

@albersalbers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completion LGTM

edmorley added a commit to edmorley/docker-cli that referenced this pull request Aug 12, 2023
In previous versions of the Docker API, `system prune --volumes` and `volume prune`
would remove all dangling volumes. With API v1.42, this was changed so that only
anonymous volumes would be removed unless the all filter was specified.
Some of the docs were updated in docker#4218, however, there were a couple of places
left that didn't make the anonymous vs named volumes distinction clear.
This replaces docker#4079, which was bitrotted by docker#4218.
See also docker#4028.
Signed-off-by: Ed Morley <501702+edmorley@users.noreply.github.com>
edmorley added a commit to edmorley/docker-cli that referenced this pull request Aug 12, 2023
In previous versions of the Docker API, `system prune --volumes` and `volume prune`
would remove all dangling volumes. With API v1.42, this was changed so that only
anonymous volumes would be removed unless the all filter was specified.
Some of the docs were updated in docker#4218, however, there were a couple of places
left that didn't make the anonymous vs named volumes distinction clear.
This replaces docker#4079, which was bitrotted by docker#4218. See also docker#4028.
Closesdocker#4079.
Signed-off-by: Ed Morley <501702+edmorley@users.noreply.github.com>
thaJeztah pushed a commit to thaJeztah/cli that referenced this pull request Aug 25, 2023
In previous versions of the Docker API, `system prune --volumes` and `volume prune`
would remove all dangling volumes. With API v1.42, this was changed so that only
anonymous volumes would be removed unless the all filter was specified.
Some of the docs were updated in docker#4218, however, there were a couple of places
left that didn't make the anonymous vs named volumes distinction clear.
This replaces docker#4079, which was bitrotted by docker#4218. See also docker#4028.
Closesdocker#4079.
Signed-off-by: Ed Morley <501702+edmorley@users.noreply.github.com>
(cherry picked from commit 6e2e92d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
matt9ucci added a commit to matt9ucci/DockerCompletion that referenced this pull request Apr 8, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@thaJeztah@codecov-commenter@tianon@cpuguy83@albers@felipecruz91