Skip to content

Commit 4409503

Browse files
committed
solver: fixup generic result conversion
Somehow some duplicate code ended up in the exporter, resulting in .Result() called twice on each ResultProxy when exporting multiple Refs. The ConvertResult handles the conversions completely, so we don't need the loop. Signed-off-by: Justin Chadwell <[email protected]>
1 parent 2254cfe commit 4409503

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

solver/llbsolver/solver.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -211,25 +211,6 @@ func (s *Solver) Solve(ctx context.Context, id string, sessionID string, req fro
211211
if err != nil {
212212
return nil, err
213213
}
214-
if res.Refs != nil {
215-
m := make(map[string]cache.ImmutableRef, len(res.Refs))
216-
for k, res := range res.Refs {
217-
if res == nil {
218-
m[k] = nil
219-
} else {
220-
r, err := res.Result(ctx)
221-
if err != nil {
222-
return nil, err
223-
}
224-
workerRef, ok := r.Sys().(*worker.WorkerRef)
225-
if !ok {
226-
return nil, errors.Errorf("invalid reference: %T", r.Sys())
227-
}
228-
m[k] = workerRef.ImmutableRef
229-
}
230-
}
231-
inp.Refs = m
232-
}
233214

234215
if _, ok := asInlineCache(exp.CacheExporter); ok {
235216
if err := inBuilderContext(ctx, j, "preparing layers for inline cache", j.SessionID+"-cache-inline", func(ctx context.Context, _ session.Group) error {

0 commit comments

Comments
 (0)