Skip to content

Commit

Permalink
wip - fixing error on wcow
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
  • Loading branch information
jjbustamante committed Jun 6, 2023
1 parent a29ed83 commit ad71c5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions pkg/client/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ func (c *Client) Build(ctx context.Context, opts BuildOptions) error {

// Get the platform API version to use
lifecycleVersion := bldr.LifecycleDescriptor().Info.Version
c.logger.Debugf("lifecycle version from builder: %s", lifecycleVersion)
useCreator := supportsCreator(lifecycleVersion) && opts.TrustBuilder(opts.Builder)
var (
lifecycleOptsLifecycleImage string
Expand All @@ -403,7 +402,6 @@ func (c *Client) Build(ctx context.Context, opts BuildOptions) error {
return errors.Wrapf(err, "getting builder architecture")
}

c.logger.Debugf("fetching image: %s, os=%s, arch=%s", lifecycleImageName, imgOS, imgArch)
lifecycleImage, err := c.imageFetcher.Fetch(
ctx,
lifecycleImageName,
Expand Down
5 changes: 2 additions & 3 deletions pkg/image/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ func (f *Fetcher) Fetch(ctx context.Context, name string, options FetchOptions)
f.logger.Debugf("Pulling image %s", style.Symbol(name))
err = f.pullImage(ctx, name, options.Platform)
if err != nil && !errors.Is(err, ErrNotFound) {
f.logger.Debugf("maybe the error message change on windows client? %s, type %T", err.Error(), err)
return nil, err
}

Expand All @@ -121,7 +120,7 @@ func (f *Fetcher) Fetch(ctx context.Context, name string, options FetchOptions)
func (f *Fetcher) fetchDaemonImage(name string) (imgutil.Image, error) {
image, err := local.NewImage(name, f.docker, local.FromBaseImage(name))
if err != nil {
return nil, errors.Wrapf(err, "creating %s local image from daemon", style.Symbol(name))
return nil, err
}

if !image.Found() {
Expand Down Expand Up @@ -179,12 +178,12 @@ func (f *Fetcher) pullImage(ctx context.Context, imageID string, platform string
return err
}

f.logger.Debugf("windows bug: pulling %s", imageID)
rc, err := f.docker.ImagePull(ctx, imageID, types.ImagePullOptions{RegistryAuth: regAuth, Platform: platform})
if err != nil {
if client.IsErrNotFound(err) {
return errors.Wrapf(ErrNotFound, "image %s does not exist on the daemon", style.Symbol(imageID))
}

return err
}

Expand Down

0 comments on commit ad71c5c

Please sign in to comment.