tilt-dev / tilt-dev/tilt

Docker prune should not attempt to prune in-use images

Open
#4,792 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
10.1k
Forks
413
Avg merge
1d 10h
Merged PRs (30d)
6

Description

In general, this doesn't cause problems because if the container is running, the image deletion will fail (and we suppress the log).

However, for scenarios where more aggressive pruning is desired, this complicates matters because you can't do something like keep_recent=0 (i.e. purge purely based on age) -- that will result in weird race conditions at start between Tilt trying to prune what could be the current version of the image, for example.

Even in the current approach, a long-running Tilt session could prune still active images, e.g. see #2644.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by locating the Docker prune implementation and the logic that selects images, then inspect any related tests. Done means pruning skips images in use without the startup or long-session races described here.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.