Skip to content
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

Fix prune --filter until=<duration> option #1252

Merged
merged 2 commits into from
Aug 8, 2022

Conversation

jedevc
Copy link
Collaborator

@jedevc jedevc commented Aug 2, 2022

Fixes #400.
Fixes moby/moby#43734

Previously, when specifying the filter option with the until value, no cache would be cleaned, preventing users from clearing by time. This bug arises from passing the until field through into buildkit, where, on filtering, a non-existent field returns false for a match.

The fix is simple, as we build up our list of filters to pass to buildkit, we skip over the until key, so create a valid list of filters for buildkit.

Previously, when specifying the filter option with the until value, no
cache would be cleaned, preventing users from clearing by time. This bug
arises from passing the until field through into buildkit, where, on
filtering, a non-existent field returns false for a match.

The fix is simple, as we build up our list of filters to pass to
buildkit, we skip over the until key, so create a valid list of filters
for buildkit.

Signed-off-by: Justin Chadwell <me@jedevc.com>
@crazy-max
Copy link
Member

Would also close moby/moby#43734 (cc @thaJeztah)

@crazy-max crazy-max added this to the v0.9.0 milestone Aug 3, 2022
commands/prune.go Outdated Show resolved Hide resolved
Signed-off-by: Justin Chadwell <me@jedevc.com>
@thaJeztah
Copy link
Member

Would also close moby/moby#43734 (cc @thaJeztah)

thx! Thinking of that; do you recall if only docker builder prune was affected, or also docker system prune? (As this is a client-side change only)

@crazy-max
Copy link
Member

@thaJeztah Yes only builder prune

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker builder prune no longer respects --filters --filter "until=24h" not working
4 participants