Skip to content

Commit

Permalink
Uncompressed vs Compressed
Browse files Browse the repository at this point in the history
  • Loading branch information
nesmabadr committed Jul 10, 2024
1 parent 2a63dcd commit 0dff458
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pkg/module/parse/template_to_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,19 @@ func ReadAssociatedResourcesField(ctx context.Context, layer img.Layer) ([]strin
return nil, fmt.Errorf("failed to pull associated resources layer, %w", err)
}

blobReadCloser, err := imgLayer.Compressed()
blobReadCompressed, err := imgLayer.Compressed()
if err != nil {
return nil, fmt.Errorf("failed fetching blob for layer %s: %w", imageRef, err)
}
logf.FromContext(ctx).V(log.InfoLevel).Info(fmt.Sprintf("blobReadCloser: %v", blobReadCloser))
defer blobReadCloser.Close()
logf.FromContext(ctx).V(log.InfoLevel).Info(fmt.Sprintf("Compressed: %v", blobReadCompressed))
defer blobReadCompressed.Close()

blobReadUncompressed, err := imgLayer.Uncompressed()
if err != nil {
return nil, fmt.Errorf("failed fetching blob for layer %s: %w", imageRef, err)
}
logf.FromContext(ctx).V(log.InfoLevel).Info(fmt.Sprintf("Uncompressed====: %v", blobReadUncompressed))
defer blobReadUncompressed.Close()

// filePath := fmt.Sprintf("%s/%s:%s/%s", associatedResources.Repo, associatedResources.Name, descriptorVersion,
// img.AssociatedResourcesLayer)
Expand Down

0 comments on commit 0dff458

Please sign in to comment.