-
Notifications
You must be signed in to change notification settings - Fork 611
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
Add builder prune --all and --force flag support #3316
Add builder prune --all and --force flag support #3316
Conversation
0f162db
to
320420c
Compare
cmd/nerdctl/builder.go
Outdated
msg string | ||
) | ||
|
||
if !options.All { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: might be slightly easier to read if you reverse this conditional, since we need to handle both cases anyway
This change adds support for builder prune --all and --force. A refactor of previous tests which used builder prune functionality was required to handle the new confirmation prompt. A test utility was added to handle this for reuse by current and future tests. Signed-off-by: Austin Vazquez <macedonv@amazon.com>
320420c
to
f5d1d6d
Compare
@@ -82,4 +82,6 @@ type BuilderPruneOptions struct { | |||
BuildKitHost string | |||
// All will remove all unused images and all build cache, not just dangling ones | |||
All bool | |||
// Force will not prompt for confirmation. | |||
Force bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this consumed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it ended up being used on the CLI side only, so not much reason to pass it to the package backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Description
This change adds support for builder prune
--all
and--force
. A refactorof previous tests which used builder prune functionality was required to
handle the new confirmation prompt. A test utility was added to handle
this for reuse by current and future tests.
Testing
From
containerd/nerdctl
:Next steps
builder du
implementation