Ensure completion of UI progress bar (#810)

* update stereoscope

fetches latest fixes for UI

Signed-off-by: Jonas Galvão Xavier <jonas.agx@gmail.com>

* use context when getting image

Signed-off-by: Jonas Galvão Xavier <jonas.agx@gmail.com>
This commit is contained in:
Jonas Xavier
2022-02-09 11:23:58 -08:00
committed by GitHub
parent 76f8205936
commit a04fa68539
3 changed files with 8 additions and 5 deletions
+5 -2
View File
@@ -6,6 +6,7 @@ within this package.
package source
import (
"context"
"fmt"
"io/ioutil"
"os"
@@ -87,7 +88,9 @@ func parseScheme(userInput string) string {
}
func getImageWithRetryStrategy(userInput, location string, imageSource image.Source, registryOptions *image.RegistryOptions) (*image.Image, func(), error) {
img, err := stereoscope.GetImageFromSource(location, imageSource, registryOptions)
ctx := context.TODO()
img, err := stereoscope.GetImageFromSource(ctx, location, imageSource, registryOptions)
if err == nil {
// Success on the first try!
return img, stereoscope.Cleanup, nil
@@ -117,7 +120,7 @@ func getImageWithRetryStrategy(userInput, location string, imageSource image.Sou
// We need to determine the image source again, such that this determination
// doesn't take scheme parsing into account.
imageSource = image.DetermineImagePullSource(userInput)
img, err = stereoscope.GetImageFromSource(userInput, imageSource, registryOptions)
img, err = stereoscope.GetImageFromSource(ctx, userInput, imageSource, registryOptions)
if err != nil {
return nil, nil, err
}