diff --git a/builder/builder-next/builder.go b/builder/builder-next/builder.go index f2e111ff48..10c0083a31 100644 --- a/builder/builder-next/builder.go +++ b/builder/builder-next/builder.go @@ -241,7 +241,9 @@ func (b *Builder) Build(ctx context.Context, opt backend.BuildConfig) (*builder. } defer func() { + b.mu.Lock() delete(b.jobs, buildID) + b.mu.Unlock() }() }