From 3cabacf36e3db31ebe77fd3984470fe191ea3aa3 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Thu, 17 Apr 2025 10:33:53 -0700 Subject: [PATCH] control: make sure sending nil cache options does not panic Signed-off-by: Tonis Tiigi --- control/control.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/control/control.go b/control/control.go index a86f7dc5a..dc73be3da 100644 --- a/control/control.go +++ b/control/control.go @@ -376,6 +376,9 @@ func (c *Controller) Solve(ctx context.Context, req *controlapi.SolveRequest) (* atomic.AddInt64(&c.buildCount, 1) defer atomic.AddInt64(&c.buildCount, -1) + if req.Cache == nil { + req.Cache = &controlapi.CacheOptions{} // make sure cache options are initialized + } translateLegacySolveRequest(req) defer func() {