Skip to content

Conversation

@crazy-max
Copy link
Member

fixes #851

Add --inactive to 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]

commands/rm.go Outdated
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")
Copy link
Member

Choose a reason for hiding this comment

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

I prefer all-inactive that makes it clear that this is a different mode

Copy link
Member Author

Choose a reason for hiding this comment

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

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 du
  • docker buildx prune > docker buildx cache prune
  • docker buildx rm --all-inactive > docker buildx prune

Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Using prune for 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.

👍

@crazy-max crazy-max changed the title cli: add --inactive for rm command cli: add --all-inactive for rm command Dec 17, 2021
@crazy-max crazy-max marked this pull request as ready for review December 17, 2021 15:06
@crazy-max
Copy link
Member Author

PTAL @tonistiigi @errordeveloper

@crazy-max crazy-max added this to the v0.8.0 milestone Jan 26, 2022
@tonistiigi tonistiigi merged commit 5952857 into docker:master Feb 4, 2022
@crazy-max crazy-max deleted the rm-inactive branch February 4, 2022 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add buildx rm --all-inactive

3 participants