Skip to content

Commit

Permalink
Dagger: use Locked synchronization
Browse files Browse the repository at this point in the history
could be configurable in the future, just matching Buildkit runtime and
making test pass in the process
  • Loading branch information
vito committed Feb 26, 2023
1 parent ad1d341 commit 16852c2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/runtimes/dagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,13 @@ func (runtime *Dagger) mount(ctx context.Context, ctr *dagger.Container, target
return nil, fmt.Errorf("mounting subpaths of cache not implemented yet: %s", fsp.Slash())
}

return ctr.WithMountedCache(target, runtime.client.CacheVolume(src.Cache.ID)), nil
return ctr.WithMountedCache(
target,
runtime.client.CacheVolume(src.Cache.ID),
dagger.ContainerWithMountedCacheOpts{
Sharing: dagger.Locked,
},
), nil
case src.FSPath != nil:
dir := runtime.client.Directory()

Expand Down

0 comments on commit 16852c2

Please sign in to comment.