Skip to content

Prune summary should not include layers and configs from prune list which also appear in keep list #14

@whatsacomputertho

Description

@whatsacomputertho

Overview

Currently we compute the size of the images being pruned independently of the size of the images being kept. This does not account for potentially shared layer & config digests between the images being pruned and the images being kept. We should consider refactoring the logic so that we check the layer & config size maps of the images being kept for any digests matching those which appear in the layer & config size maps of the images being pruned. If there are matches, those digests should be dropped from the prune size maps.

This demo serves as an example

The one image being pruned shares the same base layers as all the others, with a slight variation in one of its smaller layers. Yet the size calculation shows that pruning this image will free nearly all the space that is taken up by the images which will be kept. This is clearly wrong.

Acceptance

  • Shared layers between the keep & prune list are removed from the prune size calculation
  • The above demo scenario (see test-setup) is recreated with correct logic

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions