-
Notifications
You must be signed in to change notification settings - Fork 495
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
protobuf: remove gogoproto #2713
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,12 +22,13 @@ import ( | |
) | ||
|
||
type pruneOptions struct { | ||
builder string | ||
all bool | ||
filter opts.FilterOpt | ||
keepStorage opts.MemBytes | ||
force bool | ||
verbose bool | ||
builder string | ||
all bool | ||
filter opts.FilterOpt | ||
minStorage opts.MemBytes | ||
maxStorage opts.MemBytes | ||
force bool | ||
verbose bool | ||
} | ||
|
||
const ( | ||
|
@@ -106,7 +107,7 @@ func runPrune(ctx context.Context, dockerCli command.Cli, opts pruneOptions) err | |
return err | ||
} | ||
popts := []client.PruneOption{ | ||
client.WithKeepOpt(pi.KeepDuration, opts.keepStorage.Value()), | ||
client.WithKeepOpt(pi.KeepDuration, opts.minStorage.Value(), opts.maxStorage.Value(), 0), | ||
client.WithFilter(pi.Filter), | ||
} | ||
if opts.all { | ||
|
@@ -148,10 +149,14 @@ 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.keepStorage, "keep-storage", "Amount of disk space to keep for cache") | ||
flags.Var(&options.minStorage, "min-storage", "Minimum 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. This part needs updates based on moby/buildkit#5359 Not a blocker but need to make sure we don't ship this version. |
||
flags.Var(&options.maxStorage, "max-storage", "Maximum amount of disk space 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.MarkDeprecated("keep-storage", "keep-storage flag has been changed to max-storage") | ||
|
||
return cmd | ||
} | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
This is meant to be file size. We also should probably increase the limit (in a different PR).
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.
#2716