mirror of
https://github.com/moby/buildkit.git
synced 2026-06-24 08:47:57 +00:00
The first default GC policy is meant to prune the most easily
reproducible cache (local sources, cache mounts, git checkouts) once it
exceeds 512MB and has not been used for 48h. Its filter was written as a
single comma-joined string:
"type==source.local,type==exec.cachemount,type==source.git.checkout"
Each element of the Filters slice is passed to
containerd/filters.ParseAll, where commas within one string are ANDed
together. A record only ever has a single type, so the AND can never be
satisfied: this policy matched nothing and was effectively a no-op.
Split the filter into separate slice elements so they are ORed, matching
the documented intent and the array form already used in user
buildkitd.toml configs.
Signed-off-by: ZRHann <zrhann@foxmail.com>