build: force unlazy of refs by calling extract
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
This commit is contained in:
parent
9c4987ee6b
commit
88916949ef
2 changed files with 8 additions and 1 deletions
|
@ -160,6 +160,10 @@ func (e *imageExporterInstance) Export(ctx context.Context, inp exporter.Source,
|
|||
return nil, layersDone(err)
|
||||
}
|
||||
|
||||
if err := ref.Extract(ctx, nil); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
diffIDs, err := e.opt.Differ.EnsureLayer(ctx, ref.ID())
|
||||
if err != nil {
|
||||
return nil, layersDone(err)
|
||||
|
|
|
@ -228,7 +228,7 @@ func (w *Worker) Exporter(name string, sm *session.Manager) (exporter.Exporter,
|
|||
}
|
||||
|
||||
// GetRemote returns a remote snapshot reference for a local one
|
||||
func (w *Worker) GetRemote(ctx context.Context, ref cache.ImmutableRef, createIfNeeded bool, _ compression.Type, _ session.Group) (*solver.Remote, error) {
|
||||
func (w *Worker) GetRemote(ctx context.Context, ref cache.ImmutableRef, createIfNeeded bool, _ compression.Type, s session.Group) (*solver.Remote, error) {
|
||||
var diffIDs []layer.DiffID
|
||||
var err error
|
||||
if !createIfNeeded {
|
||||
|
@ -240,6 +240,9 @@ func (w *Worker) GetRemote(ctx context.Context, ref cache.ImmutableRef, createIf
|
|||
if err := ref.Finalize(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := ref.Extract(ctx, s); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
diffIDs, err = w.Layers.EnsureLayer(ctx, ref.ID())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in a new issue