Skip to content

Commit

Permalink
Merge pull request #5258 from tonistiigi/v0.15.2-picks
Browse files Browse the repository at this point in the history
[v0.15] cherry-picks for v0.15.2
  • Loading branch information
tonistiigi authored Aug 15, 2024
2 parents 509c08c + e24cd7c commit 9e14164
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cache/remotecache/v1/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 ""
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions client/llb/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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{
Expand Down
5 changes: 5 additions & 0 deletions solver/llbsolver/ops/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 9e14164

Please sign in to comment.