vendor: update buildkit to c78f696

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2022-04-09 01:15:24 +02:00
parent 43968ffa68
commit 4ee8b14f2a
14 changed files with 1043 additions and 359 deletions

View File

@ -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