pipeline: implemented op.#Exec.always correctly

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-04-15 12:09:01 -07:00
parent 551f281bf7
commit f4c712e373

View File

@ -385,13 +385,8 @@ func (p *Pipeline) Exec(ctx context.Context, op *compiler.Value, st llb.State) (
} }
// always? // always?
// FIXME: initialize once for an entire compute job, to avoid cache misses
if cmd.Always { if cmd.Always {
cacheBuster, err := randomID(8) opts = append(opts, llb.IgnoreCache)
if err != nil {
return st, err
}
opts = append(opts, llb.AddEnv("DAGGER_CACHEBUSTER", cacheBuster))
} }
// mounts // mounts
if mounts := op.Lookup("mount"); mounts.Exists() { if mounts := op.Lookup("mount"); mounts.Exists() {