Merge pull request #219 from thaJeztah/18.09_backport_pull_progress_fix

[18.09 backport] builder-next: call stopprogress on download error
Upstream-commit: 532777f1ec3948333fe611f7dba5dfe144e9d267
Component: engine
This commit is contained in:
Tibor Vass
2019-05-28 18:16:29 -07:00
committed by GitHub

View File

@ -515,10 +515,10 @@ func (p *puller) Snapshot(ctx context.Context) (cache.ImmutableRef, error) {
r := image.NewRootFS()
rootFS, release, err := p.is.DownloadManager.Download(ctx, *r, runtime.GOOS, layers, pkgprogress.ChanOutput(pchan))
stopProgress()
if err != nil {
return nil, err
}
stopProgress()
ref, err := p.is.CacheAccessor.GetFromSnapshotter(ctx, string(rootFS.ChainID()), cache.WithDescription(fmt.Sprintf("pulled from %s", p.ref)))
release()