Skip to content

Commit

Permalink
Merge pull request #382 from moby/llbsolver-next
Browse files Browse the repository at this point in the history
Upgrade to llbsolver-next
  • Loading branch information
AkihiroSuda authored May 17, 2018
2 parents 160231c + fc888e6 commit c4bffb7
Show file tree
Hide file tree
Showing 93 changed files with 4,638 additions and 4,229 deletions.
342 changes: 253 additions & 89 deletions api/services/control/control.pb.go

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion api/services/control/control.proto
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ message SolveRequest {

message CacheOptions {
string ExportRef = 1;
string ImportRef = 2;
repeated string ImportRefs = 2;
map<string, string> ExportAttrs = 3;
}

message SolveResponse {
Expand Down
8 changes: 6 additions & 2 deletions cache/blobs/blobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ type DiffPair struct {
Blobsum digest.Digest
}

func GetDiffPairs(ctx context.Context, contentStore content.Store, snapshotter snapshot.Snapshotter, differ diff.Comparer, ref cache.ImmutableRef) ([]DiffPair, error) {
var ErrNoBlobs = errors.Errorf("no blobs for snapshot")

func GetDiffPairs(ctx context.Context, contentStore content.Store, snapshotter snapshot.Snapshotter, differ diff.Comparer, ref cache.ImmutableRef, createBlobs bool) ([]DiffPair, error) {
if ref == nil {
return nil, nil
}
Expand All @@ -37,7 +39,7 @@ func GetDiffPairs(ctx context.Context, contentStore content.Store, snapshotter s
if parent != nil {
defer parent.Release(context.TODO())
eg.Go(func() error {
dp, err := GetDiffPairs(ctx, contentStore, snapshotter, differ, parent)
dp, err := GetDiffPairs(ctx, contentStore, snapshotter, differ, parent, createBlobs)
if err != nil {
return err
}
Expand All @@ -53,6 +55,8 @@ func GetDiffPairs(ctx context.Context, contentStore content.Store, snapshotter s
}
if blob != "" {
return DiffPair{DiffID: diffID, Blobsum: blob}, nil
} else if !createBlobs {
return nil, errors.WithStack(ErrNoBlobs)
}
// reference needs to be committed
parent := ref.Parent()
Expand Down
178 changes: 0 additions & 178 deletions cache/cacheimport/export.go

This file was deleted.

Loading

0 comments on commit c4bffb7

Please sign in to comment.