-
Notifications
You must be signed in to change notification settings - Fork 503
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
hack: generate vtproto files for buildx #2724
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,13 +22,14 @@ import ( | |
) | ||
|
||
type pruneOptions struct { | ||
builder string | ||
all bool | ||
filter opts.FilterOpt | ||
minStorage opts.MemBytes | ||
maxStorage opts.MemBytes | ||
force bool | ||
verbose bool | ||
builder string | ||
all bool | ||
filter opts.FilterOpt | ||
reservedSpace opts.MemBytes | ||
maxUsedSpace opts.MemBytes | ||
minFreeSpace opts.MemBytes | ||
force bool | ||
verbose bool | ||
} | ||
|
||
const ( | ||
|
@@ -107,7 +108,7 @@ func runPrune(ctx context.Context, dockerCli command.Cli, opts pruneOptions) err | |
return err | ||
} | ||
popts := []client.PruneOption{ | ||
client.WithKeepOpt(pi.KeepDuration, opts.minStorage.Value(), opts.maxStorage.Value(), 0), | ||
client.WithKeepOpt(pi.KeepDuration, opts.reservedSpace.Value(), opts.maxUsedSpace.Value(), opts.minFreeSpace.Value()), | ||
client.WithFilter(pi.Filter), | ||
} | ||
if opts.all { | ||
|
@@ -149,12 +150,13 @@ func pruneCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command { | |
flags := cmd.Flags() | ||
flags.BoolVarP(&options.all, "all", "a", false, "Include internal/frontend images") | ||
flags.Var(&options.filter, "filter", `Provide filter values (e.g., "until=24h")`) | ||
flags.Var(&options.minStorage, "min-storage", "Minimum amount of disk space to keep for cache") | ||
flags.Var(&options.maxStorage, "max-storage", "Maximum amount of disk space to keep for cache") | ||
flags.Var(&options.reservedSpace, "reserved-space", "Amount of disk space always allowed to keep for cache") | ||
flags.Var(&options.minFreeSpace, "min-free-space", "Target amount of free disk space after pruning") | ||
flags.Var(&options.maxUsedSpace, "max-used-space", "Maximum amount of disk space allowed to keep for cache") | ||
flags.BoolVar(&options.verbose, "verbose", false, "Provide a more verbose output") | ||
flags.BoolVarP(&options.force, "force", "f", false, "Do not prompt for confirmation") | ||
|
||
flags.Var(&options.maxStorage, "keep-storage", "Amount of disk space to keep for cache") | ||
flags.Var(&options.reservedSpace, "keep-storage", "Amount of disk space to keep for cache") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There is no problem with both using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
But if one flag is set with one value and second with another then it is not correct. |
||
flags.MarkDeprecated("keep-storage", "keep-storage flag has been changed to max-storage") | ||
|
||
return cmd | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Do these need a deprecation as well?
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.
No, these were never in a release.