cli: add --all-inactive for rm command#885
Merged
tonistiigi merged 1 commit intodocker:masterfrom Feb 4, 2022
Merged
Conversation
crazy-max
commented
Dec 14, 2021
crazy-max
commented
Dec 14, 2021
398314a to
a1dbc8a
Compare
tonistiigi
reviewed
Dec 17, 2021
| flags := cmd.Flags() | ||
| flags.BoolVar(&options.keepState, "keep-state", false, "Keep BuildKit state") | ||
| flags.BoolVar(&options.keepDaemon, "keep-daemon", false, "Keep the buildkitd daemon running") | ||
| flags.BoolVar(&options.inactive, "inactive", false, "Remove inactive builders") |
Member
There was a problem hiding this comment.
I prefer all-inactive that makes it clear that this is a different mode
Member
Author
There was a problem hiding this comment.
Agree but more generally I think the CLI has a confusing design for some commands. For example the following would make more sense:
docker buildx du>docker buildx cache dudocker buildx prune>docker buildx cache prunedocker buildx rm --all-inactive>docker buildx prune
Member
There was a problem hiding this comment.
Using prune for something other than build cache is quite confusing imho. Especially because it means completely different thing atm. For the possibility of cache subcommand we can discuss in another issue.
Member
Author
There was a problem hiding this comment.
Using
prunefor something other than build cache is quite confusing imho.
Yes can be confusing.
For the possibility of cache subcommand we can discuss in another issue.
👍
tonistiigi
reviewed
Dec 17, 2021
a1dbc8a to
519f73b
Compare
519f73b to
2f54a85
Compare
crazy-max
commented
Dec 17, 2021
8e3dcb7 to
90163ed
Compare
Member
Author
tonistiigi
reviewed
Jan 31, 2022
Signed-off-by: CrazyMax <[email protected]>
90163ed to
378f0b4
Compare
tonistiigi
approved these changes
Feb 4, 2022
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.
fixes #851
Add
--inactiveto be able to remove nodes that are not in running state. This will also remove builders that don't have any node left available after the process.Signed-off-by: CrazyMax [email protected]