mirror of
https://github.com/moby/buildkit.git
synced 2026-08-04 14:50:21 +00:00
Removing wrapf for review
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
2
cache/remotecache/v1/cachestorage.go
vendored
2
cache/remotecache/v1/cachestorage.go
vendored
@@ -254,7 +254,7 @@ func (cs *cacheResultStorage) Load(ctx context.Context, res solver.CacheResult)
|
||||
|
||||
ref, err := cs.w.FromRemote(ctx, item.result)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to load result from remote")
|
||||
return nil, errors.Wrap(err, "failed to load result from remote")
|
||||
}
|
||||
return worker.NewWorkerRefResult(ref, cs.w), nil
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ func (e *edge) unpark(incoming []pipe.Sender, updates, allPipes []pipe.Receiver,
|
||||
index := e.cacheMapIndex
|
||||
e.cacheMapReq = f.NewFuncRequest(func(ctx context.Context) (interface{}, error) {
|
||||
cm, err := e.op.CacheMap(ctx, index)
|
||||
return cm, errors.Wrapf(err, "failed to load cache key")
|
||||
return cm, errors.Wrap(err, "failed to load cache key")
|
||||
})
|
||||
cacheMapReq = true
|
||||
}
|
||||
@@ -800,7 +800,7 @@ func (e *edge) createInputRequests(desiredState edgeStatusType, f *pipeFactory,
|
||||
func(fn ResultBasedCacheFunc, res Result, index Index) {
|
||||
dep.slowCacheReq = f.NewFuncRequest(func(ctx context.Context) (interface{}, error) {
|
||||
v, err := e.op.CalcSlowCache(ctx, index, fn, res)
|
||||
return v, errors.Wrapf(err, "failed to compute cache key")
|
||||
return v, errors.Wrap(err, "failed to compute cache key")
|
||||
})
|
||||
}(fn, res, dep.index)
|
||||
addedNew = true
|
||||
@@ -852,7 +852,7 @@ func (e *edge) loadCache(ctx context.Context) (interface{}, error) {
|
||||
logrus.Debugf("load cache for %s with %s", e.edge.Vertex.Name(), rec.ID)
|
||||
res, err := e.op.LoadCache(ctx, rec)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to load cache")
|
||||
return nil, errors.Wrap(err, "failed to load cache")
|
||||
}
|
||||
|
||||
return NewCachedResult(res, []ExportableCacheKey{{CacheKey: rec.key, Exporter: &exporter{k: rec.key, record: rec, edge: e}}}), nil
|
||||
|
||||
@@ -94,11 +94,11 @@ func (b *llbBridge) Solve(ctx context.Context, req frontend.SolveRequest) (res *
|
||||
|
||||
edge, err := Load(req.Definition, ValidateEntitlements(ent), WithCacheSources(cms), RuntimePlatforms(b.platforms), WithValidateCaps())
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to load LLB")
|
||||
return nil, errors.Wrap(err, "failed to load LLB")
|
||||
}
|
||||
ref, err := b.builder.Build(ctx, edge)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to build LLB")
|
||||
return nil, errors.Wrap(err, "failed to build LLB")
|
||||
}
|
||||
|
||||
res = &frontend.Result{Ref: ref}
|
||||
|
||||
Reference in New Issue
Block a user