docs: list available filters for du and prune commands #3392
+93
−24
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.
follow-up:
--format=json
forbuildx du --verbose
#3367 (comment)fixes #1922
Currently we have filters for the following keys: https://github.com/moby/buildkit/blob/3d43066f2e814d4d10383ba871256245edf08a25/cache/manager.go#L1641-L1659
Key
type
can be one of: https://github.com/moby/buildkit/blob/3d43066f2e814d4d10383ba871256245edf08a25/client/diskusage.go#L81-L88We also have the
until
key that is used on client side to setKeepDuration
for prune info request:buildx/commands/prune.go
Lines 190 to 243 in 3f4bf82
We are using containerd module to parse filters: https://github.com/containerd/containerd/blob/7d8765d440e4991a7d005db19e7873651ce3551d/pkg/filters/parser.go#L26-L49