From 5ad981640f9e747e9c9d29c686084206e007f07b Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Fri, 3 Apr 2020 15:33:15 -0700 Subject: [PATCH] builder: fix concurrent map write Signed-off-by: Tonis Tiigi --- builder/builder-next/builder.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builder/builder-next/builder.go b/builder/builder-next/builder.go index b07e88e200..278f36dfef 100644 --- a/builder/builder-next/builder.go +++ b/builder/builder-next/builder.go @@ -240,7 +240,9 @@ func (b *Builder) Build(ctx context.Context, opt backend.BuildConfig) (*builder. } defer func() { + b.mu.Lock() delete(b.jobs, buildID) + b.mu.Unlock() }() }