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 23, 2022
1 parent 76b5317 commit 5654974
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 5654974

Please sign in to comment.