Skip to content

Commit 664c119

Browse files
authored
Merge pull request moby#3581 from sipsma/skip-nil-cache-exporter
Skip configuring cache exporter if it is nil.
2 parents 5e08ad3 + bcdad5d commit 664c119

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

control/control.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,10 @@ func (c *Controller) Solve(ctx context.Context, req *controlapi.SolveRequest) (*
368368
if err != nil {
369369
return nil, errors.Wrapf(err, "failed to configure %v cache exporter", e.Type)
370370
}
371+
if exp.Exporter == nil {
372+
bklog.G(ctx).Debugf("cache exporter resolver for %v returned nil, skipping exporter", e.Type)
373+
continue
374+
}
371375
if exportMode, supported := parseCacheExportMode(e.Attrs["mode"]); !supported {
372376
bklog.G(ctx).Debugf("skipping invalid cache export mode: %s", e.Attrs["mode"])
373377
} else {

0 commit comments

Comments
 (0)