imagetools: remove temp workaround for fixed containerd bug
The issue has been fixed in containerd/containerd#12508 Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
@@ -203,11 +203,10 @@ func runCreate(ctx context.Context, dockerCli command.Cli, in createOptions, arg
|
||||
for _, t := range tags {
|
||||
eg.Go(func() error {
|
||||
return progress.Wrap(fmt.Sprintf("pushing %s", t.String()), pw.Write, func(sub progress.SubLogger) error {
|
||||
baseCtx := ctx
|
||||
ctx = withMediaTypeKeyPrefix(ctx)
|
||||
eg2, _ := errgroup.WithContext(ctx)
|
||||
for _, desc := range manifests {
|
||||
eg2.Go(func() error {
|
||||
ctx = withMediaTypeKeyPrefix(baseCtx)
|
||||
sub.Log(1, fmt.Appendf(nil, "copying %s from %s to %s\n", desc.Digest.String(), desc.Source.Ref.String(), t.String()))
|
||||
return r.Copy(ctx, desc.Source, t)
|
||||
})
|
||||
@@ -215,7 +214,6 @@ func runCreate(ctx context.Context, dockerCli command.Cli, in createOptions, arg
|
||||
if err := eg2.Wait(); err != nil {
|
||||
return err
|
||||
}
|
||||
ctx = withMediaTypeKeyPrefix(ctx) // because of containerd bug this needs to be called separately for each ctx/goroutine pair to avoid concurrent map write
|
||||
sub.Log(1, fmt.Appendf(nil, "pushing %s to %s\n", desc.Digest.String(), t.String()))
|
||||
return r.Push(ctx, t, desc, dt)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user