Merge pull request #40784 from thaJeztah/19.03_update_buildkit
[19.03] vendor buildkit b26cff2413cc6a466f8739262efa13bd126f8fc7
This commit is contained in:
commit
edbb1d9e95
2 changed files with 8 additions and 4 deletions
|
@ -26,7 +26,7 @@ github.com/imdario/mergo 7c29201646fa3de8506f70121347
|
|||
golang.org/x/sync e225da77a7e68af35c70ccbf71af2b83e6acac3c
|
||||
|
||||
# buildkit
|
||||
github.com/moby/buildkit ebcef1f69af0bbca077efa9a960a481e579a0e89 # v0.6.4
|
||||
github.com/moby/buildkit b26cff2413cc6a466f8739262efa13bd126f8fc7 # v0.6.4 + aa7df97d7136e732561b59f87a38ad52d46d3b19
|
||||
github.com/tonistiigi/fsutil 6c909ab392c173a4264ae1bfcbc0450b9aac0c7d
|
||||
github.com/grpc-ecosystem/grpc-opentracing 8e809c8a86450a29b90dcc9efbf062d0fe6d9746
|
||||
github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7
|
||||
|
|
10
vendor/github.com/moby/buildkit/solver/cachemanager.go
generated
vendored
10
vendor/github.com/moby/buildkit/solver/cachemanager.go
generated
vendored
|
@ -150,8 +150,12 @@ type LoadedResult struct {
|
|||
CacheKey *CacheKey
|
||||
}
|
||||
|
||||
func (c *cacheManager) filterResults(m map[string]Result, ck *CacheKey) (results []LoadedResult, err error) {
|
||||
func (c *cacheManager) filterResults(m map[string]Result, ck *CacheKey, visited map[string]struct{}) (results []LoadedResult, err error) {
|
||||
id := c.getID(ck)
|
||||
if _, ok := visited[id]; ok {
|
||||
return nil, nil
|
||||
}
|
||||
visited[id] = struct{}{}
|
||||
if err := c.backend.WalkResults(id, func(cr CacheResult) error {
|
||||
res, ok := m[id]
|
||||
if ok {
|
||||
|
@ -170,7 +174,7 @@ func (c *cacheManager) filterResults(m map[string]Result, ck *CacheKey) (results
|
|||
}
|
||||
for _, keys := range ck.Deps() {
|
||||
for _, key := range keys {
|
||||
res, err := c.filterResults(m, key.CacheKey.CacheKey)
|
||||
res, err := c.filterResults(m, key.CacheKey.CacheKey, visited)
|
||||
if err != nil {
|
||||
for _, r := range results {
|
||||
r.Result.Release(context.TODO())
|
||||
|
@ -207,7 +211,7 @@ func (c *cacheManager) LoadWithParents(ctx context.Context, rec *CacheRecord) ([
|
|||
return nil, err
|
||||
}
|
||||
|
||||
results, err := c.filterResults(m, rec.key)
|
||||
results, err := c.filterResults(m, rec.key, map[string]struct{}{})
|
||||
if err != nil {
|
||||
for _, r := range m {
|
||||
r.Release(context.TODO())
|
||||
|
|
Loading…
Reference in a new issue