diff --git a/cache/remotecache/v1/utils.go b/cache/remotecache/v1/utils.go index 79cf846391fe..ef0294d75f18 100644 --- a/cache/remotecache/v1/utils.go +++ b/cache/remotecache/v1/utils.go @@ -5,6 +5,7 @@ import ( "fmt" "sort" + cerrdefs "github.com/containerd/errdefs" "github.com/moby/buildkit/solver" "github.com/moby/buildkit/util/bklog" digest "github.com/opencontainers/go-digest" @@ -281,7 +282,9 @@ func marshalRemote(ctx context.Context, r *solver.Remote, state *marshalState) s if r.Provider != nil { for _, d := range r.Descriptors { if _, err := r.Provider.Info(ctx, d.Digest); err != nil { - return "" + if !cerrdefs.IsNotImplemented(err) { + return "" + } } } } diff --git a/client/llb/exec.go b/client/llb/exec.go index 457a9b1f2f8e..faba8bddc72b 100644 --- a/client/llb/exec.go +++ b/client/llb/exec.go @@ -396,6 +396,7 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] }) } else { pm := &pb.Mount{ + Input: pb.Empty, Dest: s.Target, MountType: pb.MountType_SECRET, SecretOpt: &pb.SecretOpt{ @@ -412,6 +413,7 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] for _, s := range e.ssh { pm := &pb.Mount{ + Input: pb.Empty, Dest: s.Target, MountType: pb.MountType_SSH, SSHOpt: &pb.SSHOpt{ diff --git a/solver/llbsolver/ops/exec.go b/solver/llbsolver/ops/exec.go index 5f6777592e09..058d911353e2 100644 --- a/solver/llbsolver/ops/exec.go +++ b/solver/llbsolver/ops/exec.go @@ -285,6 +285,11 @@ type dep struct { func (e *ExecOp) getMountDeps() ([]dep, error) { deps := make([]dep, e.numInputs) for _, m := range e.op.Mounts { + switch m.MountType { + case pb.MountType_SECRET, pb.MountType_SSH, pb.MountType_TMPFS: + continue + } + if m.Input == pb.Empty { continue }