mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to c78f696
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
25
vendor/github.com/moby/buildkit/frontend/gateway/grpcclient/client.go
generated
vendored
25
vendor/github.com/moby/buildkit/frontend/gateway/grpcclient/client.go
generated
vendored
@ -323,22 +323,12 @@ func (c *grpcClient) Solve(ctx context.Context, creq client.SolveRequest) (res *
|
||||
}
|
||||
}
|
||||
}
|
||||
var (
|
||||
// old API
|
||||
legacyRegistryCacheImports []string
|
||||
// new API (CapImportCaches)
|
||||
cacheImports []*pb.CacheOptionsEntry
|
||||
)
|
||||
supportCapImportCaches := c.caps.Supports(pb.CapImportCaches) == nil
|
||||
var cacheImports []*pb.CacheOptionsEntry
|
||||
for _, im := range creq.CacheImports {
|
||||
if !supportCapImportCaches && im.Type == "registry" {
|
||||
legacyRegistryCacheImports = append(legacyRegistryCacheImports, im.Attrs["ref"])
|
||||
} else {
|
||||
cacheImports = append(cacheImports, &pb.CacheOptionsEntry{
|
||||
Type: im.Type,
|
||||
Attrs: im.Attrs,
|
||||
})
|
||||
}
|
||||
cacheImports = append(cacheImports, &pb.CacheOptionsEntry{
|
||||
Type: im.Type,
|
||||
Attrs: im.Attrs,
|
||||
})
|
||||
}
|
||||
|
||||
// these options are added by go client in solve()
|
||||
@ -366,10 +356,7 @@ func (c *grpcClient) Solve(ctx context.Context, creq client.SolveRequest) (res *
|
||||
FrontendInputs: creq.FrontendInputs,
|
||||
AllowResultReturn: true,
|
||||
AllowResultArrayRef: true,
|
||||
// old API
|
||||
ImportCacheRefsDeprecated: legacyRegistryCacheImports,
|
||||
// new API
|
||||
CacheImports: cacheImports,
|
||||
CacheImports: cacheImports,
|
||||
}
|
||||
|
||||
// backwards compatibility with inline return
|
||||
|
Reference in New Issue
Block a user