mirror of
https://github.com/moby/buildkit.git
synced 2026-06-30 19:57:39 +00:00
solver: avoid removing references required for future cache
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
@@ -78,7 +78,7 @@ func (gs *gitSource) mountRemote(ctx context.Context, remote string) (target str
|
||||
|
||||
initializeRepo := false
|
||||
if remoteRef == nil {
|
||||
remoteRef, err = gs.cache.New(ctx, nil, cache.CachePolicyKeepMutable)
|
||||
remoteRef, err = gs.cache.New(ctx, nil, cache.CachePolicyRetain)
|
||||
if err != nil {
|
||||
return "", nil, errors.Wrapf(err, "failed to create new mutable for %s", remote)
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ func (ls *localSourceHandler) Snapshot(ctx context.Context) (out cache.Immutable
|
||||
}
|
||||
|
||||
if mutable == nil {
|
||||
m, err := ls.cm.New(ctx, nil, cache.CachePolicyKeepMutable)
|
||||
m, err := ls.cm.New(ctx, nil, cache.CachePolicyRetain)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user