Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

thaJeztah
Copy link
Member

@codecov-commenter
Copy link

codecov-commenter commented Apr 20, 2023

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
Member Author

/cc @cpuguy83 @akerouanton @felipecruz91 ptal

@thaJeztah thaJeztah force-pushed the volumes_prune_all branch 2 times, most recently from 01f2f71 to bc52fb2 Compare April 20, 2023 13:14
Copy link

@felipecruz91 felipecruz91 left a comment

Choose a reason for hiding this comment

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

LGTM

cli/command/volume/prune.go Outdated Show resolved Hide resolved
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

updated; PTAL

@thaJeztah
Copy link
Member Author

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
Contributor

tianon commented Apr 20, 2023

A backport to 23.x sounds sane to me 😅

@cpuguy83
Copy link
Collaborator

Backport also SGTM.

@cpuguy83 cpuguy83 merged commit 26a7357 into docker:master Apr 20, 2023
@thaJeztah thaJeztah deleted the volumes_prune_all branch April 20, 2023 22:09
Copy link
Collaborator

@albers albers left a comment

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.

Closes docker#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.

Closes docker#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 free to 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