One corrupt manifest should not wedge model operations (#7515)

One potential failure mode is an empty file which bubbles up as an EOF error,
leading to all pulls and listing operations failing.  Instead, continue and
warn about the corrupt manifest.  This also allows re-pulling the corrupt
manifest to repair the system.
This commit is contained in:
Daniel Hiltgen
2024-11-05 14:21:45 -08:00
committed by GitHub
parent 34a75102f7
commit a4c70fe157
5 changed files with 34 additions and 21 deletions

View File

@@ -106,7 +106,8 @@ func (l *Layer) Remove() error {
return nil
}
ms, err := Manifests()
// Ignore corrupt manifests to avoid blocking deletion of layers that are freshly orphaned
ms, err := Manifests(true)
if err != nil {
return err
}