Skip to content

Commit

Permalink
Warn if we are deleting an incomplete layer
Browse files Browse the repository at this point in the history
... to help diagnosing later possible broken references
to this layer; compare #1136 .

Signed-off-by: Miloslav Trmač <[email protected]>
  • Loading branch information
mtrmac committed Feb 21, 2022
1 parent 765d5b3 commit d6b1a49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions layers.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ func (r *layerStore) Load() error {
layer.Flags = make(map[string]interface{})
}
if layerHasIncompleteFlag(layer) {
logrus.Warnf("Found incomplete layer %#v, deleting it", layer.ID)
err = r.deleteInternal(layer.ID)
if err != nil {
break
Expand Down

0 comments on commit d6b1a49

Please sign in to comment.