builder-next: call stopprogress on download error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> (cherry picked from commit 91a57f3e7f5ed569f7b9d97d14de11bb324bb8e0) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 77e30108bda9e3369edf33737d8b57c20594ec64 Component: engine
This commit is contained in:
committed by
Sebastiaan van Stijn
parent
89a08e8974
commit
88cbe50698
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user