Skip to content

du: honor until and unused-for age filters - #4223

Open
crazy-max wants to merge 2 commits into
docker:masterfrom
crazy-max:fix-du-until
Open

crazy-max wants to merge 2 commits into
docker:masterfrom
crazy-max:fix-du-until

Conversation

@crazy-max

Copy link
Copy Markdown
Member

Pass the parsed until duration to BuildKit's DiskUsage API so docker buildx du --filter until=24h excludes recently used cache records. Previously, the duration was parsed but discarded before the API call, silently ignoring the age filter. This also fixes the deprecated unused-for alias.

This carries forward the original commit from #4221, simplifies the option handling, and strengthens the integration test to verify that both age filters exclude fresh cache when combined with a type filter. The focused parser tests and integration test with the remote worker pass.

Signed-off-by: Sami Chergui <83331159+Yshuro@users.noreply.github.com>
Pass the parsed age limit directly to DiskUsage instead of introducing a
single-use option helper.

Verify that fresh local-source cache is present before filtering and excluded
by both until and unused-for. Combine each age filter with a type filter so
the integration test catches dropped age limits and checks filter composition.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make docker buildx du pass the until filter as a DiskUsage age limit

2 participants