From 8372345c40d4c26d2a7523c72db1d49d16b4ced9 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Thu, 10 Sep 2026 16:45:42 +0200 Subject: [PATCH] build: preserve shared clients across linked target completion Create shared clients with the enclosing build context so completing one linked target doesn't cancel the Kubernetes connection still used by its siblings. Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- build/build.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/build.go b/build/build.go index a2444e5452f1..04665f5207db 100644 --- a/build/build.go +++ b/build/build.go @@ -615,7 +615,8 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opts map[ // shared solver vertices land on the same daemon instance c = linkedClients[node.Name] if c == nil { - c, err = dp.Client(ctx) + // The shared client must outlive this target's errgroup. + c, err = dp.Client(baseCtx) if err == nil { linkedClients[node.Name] = c }