revert input dir management to llb.Copy to fix cache for yarn source pkg
Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
parent
67fb9678af
commit
7d9ff46ebd
@ -342,9 +342,20 @@ func (p *Pipeline) Local(ctx context.Context, op *compiler.Value, st llb.State)
|
|||||||
opts = append(opts, llb.ExcludePatterns(excludePatterns))
|
opts = append(opts, llb.ExcludePatterns(excludePatterns))
|
||||||
}
|
}
|
||||||
|
|
||||||
return llb.Local(
|
// FIXME: Remove the `Copy` and use `Local` directly.
|
||||||
dir,
|
//
|
||||||
opts...,
|
// Copy'ing is a costly operation which should be unnecessary.
|
||||||
|
// However, using llb.Local directly breaks caching sometimes for unknown reasons.
|
||||||
|
return st.File(
|
||||||
|
llb.Copy(
|
||||||
|
llb.Local(
|
||||||
|
dir,
|
||||||
|
opts...,
|
||||||
|
),
|
||||||
|
"/",
|
||||||
|
"/",
|
||||||
|
),
|
||||||
|
llb.WithCustomName(p.vertexNamef("Local %s [copy]", dir)),
|
||||||
), nil
|
), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user