Merge pull request #1529 from tonistiigi/migrate-fix
cache: avoid snapshot migration on shallow refsv0.8
commit
df35e9818d
|
@ -205,6 +205,8 @@ func MigrateV2(ctx context.Context, from, to string, cs content.Store, s snapsho
|
|||
|
||||
// remove old root labels
|
||||
for _, item := range byID {
|
||||
em := getEqualMutable(item)
|
||||
if em == "" {
|
||||
if _, err := s.Update(ctx, snapshots.Info{
|
||||
Name: getSnapshotID(item),
|
||||
}, "labels.containerd.io/gc.root"); err != nil {
|
||||
|
@ -221,6 +223,7 @@ func MigrateV2(ctx context.Context, from, to string, cs content.Store, s snapsho
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// previous implementation can leak views, just clean up all views
|
||||
err = s.Walk(ctx, func(ctx context.Context, info snapshots.Info) error {
|
||||
|
|
Loading…
Reference in New Issue