diff --git a/client/client_test.go b/client/client_test.go index b268cbf39202..3b8dbc828131 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -242,6 +242,7 @@ var allTests = []func(t *testing.T, sb integration.Sandbox){ testFileOpSymlink, testMetadataOnlyLocal, testGitResolveSourceMetadata, + testHTTPResolveSourceMetadata, } func TestIntegration(t *testing.T) { @@ -12057,6 +12058,64 @@ func testGitResolveSourceMetadata(t *testing.T, sb integration.Sandbox) { require.NoError(t, err) } +func testHTTPResolveSourceMetadata(t *testing.T, sb integration.Sandbox) { + ctx := sb.Context() + c, err := New(ctx, sb.Address()) + require.NoError(t, err) + defer c.Close() + + modTime := time.Now().Add(-24 * time.Hour) // avoid falso positive with current time + + resp := httpserver.Response{ + Etag: identity.NewID(), + Content: []byte("content1"), + LastModified: &modTime, + } + + resp2 := httpserver.Response{ + Etag: identity.NewID(), + Content: []byte("content2"), + ContentDisposition: "attachment; filename=\"my img.jpg\"", + } + + server := httpserver.NewTestServer(map[string]httpserver.Response{ + "/foo": resp, + "/bar": resp2, + }) + defer server.Close() + + _, err = c.Build(ctx, SolveOpt{}, "test", func(ctx context.Context, c gateway.Client) (*gateway.Result, error) { + id := server.URL + "/foo" + md, err := c.ResolveSourceMetadata(ctx, &pb.SourceOp{ + Identifier: id, + }, sourceresolver.Opt{}) + if err != nil { + return nil, err + } + require.NotNil(t, md.HTTP) + require.Equal(t, digest.FromBytes(resp.Content), md.HTTP.Digest) + require.Equal(t, "foo", md.HTTP.Filename) + require.NotNil(t, md.HTTP.LastModified) + require.Equal(t, modTime.Unix(), md.HTTP.LastModified.Unix()) + require.Equal(t, id, md.Op.Identifier) + + id = server.URL + "/bar" + md, err = c.ResolveSourceMetadata(ctx, &pb.SourceOp{ + Identifier: id, + }, sourceresolver.Opt{}) + if err != nil { + return nil, err + } + require.NotNil(t, md.HTTP) + require.Equal(t, digest.FromBytes(resp2.Content), md.HTTP.Digest) + require.Equal(t, "my img.jpg", md.HTTP.Filename) + require.Nil(t, md.HTTP.LastModified) + require.Equal(t, id, md.Op.Identifier) + return nil, nil + }, nil) + require.NoError(t, err) +} + func runInDir(dir string, cmds ...string) error { for _, args := range cmds { var cmd *exec.Cmd diff --git a/client/llb/sourceresolver/types.go b/client/llb/sourceresolver/types.go index 1ff9a94fd77d..9be1dd994604 100644 --- a/client/llb/sourceresolver/types.go +++ b/client/llb/sourceresolver/types.go @@ -2,6 +2,7 @@ package sourceresolver import ( "context" + "time" "github.com/moby/buildkit/solver/pb" spb "github.com/moby/buildkit/sourcepolicy/pb" @@ -34,6 +35,7 @@ type MetaResponse struct { Image *ResolveImageResponse Git *ResolveGitResponse + HTTP *ResolveHTTPResponse } type ResolveImageOpt struct { @@ -51,6 +53,12 @@ type ResolveGitResponse struct { CommitChecksum string } +type ResolveHTTPResponse struct { + Digest digest.Digest + Filename string + LastModified *time.Time +} + type ResolveOCILayoutOpt struct { Store ResolveImageConfigOptStore } diff --git a/frontend/gateway/gateway.go b/frontend/gateway/gateway.go index 7581f48c0e03..0c2157c8fefa 100644 --- a/frontend/gateway/gateway.go +++ b/frontend/gateway/gateway.go @@ -19,6 +19,7 @@ import ( "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/defaults" "github.com/distribution/reference" + "github.com/golang/protobuf/ptypes/timestamp" apitypes "github.com/moby/buildkit/api/types" "github.com/moby/buildkit/cache" cacheutil "github.com/moby/buildkit/cache/util" @@ -657,6 +658,19 @@ func (lbf *llbBridgeForwarder) ResolveSourceMeta(ctx context.Context, req *pb.Re CommitChecksum: resp.Git.CommitChecksum, } } + if resp.HTTP != nil { + var lastModified *timestamp.Timestamp + if resp.HTTP.LastModified != nil { + lastModified = ×tamp.Timestamp{ + Seconds: resp.HTTP.LastModified.Unix(), + } + } + r.HTTP = &pb.ResolveSourceHTTPResponse{ + Checksum: resp.HTTP.Digest.String(), + Filename: resp.HTTP.Filename, + LastModified: lastModified, + } + } return r, nil } diff --git a/frontend/gateway/grpcclient/client.go b/frontend/gateway/grpcclient/client.go index cdb291033957..d4bdd88650f4 100644 --- a/frontend/gateway/grpcclient/client.go +++ b/frontend/gateway/grpcclient/client.go @@ -535,6 +535,21 @@ func (c *grpcClient) ResolveSourceMetadata(ctx context.Context, op *opspb.Source CommitChecksum: resp.Git.CommitChecksum, } } + if resp.HTTP != nil { + dgst, err := digest.Parse(resp.HTTP.Checksum) + if err != nil { + return nil, errors.Wrapf(err, "invalid http checksum digest %q", resp.HTTP.Checksum) + } + + r.HTTP = &sourceresolver.ResolveHTTPResponse{ + Digest: dgst, + Filename: resp.HTTP.Filename, + } + if resp.HTTP.LastModified != nil { + tm := resp.HTTP.LastModified.AsTime() + r.HTTP.LastModified = &tm + } + } return r, nil } diff --git a/frontend/gateway/pb/gateway.pb.go b/frontend/gateway/pb/gateway.pb.go index 04239ddf7d7b..710aca2d569f 100644 --- a/frontend/gateway/pb/gateway.pb.go +++ b/frontend/gateway/pb/gateway.pb.go @@ -7,6 +7,7 @@ package moby_buildkit_v1_frontend import ( + timestamp "github.com/golang/protobuf/ptypes/timestamp" types1 "github.com/moby/buildkit/api/types" pb "github.com/moby/buildkit/solver/pb" pb1 "github.com/moby/buildkit/sourcepolicy/pb" @@ -988,6 +989,7 @@ type ResolveSourceMetaResponse struct { Source *pb.SourceOp `protobuf:"bytes,1,opt,name=Source,proto3" json:"Source,omitempty"` Image *ResolveSourceImageResponse `protobuf:"bytes,2,opt,name=Image,proto3" json:"Image,omitempty"` Git *ResolveSourceGitResponse `protobuf:"bytes,3,opt,name=Git,proto3" json:"Git,omitempty"` + HTTP *ResolveSourceHTTPResponse `protobuf:"bytes,4,opt,name=HTTP,proto3" json:"HTTP,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1043,6 +1045,13 @@ func (x *ResolveSourceMetaResponse) GetGit() *ResolveSourceGitResponse { return nil } +func (x *ResolveSourceMetaResponse) GetHTTP() *ResolveSourceHTTPResponse { + if x != nil { + return x.HTTP + } + return nil +} + type ResolveSourceImageResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Digest string `protobuf:"bytes,1,opt,name=Digest,proto3" json:"Digest,omitempty"` @@ -1155,6 +1164,66 @@ func (x *ResolveSourceGitResponse) GetCommitChecksum() string { return "" } +type ResolveSourceHTTPResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Checksum string `protobuf:"bytes,1,opt,name=Checksum,proto3" json:"Checksum,omitempty"` + Filename string `protobuf:"bytes,2,opt,name=Filename,proto3" json:"Filename,omitempty"` + LastModified *timestamp.Timestamp `protobuf:"bytes,3,opt,name=LastModified,proto3" json:"LastModified,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResolveSourceHTTPResponse) Reset() { + *x = ResolveSourceHTTPResponse{} + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResolveSourceHTTPResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResolveSourceHTTPResponse) ProtoMessage() {} + +func (x *ResolveSourceHTTPResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResolveSourceHTTPResponse.ProtoReflect.Descriptor instead. +func (*ResolveSourceHTTPResponse) Descriptor() ([]byte, []int) { + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{17} +} + +func (x *ResolveSourceHTTPResponse) GetChecksum() string { + if x != nil { + return x.Checksum + } + return "" +} + +func (x *ResolveSourceHTTPResponse) GetFilename() string { + if x != nil { + return x.Filename + } + return "" +} + +func (x *ResolveSourceHTTPResponse) GetLastModified() *timestamp.Timestamp { + if x != nil { + return x.LastModified + } + return nil +} + type SolveRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Definition *pb.Definition `protobuf:"bytes,1,opt,name=Definition,proto3" json:"Definition,omitempty"` @@ -1179,7 +1248,7 @@ type SolveRequest struct { func (x *SolveRequest) Reset() { *x = SolveRequest{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[17] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1191,7 +1260,7 @@ func (x *SolveRequest) String() string { func (*SolveRequest) ProtoMessage() {} func (x *SolveRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[17] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1204,7 +1273,7 @@ func (x *SolveRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SolveRequest.ProtoReflect.Descriptor instead. func (*SolveRequest) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{17} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{18} } func (x *SolveRequest) GetDefinition() *pb.Definition { @@ -1295,7 +1364,7 @@ type CacheOptionsEntry struct { func (x *CacheOptionsEntry) Reset() { *x = CacheOptionsEntry{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[18] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1307,7 +1376,7 @@ func (x *CacheOptionsEntry) String() string { func (*CacheOptionsEntry) ProtoMessage() {} func (x *CacheOptionsEntry) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[18] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1320,7 +1389,7 @@ func (x *CacheOptionsEntry) ProtoReflect() protoreflect.Message { // Deprecated: Use CacheOptionsEntry.ProtoReflect.Descriptor instead. func (*CacheOptionsEntry) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{18} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{19} } func (x *CacheOptionsEntry) GetType() string { @@ -1349,7 +1418,7 @@ type SolveResponse struct { func (x *SolveResponse) Reset() { *x = SolveResponse{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[19] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1361,7 +1430,7 @@ func (x *SolveResponse) String() string { func (*SolveResponse) ProtoMessage() {} func (x *SolveResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[19] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1374,7 +1443,7 @@ func (x *SolveResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SolveResponse.ProtoReflect.Descriptor instead. func (*SolveResponse) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{19} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{20} } func (x *SolveResponse) GetRef() string { @@ -1402,7 +1471,7 @@ type ReadFileRequest struct { func (x *ReadFileRequest) Reset() { *x = ReadFileRequest{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[20] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1414,7 +1483,7 @@ func (x *ReadFileRequest) String() string { func (*ReadFileRequest) ProtoMessage() {} func (x *ReadFileRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[20] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1427,7 +1496,7 @@ func (x *ReadFileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadFileRequest.ProtoReflect.Descriptor instead. func (*ReadFileRequest) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{20} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{21} } func (x *ReadFileRequest) GetRef() string { @@ -1461,7 +1530,7 @@ type FileRange struct { func (x *FileRange) Reset() { *x = FileRange{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[21] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1473,7 +1542,7 @@ func (x *FileRange) String() string { func (*FileRange) ProtoMessage() {} func (x *FileRange) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[21] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1486,7 +1555,7 @@ func (x *FileRange) ProtoReflect() protoreflect.Message { // Deprecated: Use FileRange.ProtoReflect.Descriptor instead. func (*FileRange) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{21} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{22} } func (x *FileRange) GetOffset() int64 { @@ -1512,7 +1581,7 @@ type ReadFileResponse struct { func (x *ReadFileResponse) Reset() { *x = ReadFileResponse{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[22] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1524,7 +1593,7 @@ func (x *ReadFileResponse) String() string { func (*ReadFileResponse) ProtoMessage() {} func (x *ReadFileResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[22] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1537,7 +1606,7 @@ func (x *ReadFileResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadFileResponse.ProtoReflect.Descriptor instead. func (*ReadFileResponse) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{22} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{23} } func (x *ReadFileResponse) GetData() []byte { @@ -1558,7 +1627,7 @@ type ReadDirRequest struct { func (x *ReadDirRequest) Reset() { *x = ReadDirRequest{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[23] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1570,7 +1639,7 @@ func (x *ReadDirRequest) String() string { func (*ReadDirRequest) ProtoMessage() {} func (x *ReadDirRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[23] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1583,7 +1652,7 @@ func (x *ReadDirRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadDirRequest.ProtoReflect.Descriptor instead. func (*ReadDirRequest) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{23} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{24} } func (x *ReadDirRequest) GetRef() string { @@ -1616,7 +1685,7 @@ type ReadDirResponse struct { func (x *ReadDirResponse) Reset() { *x = ReadDirResponse{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[24] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1628,7 +1697,7 @@ func (x *ReadDirResponse) String() string { func (*ReadDirResponse) ProtoMessage() {} func (x *ReadDirResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[24] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1641,7 +1710,7 @@ func (x *ReadDirResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadDirResponse.ProtoReflect.Descriptor instead. func (*ReadDirResponse) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{24} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{25} } func (x *ReadDirResponse) GetEntries() []*types.Stat { @@ -1661,7 +1730,7 @@ type StatFileRequest struct { func (x *StatFileRequest) Reset() { *x = StatFileRequest{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[25] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1673,7 +1742,7 @@ func (x *StatFileRequest) String() string { func (*StatFileRequest) ProtoMessage() {} func (x *StatFileRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[25] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1686,7 +1755,7 @@ func (x *StatFileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StatFileRequest.ProtoReflect.Descriptor instead. func (*StatFileRequest) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{25} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{26} } func (x *StatFileRequest) GetRef() string { @@ -1712,7 +1781,7 @@ type StatFileResponse struct { func (x *StatFileResponse) Reset() { *x = StatFileResponse{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[26] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1724,7 +1793,7 @@ func (x *StatFileResponse) String() string { func (*StatFileResponse) ProtoMessage() {} func (x *StatFileResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[26] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1737,7 +1806,7 @@ func (x *StatFileResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StatFileResponse.ProtoReflect.Descriptor instead. func (*StatFileResponse) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{26} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{27} } func (x *StatFileResponse) GetStat() *types.Stat { @@ -1756,7 +1825,7 @@ type EvaluateRequest struct { func (x *EvaluateRequest) Reset() { *x = EvaluateRequest{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[27] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1768,7 +1837,7 @@ func (x *EvaluateRequest) String() string { func (*EvaluateRequest) ProtoMessage() {} func (x *EvaluateRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[27] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1781,7 +1850,7 @@ func (x *EvaluateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EvaluateRequest.ProtoReflect.Descriptor instead. func (*EvaluateRequest) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{27} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{28} } func (x *EvaluateRequest) GetRef() string { @@ -1799,7 +1868,7 @@ type EvaluateResponse struct { func (x *EvaluateResponse) Reset() { *x = EvaluateResponse{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[28] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1811,7 +1880,7 @@ func (x *EvaluateResponse) String() string { func (*EvaluateResponse) ProtoMessage() {} func (x *EvaluateResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[28] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1824,7 +1893,7 @@ func (x *EvaluateResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EvaluateResponse.ProtoReflect.Descriptor instead. func (*EvaluateResponse) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{28} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{29} } type PingRequest struct { @@ -1835,7 +1904,7 @@ type PingRequest struct { func (x *PingRequest) Reset() { *x = PingRequest{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[29] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1847,7 +1916,7 @@ func (x *PingRequest) String() string { func (*PingRequest) ProtoMessage() {} func (x *PingRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[29] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1860,7 +1929,7 @@ func (x *PingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. func (*PingRequest) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{29} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{30} } type PongResponse struct { @@ -1874,7 +1943,7 @@ type PongResponse struct { func (x *PongResponse) Reset() { *x = PongResponse{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[30] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1886,7 +1955,7 @@ func (x *PongResponse) String() string { func (*PongResponse) ProtoMessage() {} func (x *PongResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[30] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1899,7 +1968,7 @@ func (x *PongResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PongResponse.ProtoReflect.Descriptor instead. func (*PongResponse) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{30} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{31} } func (x *PongResponse) GetFrontendAPICaps() []*pb2.APICap { @@ -1938,7 +2007,7 @@ type WarnRequest struct { func (x *WarnRequest) Reset() { *x = WarnRequest{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[31] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1950,7 +2019,7 @@ func (x *WarnRequest) String() string { func (*WarnRequest) ProtoMessage() {} func (x *WarnRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[31] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1963,7 +2032,7 @@ func (x *WarnRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WarnRequest.ProtoReflect.Descriptor instead. func (*WarnRequest) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{31} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{32} } func (x *WarnRequest) GetDigest() string { @@ -2023,7 +2092,7 @@ type WarnResponse struct { func (x *WarnResponse) Reset() { *x = WarnResponse{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[32] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2035,7 +2104,7 @@ func (x *WarnResponse) String() string { func (*WarnResponse) ProtoMessage() {} func (x *WarnResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[32] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2048,7 +2117,7 @@ func (x *WarnResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use WarnResponse.ProtoReflect.Descriptor instead. func (*WarnResponse) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{32} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{33} } type NewContainerRequest struct { @@ -2067,7 +2136,7 @@ type NewContainerRequest struct { func (x *NewContainerRequest) Reset() { *x = NewContainerRequest{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[33] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2079,7 +2148,7 @@ func (x *NewContainerRequest) String() string { func (*NewContainerRequest) ProtoMessage() {} func (x *NewContainerRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[33] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2092,7 +2161,7 @@ func (x *NewContainerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use NewContainerRequest.ProtoReflect.Descriptor instead. func (*NewContainerRequest) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{33} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{34} } func (x *NewContainerRequest) GetContainerID() string { @@ -2152,7 +2221,7 @@ type NewContainerResponse struct { func (x *NewContainerResponse) Reset() { *x = NewContainerResponse{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[34] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2164,7 +2233,7 @@ func (x *NewContainerResponse) String() string { func (*NewContainerResponse) ProtoMessage() {} func (x *NewContainerResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[34] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2177,7 +2246,7 @@ func (x *NewContainerResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use NewContainerResponse.ProtoReflect.Descriptor instead. func (*NewContainerResponse) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{34} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{35} } type ReleaseContainerRequest struct { @@ -2189,7 +2258,7 @@ type ReleaseContainerRequest struct { func (x *ReleaseContainerRequest) Reset() { *x = ReleaseContainerRequest{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[35] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2201,7 +2270,7 @@ func (x *ReleaseContainerRequest) String() string { func (*ReleaseContainerRequest) ProtoMessage() {} func (x *ReleaseContainerRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[35] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2214,7 +2283,7 @@ func (x *ReleaseContainerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReleaseContainerRequest.ProtoReflect.Descriptor instead. func (*ReleaseContainerRequest) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{35} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{36} } func (x *ReleaseContainerRequest) GetContainerID() string { @@ -2232,7 +2301,7 @@ type ReleaseContainerResponse struct { func (x *ReleaseContainerResponse) Reset() { *x = ReleaseContainerResponse{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[36] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2244,7 +2313,7 @@ func (x *ReleaseContainerResponse) String() string { func (*ReleaseContainerResponse) ProtoMessage() {} func (x *ReleaseContainerResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[36] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2257,7 +2326,7 @@ func (x *ReleaseContainerResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReleaseContainerResponse.ProtoReflect.Descriptor instead. func (*ReleaseContainerResponse) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{36} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{37} } type ExecMessage struct { @@ -2279,7 +2348,7 @@ type ExecMessage struct { func (x *ExecMessage) Reset() { *x = ExecMessage{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[37] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2291,7 +2360,7 @@ func (x *ExecMessage) String() string { func (*ExecMessage) ProtoMessage() {} func (x *ExecMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[37] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2304,7 +2373,7 @@ func (x *ExecMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecMessage.ProtoReflect.Descriptor instead. func (*ExecMessage) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{37} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{38} } func (x *ExecMessage) GetProcessID() string { @@ -2456,7 +2525,7 @@ type InitMessage struct { func (x *InitMessage) Reset() { *x = InitMessage{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[38] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2468,7 +2537,7 @@ func (x *InitMessage) String() string { func (*InitMessage) ProtoMessage() {} func (x *InitMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[38] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2481,7 +2550,7 @@ func (x *InitMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use InitMessage.ProtoReflect.Descriptor instead. func (*InitMessage) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{38} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{39} } func (x *InitMessage) GetContainerID() string { @@ -2536,7 +2605,7 @@ type ExitMessage struct { func (x *ExitMessage) Reset() { *x = ExitMessage{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[39] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2548,7 +2617,7 @@ func (x *ExitMessage) String() string { func (*ExitMessage) ProtoMessage() {} func (x *ExitMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[39] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2561,7 +2630,7 @@ func (x *ExitMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ExitMessage.ProtoReflect.Descriptor instead. func (*ExitMessage) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{39} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{40} } func (x *ExitMessage) GetCode() uint32 { @@ -2586,7 +2655,7 @@ type StartedMessage struct { func (x *StartedMessage) Reset() { *x = StartedMessage{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[40] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2598,7 +2667,7 @@ func (x *StartedMessage) String() string { func (*StartedMessage) ProtoMessage() {} func (x *StartedMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[40] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2611,7 +2680,7 @@ func (x *StartedMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use StartedMessage.ProtoReflect.Descriptor instead. func (*StartedMessage) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{40} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{41} } type DoneMessage struct { @@ -2622,7 +2691,7 @@ type DoneMessage struct { func (x *DoneMessage) Reset() { *x = DoneMessage{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[41] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2634,7 +2703,7 @@ func (x *DoneMessage) String() string { func (*DoneMessage) ProtoMessage() {} func (x *DoneMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[41] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2647,7 +2716,7 @@ func (x *DoneMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use DoneMessage.ProtoReflect.Descriptor instead. func (*DoneMessage) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{41} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{42} } type FdMessage struct { @@ -2661,7 +2730,7 @@ type FdMessage struct { func (x *FdMessage) Reset() { *x = FdMessage{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[42] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2673,7 +2742,7 @@ func (x *FdMessage) String() string { func (*FdMessage) ProtoMessage() {} func (x *FdMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[42] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2686,7 +2755,7 @@ func (x *FdMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use FdMessage.ProtoReflect.Descriptor instead. func (*FdMessage) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{42} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{43} } func (x *FdMessage) GetFd() uint32 { @@ -2720,7 +2789,7 @@ type ResizeMessage struct { func (x *ResizeMessage) Reset() { *x = ResizeMessage{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[43] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2732,7 +2801,7 @@ func (x *ResizeMessage) String() string { func (*ResizeMessage) ProtoMessage() {} func (x *ResizeMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[43] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2745,7 +2814,7 @@ func (x *ResizeMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ResizeMessage.ProtoReflect.Descriptor instead. func (*ResizeMessage) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{43} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{44} } func (x *ResizeMessage) GetRows() uint32 { @@ -2773,7 +2842,7 @@ type SignalMessage struct { func (x *SignalMessage) Reset() { *x = SignalMessage{} - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[44] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2785,7 +2854,7 @@ func (x *SignalMessage) String() string { func (*SignalMessage) ProtoMessage() {} func (x *SignalMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[44] + mi := &file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2798,7 +2867,7 @@ func (x *SignalMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use SignalMessage.ProtoReflect.Descriptor instead. func (*SignalMessage) Descriptor() ([]byte, []int) { - return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{44} + return file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP(), []int{45} } func (x *SignalMessage) GetName() string { @@ -2812,7 +2881,7 @@ var File_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto protoreflect const file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDesc = "" + "\n" + - ":github.com/moby/buildkit/frontend/gateway/pb/gateway.proto\x12\x19moby.buildkit.v1.frontend\x1a/github.com/moby/buildkit/api/types/worker.proto\x1a,github.com/moby/buildkit/solver/pb/ops.proto\x1a5github.com/moby/buildkit/sourcepolicy/pb/policy.proto\x1a3github.com/moby/buildkit/util/apicaps/pb/caps.proto\x1a-github.zerozr99.workers.dev/tonistiigi/fsutil/types/stat.proto\x1a\x17google/rpc/status.proto\"\xcb\x04\n" + + ":github.com/moby/buildkit/frontend/gateway/pb/gateway.proto\x12\x19moby.buildkit.v1.frontend\x1a/github.com/moby/buildkit/api/types/worker.proto\x1a,github.com/moby/buildkit/solver/pb/ops.proto\x1a5github.com/moby/buildkit/sourcepolicy/pb/policy.proto\x1a3github.com/moby/buildkit/util/apicaps/pb/caps.proto\x1a-github.zerozr99.workers.dev/tonistiigi/fsutil/types/stat.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xcb\x04\n" + "\x06Result\x12&\n" + "\rrefDeprecated\x18\x01 \x01(\tH\x00R\rrefDeprecated\x12U\n" + "\x0erefsDeprecated\x18\x02 \x01(\v2+.moby.buildkit.v1.frontend.RefMapDeprecatedH\x00R\x0erefsDeprecated\x122\n" + @@ -2885,18 +2954,23 @@ const file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDesc = "\bPlatform\x18\x02 \x01(\v2\f.pb.PlatformR\bPlatform\x12\x18\n" + "\aLogName\x18\x03 \x01(\tR\aLogName\x12 \n" + "\vResolveMode\x18\x04 \x01(\tR\vResolveMode\x12M\n" + - "\x0eSourcePolicies\x18\b \x03(\v2%.moby.buildkit.v1.sourcepolicy.PolicyR\x0eSourcePolicies\"\xd5\x01\n" + + "\x0eSourcePolicies\x18\b \x03(\v2%.moby.buildkit.v1.sourcepolicy.PolicyR\x0eSourcePolicies\"\x9f\x02\n" + "\x19ResolveSourceMetaResponse\x12$\n" + "\x06Source\x18\x01 \x01(\v2\f.pb.SourceOpR\x06Source\x12K\n" + "\x05Image\x18\x02 \x01(\v25.moby.buildkit.v1.frontend.ResolveSourceImageResponseR\x05Image\x12E\n" + - "\x03Git\x18\x03 \x01(\v23.moby.buildkit.v1.frontend.ResolveSourceGitResponseR\x03Git\"L\n" + + "\x03Git\x18\x03 \x01(\v23.moby.buildkit.v1.frontend.ResolveSourceGitResponseR\x03Git\x12H\n" + + "\x04HTTP\x18\x04 \x01(\v24.moby.buildkit.v1.frontend.ResolveSourceHTTPResponseR\x04HTTP\"L\n" + "\x1aResolveSourceImageResponse\x12\x16\n" + "\x06Digest\x18\x01 \x01(\tR\x06Digest\x12\x16\n" + "\x06Config\x18\x02 \x01(\fR\x06Config\"p\n" + "\x18ResolveSourceGitResponse\x12\x1a\n" + "\bChecksum\x18\x01 \x01(\tR\bChecksum\x12\x10\n" + "\x03Ref\x18\x02 \x01(\tR\x03Ref\x12&\n" + - "\x0eCommitChecksum\x18\x03 \x01(\tR\x0eCommitChecksum\"\x85\x06\n" + + "\x0eCommitChecksum\x18\x03 \x01(\tR\x0eCommitChecksum\"\x93\x01\n" + + "\x19ResolveSourceHTTPResponse\x12\x1a\n" + + "\bChecksum\x18\x01 \x01(\tR\bChecksum\x12\x1a\n" + + "\bFilename\x18\x02 \x01(\tR\bFilename\x12>\n" + + "\fLastModified\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\fLastModified\"\x85\x06\n" + "\fSolveRequest\x12.\n" + "\n" + "Definition\x18\x01 \x01(\v2\x0e.pb.DefinitionR\n" + @@ -3048,7 +3122,7 @@ func file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDescGZIP } var file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 54) +var file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 55) var file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_goTypes = []any{ (AttestationKind)(0), // 0: moby.buildkit.v1.frontend.AttestationKind (InTotoSubjectKind)(0), // 1: moby.buildkit.v1.frontend.InTotoSubjectKind @@ -3069,155 +3143,159 @@ var file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_goTypes = [] (*ResolveSourceMetaResponse)(nil), // 16: moby.buildkit.v1.frontend.ResolveSourceMetaResponse (*ResolveSourceImageResponse)(nil), // 17: moby.buildkit.v1.frontend.ResolveSourceImageResponse (*ResolveSourceGitResponse)(nil), // 18: moby.buildkit.v1.frontend.ResolveSourceGitResponse - (*SolveRequest)(nil), // 19: moby.buildkit.v1.frontend.SolveRequest - (*CacheOptionsEntry)(nil), // 20: moby.buildkit.v1.frontend.CacheOptionsEntry - (*SolveResponse)(nil), // 21: moby.buildkit.v1.frontend.SolveResponse - (*ReadFileRequest)(nil), // 22: moby.buildkit.v1.frontend.ReadFileRequest - (*FileRange)(nil), // 23: moby.buildkit.v1.frontend.FileRange - (*ReadFileResponse)(nil), // 24: moby.buildkit.v1.frontend.ReadFileResponse - (*ReadDirRequest)(nil), // 25: moby.buildkit.v1.frontend.ReadDirRequest - (*ReadDirResponse)(nil), // 26: moby.buildkit.v1.frontend.ReadDirResponse - (*StatFileRequest)(nil), // 27: moby.buildkit.v1.frontend.StatFileRequest - (*StatFileResponse)(nil), // 28: moby.buildkit.v1.frontend.StatFileResponse - (*EvaluateRequest)(nil), // 29: moby.buildkit.v1.frontend.EvaluateRequest - (*EvaluateResponse)(nil), // 30: moby.buildkit.v1.frontend.EvaluateResponse - (*PingRequest)(nil), // 31: moby.buildkit.v1.frontend.PingRequest - (*PongResponse)(nil), // 32: moby.buildkit.v1.frontend.PongResponse - (*WarnRequest)(nil), // 33: moby.buildkit.v1.frontend.WarnRequest - (*WarnResponse)(nil), // 34: moby.buildkit.v1.frontend.WarnResponse - (*NewContainerRequest)(nil), // 35: moby.buildkit.v1.frontend.NewContainerRequest - (*NewContainerResponse)(nil), // 36: moby.buildkit.v1.frontend.NewContainerResponse - (*ReleaseContainerRequest)(nil), // 37: moby.buildkit.v1.frontend.ReleaseContainerRequest - (*ReleaseContainerResponse)(nil), // 38: moby.buildkit.v1.frontend.ReleaseContainerResponse - (*ExecMessage)(nil), // 39: moby.buildkit.v1.frontend.ExecMessage - (*InitMessage)(nil), // 40: moby.buildkit.v1.frontend.InitMessage - (*ExitMessage)(nil), // 41: moby.buildkit.v1.frontend.ExitMessage - (*StartedMessage)(nil), // 42: moby.buildkit.v1.frontend.StartedMessage - (*DoneMessage)(nil), // 43: moby.buildkit.v1.frontend.DoneMessage - (*FdMessage)(nil), // 44: moby.buildkit.v1.frontend.FdMessage - (*ResizeMessage)(nil), // 45: moby.buildkit.v1.frontend.ResizeMessage - (*SignalMessage)(nil), // 46: moby.buildkit.v1.frontend.SignalMessage - nil, // 47: moby.buildkit.v1.frontend.Result.MetadataEntry - nil, // 48: moby.buildkit.v1.frontend.Result.AttestationsEntry - nil, // 49: moby.buildkit.v1.frontend.RefMapDeprecated.RefsEntry - nil, // 50: moby.buildkit.v1.frontend.RefMap.RefsEntry - nil, // 51: moby.buildkit.v1.frontend.Attestation.MetadataEntry - nil, // 52: moby.buildkit.v1.frontend.InputsResponse.DefinitionsEntry - nil, // 53: moby.buildkit.v1.frontend.SolveRequest.FrontendOptEntry - nil, // 54: moby.buildkit.v1.frontend.SolveRequest.FrontendInputsEntry - nil, // 55: moby.buildkit.v1.frontend.CacheOptionsEntry.AttrsEntry - (*pb.Definition)(nil), // 56: pb.Definition - (*status.Status)(nil), // 57: google.rpc.Status - (*pb.Platform)(nil), // 58: pb.Platform - (*pb1.Policy)(nil), // 59: moby.buildkit.v1.sourcepolicy.Policy - (*pb.SourceOp)(nil), // 60: pb.SourceOp - (*types.Stat)(nil), // 61: fsutil.types.Stat - (*pb2.APICap)(nil), // 62: moby.buildkit.v1.apicaps.APICap - (*types1.WorkerRecord)(nil), // 63: moby.buildkit.v1.types.WorkerRecord - (*pb.SourceInfo)(nil), // 64: pb.SourceInfo - (*pb.Range)(nil), // 65: pb.Range - (*pb.Mount)(nil), // 66: pb.Mount - (pb.NetMode)(0), // 67: pb.NetMode - (*pb.WorkerConstraints)(nil), // 68: pb.WorkerConstraints - (*pb.HostIP)(nil), // 69: pb.HostIP - (*pb.Meta)(nil), // 70: pb.Meta - (pb.SecurityMode)(0), // 71: pb.SecurityMode - (*pb.SecretEnv)(nil), // 72: pb.SecretEnv + (*ResolveSourceHTTPResponse)(nil), // 19: moby.buildkit.v1.frontend.ResolveSourceHTTPResponse + (*SolveRequest)(nil), // 20: moby.buildkit.v1.frontend.SolveRequest + (*CacheOptionsEntry)(nil), // 21: moby.buildkit.v1.frontend.CacheOptionsEntry + (*SolveResponse)(nil), // 22: moby.buildkit.v1.frontend.SolveResponse + (*ReadFileRequest)(nil), // 23: moby.buildkit.v1.frontend.ReadFileRequest + (*FileRange)(nil), // 24: moby.buildkit.v1.frontend.FileRange + (*ReadFileResponse)(nil), // 25: moby.buildkit.v1.frontend.ReadFileResponse + (*ReadDirRequest)(nil), // 26: moby.buildkit.v1.frontend.ReadDirRequest + (*ReadDirResponse)(nil), // 27: moby.buildkit.v1.frontend.ReadDirResponse + (*StatFileRequest)(nil), // 28: moby.buildkit.v1.frontend.StatFileRequest + (*StatFileResponse)(nil), // 29: moby.buildkit.v1.frontend.StatFileResponse + (*EvaluateRequest)(nil), // 30: moby.buildkit.v1.frontend.EvaluateRequest + (*EvaluateResponse)(nil), // 31: moby.buildkit.v1.frontend.EvaluateResponse + (*PingRequest)(nil), // 32: moby.buildkit.v1.frontend.PingRequest + (*PongResponse)(nil), // 33: moby.buildkit.v1.frontend.PongResponse + (*WarnRequest)(nil), // 34: moby.buildkit.v1.frontend.WarnRequest + (*WarnResponse)(nil), // 35: moby.buildkit.v1.frontend.WarnResponse + (*NewContainerRequest)(nil), // 36: moby.buildkit.v1.frontend.NewContainerRequest + (*NewContainerResponse)(nil), // 37: moby.buildkit.v1.frontend.NewContainerResponse + (*ReleaseContainerRequest)(nil), // 38: moby.buildkit.v1.frontend.ReleaseContainerRequest + (*ReleaseContainerResponse)(nil), // 39: moby.buildkit.v1.frontend.ReleaseContainerResponse + (*ExecMessage)(nil), // 40: moby.buildkit.v1.frontend.ExecMessage + (*InitMessage)(nil), // 41: moby.buildkit.v1.frontend.InitMessage + (*ExitMessage)(nil), // 42: moby.buildkit.v1.frontend.ExitMessage + (*StartedMessage)(nil), // 43: moby.buildkit.v1.frontend.StartedMessage + (*DoneMessage)(nil), // 44: moby.buildkit.v1.frontend.DoneMessage + (*FdMessage)(nil), // 45: moby.buildkit.v1.frontend.FdMessage + (*ResizeMessage)(nil), // 46: moby.buildkit.v1.frontend.ResizeMessage + (*SignalMessage)(nil), // 47: moby.buildkit.v1.frontend.SignalMessage + nil, // 48: moby.buildkit.v1.frontend.Result.MetadataEntry + nil, // 49: moby.buildkit.v1.frontend.Result.AttestationsEntry + nil, // 50: moby.buildkit.v1.frontend.RefMapDeprecated.RefsEntry + nil, // 51: moby.buildkit.v1.frontend.RefMap.RefsEntry + nil, // 52: moby.buildkit.v1.frontend.Attestation.MetadataEntry + nil, // 53: moby.buildkit.v1.frontend.InputsResponse.DefinitionsEntry + nil, // 54: moby.buildkit.v1.frontend.SolveRequest.FrontendOptEntry + nil, // 55: moby.buildkit.v1.frontend.SolveRequest.FrontendInputsEntry + nil, // 56: moby.buildkit.v1.frontend.CacheOptionsEntry.AttrsEntry + (*pb.Definition)(nil), // 57: pb.Definition + (*status.Status)(nil), // 58: google.rpc.Status + (*pb.Platform)(nil), // 59: pb.Platform + (*pb1.Policy)(nil), // 60: moby.buildkit.v1.sourcepolicy.Policy + (*pb.SourceOp)(nil), // 61: pb.SourceOp + (*timestamp.Timestamp)(nil), // 62: google.protobuf.Timestamp + (*types.Stat)(nil), // 63: fsutil.types.Stat + (*pb2.APICap)(nil), // 64: moby.buildkit.v1.apicaps.APICap + (*types1.WorkerRecord)(nil), // 65: moby.buildkit.v1.types.WorkerRecord + (*pb.SourceInfo)(nil), // 66: pb.SourceInfo + (*pb.Range)(nil), // 67: pb.Range + (*pb.Mount)(nil), // 68: pb.Mount + (pb.NetMode)(0), // 69: pb.NetMode + (*pb.WorkerConstraints)(nil), // 70: pb.WorkerConstraints + (*pb.HostIP)(nil), // 71: pb.HostIP + (*pb.Meta)(nil), // 72: pb.Meta + (pb.SecurityMode)(0), // 73: pb.SecurityMode + (*pb.SecretEnv)(nil), // 74: pb.SecretEnv } var file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_depIdxs = []int32{ 3, // 0: moby.buildkit.v1.frontend.Result.refsDeprecated:type_name -> moby.buildkit.v1.frontend.RefMapDeprecated 4, // 1: moby.buildkit.v1.frontend.Result.ref:type_name -> moby.buildkit.v1.frontend.Ref 5, // 2: moby.buildkit.v1.frontend.Result.refs:type_name -> moby.buildkit.v1.frontend.RefMap - 47, // 3: moby.buildkit.v1.frontend.Result.metadata:type_name -> moby.buildkit.v1.frontend.Result.MetadataEntry - 48, // 4: moby.buildkit.v1.frontend.Result.attestations:type_name -> moby.buildkit.v1.frontend.Result.AttestationsEntry - 49, // 5: moby.buildkit.v1.frontend.RefMapDeprecated.refs:type_name -> moby.buildkit.v1.frontend.RefMapDeprecated.RefsEntry - 56, // 6: moby.buildkit.v1.frontend.Ref.def:type_name -> pb.Definition - 50, // 7: moby.buildkit.v1.frontend.RefMap.refs:type_name -> moby.buildkit.v1.frontend.RefMap.RefsEntry + 48, // 3: moby.buildkit.v1.frontend.Result.metadata:type_name -> moby.buildkit.v1.frontend.Result.MetadataEntry + 49, // 4: moby.buildkit.v1.frontend.Result.attestations:type_name -> moby.buildkit.v1.frontend.Result.AttestationsEntry + 50, // 5: moby.buildkit.v1.frontend.RefMapDeprecated.refs:type_name -> moby.buildkit.v1.frontend.RefMapDeprecated.RefsEntry + 57, // 6: moby.buildkit.v1.frontend.Ref.def:type_name -> pb.Definition + 51, // 7: moby.buildkit.v1.frontend.RefMap.refs:type_name -> moby.buildkit.v1.frontend.RefMap.RefsEntry 7, // 8: moby.buildkit.v1.frontend.Attestations.attestation:type_name -> moby.buildkit.v1.frontend.Attestation 0, // 9: moby.buildkit.v1.frontend.Attestation.kind:type_name -> moby.buildkit.v1.frontend.AttestationKind - 51, // 10: moby.buildkit.v1.frontend.Attestation.metadata:type_name -> moby.buildkit.v1.frontend.Attestation.MetadataEntry + 52, // 10: moby.buildkit.v1.frontend.Attestation.metadata:type_name -> moby.buildkit.v1.frontend.Attestation.MetadataEntry 4, // 11: moby.buildkit.v1.frontend.Attestation.ref:type_name -> moby.buildkit.v1.frontend.Ref 8, // 12: moby.buildkit.v1.frontend.Attestation.inTotoSubjects:type_name -> moby.buildkit.v1.frontend.InTotoSubject 1, // 13: moby.buildkit.v1.frontend.InTotoSubject.kind:type_name -> moby.buildkit.v1.frontend.InTotoSubjectKind 2, // 14: moby.buildkit.v1.frontend.ReturnRequest.result:type_name -> moby.buildkit.v1.frontend.Result - 57, // 15: moby.buildkit.v1.frontend.ReturnRequest.error:type_name -> google.rpc.Status - 52, // 16: moby.buildkit.v1.frontend.InputsResponse.Definitions:type_name -> moby.buildkit.v1.frontend.InputsResponse.DefinitionsEntry - 58, // 17: moby.buildkit.v1.frontend.ResolveImageConfigRequest.Platform:type_name -> pb.Platform - 59, // 18: moby.buildkit.v1.frontend.ResolveImageConfigRequest.SourcePolicies:type_name -> moby.buildkit.v1.sourcepolicy.Policy - 60, // 19: moby.buildkit.v1.frontend.ResolveSourceMetaRequest.Source:type_name -> pb.SourceOp - 58, // 20: moby.buildkit.v1.frontend.ResolveSourceMetaRequest.Platform:type_name -> pb.Platform - 59, // 21: moby.buildkit.v1.frontend.ResolveSourceMetaRequest.SourcePolicies:type_name -> moby.buildkit.v1.sourcepolicy.Policy - 60, // 22: moby.buildkit.v1.frontend.ResolveSourceMetaResponse.Source:type_name -> pb.SourceOp + 58, // 15: moby.buildkit.v1.frontend.ReturnRequest.error:type_name -> google.rpc.Status + 53, // 16: moby.buildkit.v1.frontend.InputsResponse.Definitions:type_name -> moby.buildkit.v1.frontend.InputsResponse.DefinitionsEntry + 59, // 17: moby.buildkit.v1.frontend.ResolveImageConfigRequest.Platform:type_name -> pb.Platform + 60, // 18: moby.buildkit.v1.frontend.ResolveImageConfigRequest.SourcePolicies:type_name -> moby.buildkit.v1.sourcepolicy.Policy + 61, // 19: moby.buildkit.v1.frontend.ResolveSourceMetaRequest.Source:type_name -> pb.SourceOp + 59, // 20: moby.buildkit.v1.frontend.ResolveSourceMetaRequest.Platform:type_name -> pb.Platform + 60, // 21: moby.buildkit.v1.frontend.ResolveSourceMetaRequest.SourcePolicies:type_name -> moby.buildkit.v1.sourcepolicy.Policy + 61, // 22: moby.buildkit.v1.frontend.ResolveSourceMetaResponse.Source:type_name -> pb.SourceOp 17, // 23: moby.buildkit.v1.frontend.ResolveSourceMetaResponse.Image:type_name -> moby.buildkit.v1.frontend.ResolveSourceImageResponse 18, // 24: moby.buildkit.v1.frontend.ResolveSourceMetaResponse.Git:type_name -> moby.buildkit.v1.frontend.ResolveSourceGitResponse - 56, // 25: moby.buildkit.v1.frontend.SolveRequest.Definition:type_name -> pb.Definition - 53, // 26: moby.buildkit.v1.frontend.SolveRequest.FrontendOpt:type_name -> moby.buildkit.v1.frontend.SolveRequest.FrontendOptEntry - 20, // 27: moby.buildkit.v1.frontend.SolveRequest.CacheImports:type_name -> moby.buildkit.v1.frontend.CacheOptionsEntry - 54, // 28: moby.buildkit.v1.frontend.SolveRequest.FrontendInputs:type_name -> moby.buildkit.v1.frontend.SolveRequest.FrontendInputsEntry - 59, // 29: moby.buildkit.v1.frontend.SolveRequest.SourcePolicies:type_name -> moby.buildkit.v1.sourcepolicy.Policy - 55, // 30: moby.buildkit.v1.frontend.CacheOptionsEntry.Attrs:type_name -> moby.buildkit.v1.frontend.CacheOptionsEntry.AttrsEntry - 2, // 31: moby.buildkit.v1.frontend.SolveResponse.result:type_name -> moby.buildkit.v1.frontend.Result - 23, // 32: moby.buildkit.v1.frontend.ReadFileRequest.Range:type_name -> moby.buildkit.v1.frontend.FileRange - 61, // 33: moby.buildkit.v1.frontend.ReadDirResponse.entries:type_name -> fsutil.types.Stat - 61, // 34: moby.buildkit.v1.frontend.StatFileResponse.stat:type_name -> fsutil.types.Stat - 62, // 35: moby.buildkit.v1.frontend.PongResponse.FrontendAPICaps:type_name -> moby.buildkit.v1.apicaps.APICap - 62, // 36: moby.buildkit.v1.frontend.PongResponse.LLBCaps:type_name -> moby.buildkit.v1.apicaps.APICap - 63, // 37: moby.buildkit.v1.frontend.PongResponse.Workers:type_name -> moby.buildkit.v1.types.WorkerRecord - 64, // 38: moby.buildkit.v1.frontend.WarnRequest.info:type_name -> pb.SourceInfo - 65, // 39: moby.buildkit.v1.frontend.WarnRequest.ranges:type_name -> pb.Range - 66, // 40: moby.buildkit.v1.frontend.NewContainerRequest.Mounts:type_name -> pb.Mount - 67, // 41: moby.buildkit.v1.frontend.NewContainerRequest.Network:type_name -> pb.NetMode - 58, // 42: moby.buildkit.v1.frontend.NewContainerRequest.platform:type_name -> pb.Platform - 68, // 43: moby.buildkit.v1.frontend.NewContainerRequest.constraints:type_name -> pb.WorkerConstraints - 69, // 44: moby.buildkit.v1.frontend.NewContainerRequest.extraHosts:type_name -> pb.HostIP - 40, // 45: moby.buildkit.v1.frontend.ExecMessage.Init:type_name -> moby.buildkit.v1.frontend.InitMessage - 44, // 46: moby.buildkit.v1.frontend.ExecMessage.File:type_name -> moby.buildkit.v1.frontend.FdMessage - 45, // 47: moby.buildkit.v1.frontend.ExecMessage.Resize:type_name -> moby.buildkit.v1.frontend.ResizeMessage - 42, // 48: moby.buildkit.v1.frontend.ExecMessage.Started:type_name -> moby.buildkit.v1.frontend.StartedMessage - 41, // 49: moby.buildkit.v1.frontend.ExecMessage.Exit:type_name -> moby.buildkit.v1.frontend.ExitMessage - 43, // 50: moby.buildkit.v1.frontend.ExecMessage.Done:type_name -> moby.buildkit.v1.frontend.DoneMessage - 46, // 51: moby.buildkit.v1.frontend.ExecMessage.Signal:type_name -> moby.buildkit.v1.frontend.SignalMessage - 70, // 52: moby.buildkit.v1.frontend.InitMessage.Meta:type_name -> pb.Meta - 71, // 53: moby.buildkit.v1.frontend.InitMessage.Security:type_name -> pb.SecurityMode - 72, // 54: moby.buildkit.v1.frontend.InitMessage.secretenv:type_name -> pb.SecretEnv - 57, // 55: moby.buildkit.v1.frontend.ExitMessage.Error:type_name -> google.rpc.Status - 6, // 56: moby.buildkit.v1.frontend.Result.AttestationsEntry.value:type_name -> moby.buildkit.v1.frontend.Attestations - 4, // 57: moby.buildkit.v1.frontend.RefMap.RefsEntry.value:type_name -> moby.buildkit.v1.frontend.Ref - 56, // 58: moby.buildkit.v1.frontend.InputsResponse.DefinitionsEntry.value:type_name -> pb.Definition - 56, // 59: moby.buildkit.v1.frontend.SolveRequest.FrontendInputsEntry.value:type_name -> pb.Definition - 13, // 60: moby.buildkit.v1.frontend.LLBBridge.ResolveImageConfig:input_type -> moby.buildkit.v1.frontend.ResolveImageConfigRequest - 15, // 61: moby.buildkit.v1.frontend.LLBBridge.ResolveSourceMeta:input_type -> moby.buildkit.v1.frontend.ResolveSourceMetaRequest - 19, // 62: moby.buildkit.v1.frontend.LLBBridge.Solve:input_type -> moby.buildkit.v1.frontend.SolveRequest - 22, // 63: moby.buildkit.v1.frontend.LLBBridge.ReadFile:input_type -> moby.buildkit.v1.frontend.ReadFileRequest - 25, // 64: moby.buildkit.v1.frontend.LLBBridge.ReadDir:input_type -> moby.buildkit.v1.frontend.ReadDirRequest - 27, // 65: moby.buildkit.v1.frontend.LLBBridge.StatFile:input_type -> moby.buildkit.v1.frontend.StatFileRequest - 29, // 66: moby.buildkit.v1.frontend.LLBBridge.Evaluate:input_type -> moby.buildkit.v1.frontend.EvaluateRequest - 31, // 67: moby.buildkit.v1.frontend.LLBBridge.Ping:input_type -> moby.buildkit.v1.frontend.PingRequest - 9, // 68: moby.buildkit.v1.frontend.LLBBridge.Return:input_type -> moby.buildkit.v1.frontend.ReturnRequest - 11, // 69: moby.buildkit.v1.frontend.LLBBridge.Inputs:input_type -> moby.buildkit.v1.frontend.InputsRequest - 35, // 70: moby.buildkit.v1.frontend.LLBBridge.NewContainer:input_type -> moby.buildkit.v1.frontend.NewContainerRequest - 37, // 71: moby.buildkit.v1.frontend.LLBBridge.ReleaseContainer:input_type -> moby.buildkit.v1.frontend.ReleaseContainerRequest - 39, // 72: moby.buildkit.v1.frontend.LLBBridge.ExecProcess:input_type -> moby.buildkit.v1.frontend.ExecMessage - 33, // 73: moby.buildkit.v1.frontend.LLBBridge.Warn:input_type -> moby.buildkit.v1.frontend.WarnRequest - 14, // 74: moby.buildkit.v1.frontend.LLBBridge.ResolveImageConfig:output_type -> moby.buildkit.v1.frontend.ResolveImageConfigResponse - 16, // 75: moby.buildkit.v1.frontend.LLBBridge.ResolveSourceMeta:output_type -> moby.buildkit.v1.frontend.ResolveSourceMetaResponse - 21, // 76: moby.buildkit.v1.frontend.LLBBridge.Solve:output_type -> moby.buildkit.v1.frontend.SolveResponse - 24, // 77: moby.buildkit.v1.frontend.LLBBridge.ReadFile:output_type -> moby.buildkit.v1.frontend.ReadFileResponse - 26, // 78: moby.buildkit.v1.frontend.LLBBridge.ReadDir:output_type -> moby.buildkit.v1.frontend.ReadDirResponse - 28, // 79: moby.buildkit.v1.frontend.LLBBridge.StatFile:output_type -> moby.buildkit.v1.frontend.StatFileResponse - 30, // 80: moby.buildkit.v1.frontend.LLBBridge.Evaluate:output_type -> moby.buildkit.v1.frontend.EvaluateResponse - 32, // 81: moby.buildkit.v1.frontend.LLBBridge.Ping:output_type -> moby.buildkit.v1.frontend.PongResponse - 10, // 82: moby.buildkit.v1.frontend.LLBBridge.Return:output_type -> moby.buildkit.v1.frontend.ReturnResponse - 12, // 83: moby.buildkit.v1.frontend.LLBBridge.Inputs:output_type -> moby.buildkit.v1.frontend.InputsResponse - 36, // 84: moby.buildkit.v1.frontend.LLBBridge.NewContainer:output_type -> moby.buildkit.v1.frontend.NewContainerResponse - 38, // 85: moby.buildkit.v1.frontend.LLBBridge.ReleaseContainer:output_type -> moby.buildkit.v1.frontend.ReleaseContainerResponse - 39, // 86: moby.buildkit.v1.frontend.LLBBridge.ExecProcess:output_type -> moby.buildkit.v1.frontend.ExecMessage - 34, // 87: moby.buildkit.v1.frontend.LLBBridge.Warn:output_type -> moby.buildkit.v1.frontend.WarnResponse - 74, // [74:88] is the sub-list for method output_type - 60, // [60:74] is the sub-list for method input_type - 60, // [60:60] is the sub-list for extension type_name - 60, // [60:60] is the sub-list for extension extendee - 0, // [0:60] is the sub-list for field type_name + 19, // 25: moby.buildkit.v1.frontend.ResolveSourceMetaResponse.HTTP:type_name -> moby.buildkit.v1.frontend.ResolveSourceHTTPResponse + 62, // 26: moby.buildkit.v1.frontend.ResolveSourceHTTPResponse.LastModified:type_name -> google.protobuf.Timestamp + 57, // 27: moby.buildkit.v1.frontend.SolveRequest.Definition:type_name -> pb.Definition + 54, // 28: moby.buildkit.v1.frontend.SolveRequest.FrontendOpt:type_name -> moby.buildkit.v1.frontend.SolveRequest.FrontendOptEntry + 21, // 29: moby.buildkit.v1.frontend.SolveRequest.CacheImports:type_name -> moby.buildkit.v1.frontend.CacheOptionsEntry + 55, // 30: moby.buildkit.v1.frontend.SolveRequest.FrontendInputs:type_name -> moby.buildkit.v1.frontend.SolveRequest.FrontendInputsEntry + 60, // 31: moby.buildkit.v1.frontend.SolveRequest.SourcePolicies:type_name -> moby.buildkit.v1.sourcepolicy.Policy + 56, // 32: moby.buildkit.v1.frontend.CacheOptionsEntry.Attrs:type_name -> moby.buildkit.v1.frontend.CacheOptionsEntry.AttrsEntry + 2, // 33: moby.buildkit.v1.frontend.SolveResponse.result:type_name -> moby.buildkit.v1.frontend.Result + 24, // 34: moby.buildkit.v1.frontend.ReadFileRequest.Range:type_name -> moby.buildkit.v1.frontend.FileRange + 63, // 35: moby.buildkit.v1.frontend.ReadDirResponse.entries:type_name -> fsutil.types.Stat + 63, // 36: moby.buildkit.v1.frontend.StatFileResponse.stat:type_name -> fsutil.types.Stat + 64, // 37: moby.buildkit.v1.frontend.PongResponse.FrontendAPICaps:type_name -> moby.buildkit.v1.apicaps.APICap + 64, // 38: moby.buildkit.v1.frontend.PongResponse.LLBCaps:type_name -> moby.buildkit.v1.apicaps.APICap + 65, // 39: moby.buildkit.v1.frontend.PongResponse.Workers:type_name -> moby.buildkit.v1.types.WorkerRecord + 66, // 40: moby.buildkit.v1.frontend.WarnRequest.info:type_name -> pb.SourceInfo + 67, // 41: moby.buildkit.v1.frontend.WarnRequest.ranges:type_name -> pb.Range + 68, // 42: moby.buildkit.v1.frontend.NewContainerRequest.Mounts:type_name -> pb.Mount + 69, // 43: moby.buildkit.v1.frontend.NewContainerRequest.Network:type_name -> pb.NetMode + 59, // 44: moby.buildkit.v1.frontend.NewContainerRequest.platform:type_name -> pb.Platform + 70, // 45: moby.buildkit.v1.frontend.NewContainerRequest.constraints:type_name -> pb.WorkerConstraints + 71, // 46: moby.buildkit.v1.frontend.NewContainerRequest.extraHosts:type_name -> pb.HostIP + 41, // 47: moby.buildkit.v1.frontend.ExecMessage.Init:type_name -> moby.buildkit.v1.frontend.InitMessage + 45, // 48: moby.buildkit.v1.frontend.ExecMessage.File:type_name -> moby.buildkit.v1.frontend.FdMessage + 46, // 49: moby.buildkit.v1.frontend.ExecMessage.Resize:type_name -> moby.buildkit.v1.frontend.ResizeMessage + 43, // 50: moby.buildkit.v1.frontend.ExecMessage.Started:type_name -> moby.buildkit.v1.frontend.StartedMessage + 42, // 51: moby.buildkit.v1.frontend.ExecMessage.Exit:type_name -> moby.buildkit.v1.frontend.ExitMessage + 44, // 52: moby.buildkit.v1.frontend.ExecMessage.Done:type_name -> moby.buildkit.v1.frontend.DoneMessage + 47, // 53: moby.buildkit.v1.frontend.ExecMessage.Signal:type_name -> moby.buildkit.v1.frontend.SignalMessage + 72, // 54: moby.buildkit.v1.frontend.InitMessage.Meta:type_name -> pb.Meta + 73, // 55: moby.buildkit.v1.frontend.InitMessage.Security:type_name -> pb.SecurityMode + 74, // 56: moby.buildkit.v1.frontend.InitMessage.secretenv:type_name -> pb.SecretEnv + 58, // 57: moby.buildkit.v1.frontend.ExitMessage.Error:type_name -> google.rpc.Status + 6, // 58: moby.buildkit.v1.frontend.Result.AttestationsEntry.value:type_name -> moby.buildkit.v1.frontend.Attestations + 4, // 59: moby.buildkit.v1.frontend.RefMap.RefsEntry.value:type_name -> moby.buildkit.v1.frontend.Ref + 57, // 60: moby.buildkit.v1.frontend.InputsResponse.DefinitionsEntry.value:type_name -> pb.Definition + 57, // 61: moby.buildkit.v1.frontend.SolveRequest.FrontendInputsEntry.value:type_name -> pb.Definition + 13, // 62: moby.buildkit.v1.frontend.LLBBridge.ResolveImageConfig:input_type -> moby.buildkit.v1.frontend.ResolveImageConfigRequest + 15, // 63: moby.buildkit.v1.frontend.LLBBridge.ResolveSourceMeta:input_type -> moby.buildkit.v1.frontend.ResolveSourceMetaRequest + 20, // 64: moby.buildkit.v1.frontend.LLBBridge.Solve:input_type -> moby.buildkit.v1.frontend.SolveRequest + 23, // 65: moby.buildkit.v1.frontend.LLBBridge.ReadFile:input_type -> moby.buildkit.v1.frontend.ReadFileRequest + 26, // 66: moby.buildkit.v1.frontend.LLBBridge.ReadDir:input_type -> moby.buildkit.v1.frontend.ReadDirRequest + 28, // 67: moby.buildkit.v1.frontend.LLBBridge.StatFile:input_type -> moby.buildkit.v1.frontend.StatFileRequest + 30, // 68: moby.buildkit.v1.frontend.LLBBridge.Evaluate:input_type -> moby.buildkit.v1.frontend.EvaluateRequest + 32, // 69: moby.buildkit.v1.frontend.LLBBridge.Ping:input_type -> moby.buildkit.v1.frontend.PingRequest + 9, // 70: moby.buildkit.v1.frontend.LLBBridge.Return:input_type -> moby.buildkit.v1.frontend.ReturnRequest + 11, // 71: moby.buildkit.v1.frontend.LLBBridge.Inputs:input_type -> moby.buildkit.v1.frontend.InputsRequest + 36, // 72: moby.buildkit.v1.frontend.LLBBridge.NewContainer:input_type -> moby.buildkit.v1.frontend.NewContainerRequest + 38, // 73: moby.buildkit.v1.frontend.LLBBridge.ReleaseContainer:input_type -> moby.buildkit.v1.frontend.ReleaseContainerRequest + 40, // 74: moby.buildkit.v1.frontend.LLBBridge.ExecProcess:input_type -> moby.buildkit.v1.frontend.ExecMessage + 34, // 75: moby.buildkit.v1.frontend.LLBBridge.Warn:input_type -> moby.buildkit.v1.frontend.WarnRequest + 14, // 76: moby.buildkit.v1.frontend.LLBBridge.ResolveImageConfig:output_type -> moby.buildkit.v1.frontend.ResolveImageConfigResponse + 16, // 77: moby.buildkit.v1.frontend.LLBBridge.ResolveSourceMeta:output_type -> moby.buildkit.v1.frontend.ResolveSourceMetaResponse + 22, // 78: moby.buildkit.v1.frontend.LLBBridge.Solve:output_type -> moby.buildkit.v1.frontend.SolveResponse + 25, // 79: moby.buildkit.v1.frontend.LLBBridge.ReadFile:output_type -> moby.buildkit.v1.frontend.ReadFileResponse + 27, // 80: moby.buildkit.v1.frontend.LLBBridge.ReadDir:output_type -> moby.buildkit.v1.frontend.ReadDirResponse + 29, // 81: moby.buildkit.v1.frontend.LLBBridge.StatFile:output_type -> moby.buildkit.v1.frontend.StatFileResponse + 31, // 82: moby.buildkit.v1.frontend.LLBBridge.Evaluate:output_type -> moby.buildkit.v1.frontend.EvaluateResponse + 33, // 83: moby.buildkit.v1.frontend.LLBBridge.Ping:output_type -> moby.buildkit.v1.frontend.PongResponse + 10, // 84: moby.buildkit.v1.frontend.LLBBridge.Return:output_type -> moby.buildkit.v1.frontend.ReturnResponse + 12, // 85: moby.buildkit.v1.frontend.LLBBridge.Inputs:output_type -> moby.buildkit.v1.frontend.InputsResponse + 37, // 86: moby.buildkit.v1.frontend.LLBBridge.NewContainer:output_type -> moby.buildkit.v1.frontend.NewContainerResponse + 39, // 87: moby.buildkit.v1.frontend.LLBBridge.ReleaseContainer:output_type -> moby.buildkit.v1.frontend.ReleaseContainerResponse + 40, // 88: moby.buildkit.v1.frontend.LLBBridge.ExecProcess:output_type -> moby.buildkit.v1.frontend.ExecMessage + 35, // 89: moby.buildkit.v1.frontend.LLBBridge.Warn:output_type -> moby.buildkit.v1.frontend.WarnResponse + 76, // [76:90] is the sub-list for method output_type + 62, // [62:76] is the sub-list for method input_type + 62, // [62:62] is the sub-list for extension type_name + 62, // [62:62] is the sub-list for extension extendee + 0, // [0:62] is the sub-list for field type_name } func init() { file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_init() } @@ -3231,7 +3309,7 @@ func file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_init() { (*Result_Ref)(nil), (*Result_Refs)(nil), } - file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[37].OneofWrappers = []any{ + file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_msgTypes[38].OneofWrappers = []any{ (*ExecMessage_Init)(nil), (*ExecMessage_File)(nil), (*ExecMessage_Resize)(nil), @@ -3246,7 +3324,7 @@ func file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDesc), len(file_github_com_moby_buildkit_frontend_gateway_pb_gateway_proto_rawDesc)), NumEnums: 2, - NumMessages: 54, + NumMessages: 55, NumExtensions: 0, NumServices: 1, }, diff --git a/frontend/gateway/pb/gateway.proto b/frontend/gateway/pb/gateway.proto index af2c48191b0f..087e3efa6e23 100644 --- a/frontend/gateway/pb/gateway.proto +++ b/frontend/gateway/pb/gateway.proto @@ -9,6 +9,7 @@ import "github.com/moby/buildkit/solver/pb/ops.proto"; import "github.com/moby/buildkit/sourcepolicy/pb/policy.proto"; import "github.com/moby/buildkit/util/apicaps/pb/caps.proto"; import "github.com/tonistiigi/fsutil/types/stat.proto"; +import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; service LLBBridge { @@ -141,6 +142,7 @@ message ResolveSourceMetaResponse { pb.SourceOp Source = 1; ResolveSourceImageResponse Image = 2; ResolveSourceGitResponse Git = 3; + ResolveSourceHTTPResponse HTTP = 4; } message ResolveSourceImageResponse { @@ -154,6 +156,12 @@ message ResolveSourceGitResponse { string CommitChecksum = 3; } +message ResolveSourceHTTPResponse { + string Checksum = 1; + string Filename = 2; + google.protobuf.Timestamp LastModified = 3; +} + message SolveRequest { pb.Definition Definition = 1; string Frontend = 2; diff --git a/frontend/gateway/pb/gateway_vtproto.pb.go b/frontend/gateway/pb/gateway_vtproto.pb.go index 4d607d62d5e9..15c3a93fd56f 100644 --- a/frontend/gateway/pb/gateway_vtproto.pb.go +++ b/frontend/gateway/pb/gateway_vtproto.pb.go @@ -6,11 +6,13 @@ package moby_buildkit_v1_frontend import ( fmt "fmt" + timestamp "github.com/golang/protobuf/ptypes/timestamp" types1 "github.com/moby/buildkit/api/types" pb "github.com/moby/buildkit/solver/pb" pb1 "github.com/moby/buildkit/sourcepolicy/pb" pb2 "github.com/moby/buildkit/util/apicaps/pb" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + timestamppb "github.com/planetscale/vtprotobuf/types/known/timestamppb" types "github.com/tonistiigi/fsutil/types" status "google.golang.org/genproto/googleapis/rpc/status" proto "google.golang.org/protobuf/proto" @@ -409,6 +411,7 @@ func (m *ResolveSourceMetaResponse) CloneVT() *ResolveSourceMetaResponse { r.Source = m.Source.CloneVT() r.Image = m.Image.CloneVT() r.Git = m.Git.CloneVT() + r.HTTP = m.HTTP.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -461,6 +464,25 @@ func (m *ResolveSourceGitResponse) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *ResolveSourceHTTPResponse) CloneVT() *ResolveSourceHTTPResponse { + if m == nil { + return (*ResolveSourceHTTPResponse)(nil) + } + r := new(ResolveSourceHTTPResponse) + r.Checksum = m.Checksum + r.Filename = m.Filename + r.LastModified = (*timestamp.Timestamp)((*timestamppb.Timestamp)(m.LastModified).CloneVT()) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ResolveSourceHTTPResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (m *SolveRequest) CloneVT() *SolveRequest { if m == nil { return (*SolveRequest)(nil) @@ -1749,6 +1771,9 @@ func (this *ResolveSourceMetaResponse) EqualVT(that *ResolveSourceMetaResponse) if !this.Git.EqualVT(that.Git) { return false } + if !this.HTTP.EqualVT(that.HTTP) { + return false + } return string(this.unknownFields) == string(that.unknownFields) } @@ -1806,6 +1831,31 @@ func (this *ResolveSourceGitResponse) EqualMessageVT(thatMsg proto.Message) bool } return this.EqualVT(that) } +func (this *ResolveSourceHTTPResponse) EqualVT(that *ResolveSourceHTTPResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Checksum != that.Checksum { + return false + } + if this.Filename != that.Filename { + return false + } + if !(*timestamppb.Timestamp)(this.LastModified).EqualVT((*timestamppb.Timestamp)(that.LastModified)) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ResolveSourceHTTPResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ResolveSourceHTTPResponse) + if !ok { + return false + } + return this.EqualVT(that) +} func (this *SolveRequest) EqualVT(that *SolveRequest) bool { if this == that { return true @@ -3785,6 +3835,16 @@ func (m *ResolveSourceMetaResponse) MarshalToSizedBufferVT(dAtA []byte) (int, er i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.HTTP != nil { + size, err := m.HTTP.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } if m.Git != nil { size, err := m.Git.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { @@ -3919,6 +3979,63 @@ func (m *ResolveSourceGitResponse) MarshalToSizedBufferVT(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *ResolveSourceHTTPResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResolveSourceHTTPResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ResolveSourceHTTPResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.LastModified != nil { + size, err := (*timestamppb.Timestamp)(m.LastModified).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.Filename) > 0 { + i -= len(m.Filename) + copy(dAtA[i:], m.Filename) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Filename))) + i-- + dAtA[i] = 0x12 + } + if len(m.Checksum) > 0 { + i -= len(m.Checksum) + copy(dAtA[i:], m.Checksum) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Checksum))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *SolveRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -6021,6 +6138,10 @@ func (m *ResolveSourceMetaResponse) SizeVT() (n int) { l = m.Git.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } + if m.HTTP != nil { + l = m.HTTP.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } n += len(m.unknownFields) return n } @@ -6065,6 +6186,28 @@ func (m *ResolveSourceGitResponse) SizeVT() (n int) { return n } +func (m *ResolveSourceHTTPResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Checksum) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Filename) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.LastModified != nil { + l = (*timestamppb.Timestamp)(m.LastModified).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + func (m *SolveRequest) SizeVT() (n int) { if m == nil { return 0 @@ -9450,6 +9593,42 @@ func (m *ResolveSourceMetaResponse) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HTTP", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HTTP == nil { + m.HTTP = &ResolveSourceHTTPResponse{} + } + if err := m.HTTP.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -9736,6 +9915,157 @@ func (m *ResolveSourceGitResponse) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *ResolveSourceHTTPResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResolveSourceHTTPResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResolveSourceHTTPResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Checksum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Checksum = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filename = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastModified", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastModified == nil { + m.LastModified = ×tamp.Timestamp{} + } + if err := (*timestamppb.Timestamp)(m.LastModified).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *SolveRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/source/http/source.go b/source/http/source.go index da36bdea026f..6f15bf2c48ad 100644 --- a/source/http/source.go +++ b/source/http/source.go @@ -52,28 +52,30 @@ type Opt struct { Transport http.RoundTripper } -type httpSource struct { +type Source struct { cache cache.Accessor transport http.RoundTripper } -func NewSource(opt Opt) (source.Source, error) { +var _ source.Source = &Source{} + +func NewSource(opt Opt) (*Source, error) { transport := opt.Transport if transport == nil { transport = tracing.DefaultTransport } - hs := &httpSource{ + hs := &Source{ cache: opt.CacheAccessor, transport: transport, } return hs, nil } -func (hs *httpSource) Schemes() []string { +func (hs *Source) Schemes() []string { return []string{srctypes.HTTPScheme, srctypes.HTTPSScheme} } -func (hs *httpSource) Identifier(scheme, ref string, attrs map[string]string, platform *pb.Platform) (source.Identifier, error) { +func (hs *Source) Identifier(scheme, ref string, attrs map[string]string, platform *pb.Platform) (source.Identifier, error) { id, err := NewHTTPIdentifier(ref, scheme == "https") if err != nil { return nil, err @@ -128,24 +130,39 @@ func (hs *httpSource) Identifier(scheme, ref string, attrs map[string]string, pl return id, nil } +type Metadata struct { + Digest digest.Digest + Filename string + LastModified *time.Time +} + type httpSourceHandler struct { - *httpSource + *Source src HTTPIdentifier refID string cacheKey digest.Digest sm *session.Manager } -func (hs *httpSource) Resolve(ctx context.Context, id source.Identifier, sm *session.Manager, _ solver.Vertex) (source.SourceInstance, error) { +func (hs *Source) ResolveMetadata(ctx context.Context, id *HTTPIdentifier, sm *session.Manager, g session.Group) (*Metadata, error) { + hsh := &httpSourceHandler{ + src: *id, + Source: hs, + sm: sm, + } + return hsh.resolveMetadata(ctx, g) +} + +func (hs *Source) Resolve(ctx context.Context, id source.Identifier, sm *session.Manager, _ solver.Vertex) (source.SourceInstance, error) { httpIdentifier, ok := id.(*HTTPIdentifier) if !ok { return nil, errors.Errorf("invalid http identifier %v", id) } return &httpSourceHandler{ - src: *httpIdentifier, - httpSource: hs, - sm: sm, + src: *httpIdentifier, + Source: hs, + sm: sm, }, nil } @@ -178,7 +195,11 @@ func (hs *httpSourceHandler) urlHash() (digest.Digest, error) { return digest.FromBytes(dt), nil } -func (hs *httpSourceHandler) formatCacheKey(filename string, dgst digest.Digest, lastModTime string) digest.Digest { +func (hs *httpSourceHandler) formatCacheKey(filename string, dgst digest.Digest, lastModTime *time.Time) digest.Digest { + var lastModTimeStr string + if lastModTime != nil { + lastModTimeStr = lastModTime.Format(http.TimeFormat) + } dt, err := json.Marshal(struct { Filename string Perm, UID, GID int @@ -192,7 +213,7 @@ func (hs *httpSourceHandler) formatCacheKey(filename string, dgst digest.Digest, UID: hs.src.UID, GID: hs.src.GID, Checksum: dgst, - LastModTime: lastModTime, + LastModTime: lastModTimeStr, AuthHeaderSecret: hs.src.AuthHeaderSecret, Header: hs.src.Header, }) @@ -205,26 +226,28 @@ func (hs *httpSourceHandler) formatCacheKey(filename string, dgst digest.Digest, return dgst } -func (hs *httpSourceHandler) CacheKey(ctx context.Context, g session.Group, index int) (string, string, solver.CacheOpts, bool, error) { +func (hs *httpSourceHandler) resolveMetadata(ctx context.Context, g session.Group) (*Metadata, error) { if hs.src.Checksum != "" { - hs.cacheKey = hs.src.Checksum - return hs.formatCacheKey(getFileName(hs.src.URL, hs.src.Filename, nil), hs.src.Checksum, "").String(), hs.src.Checksum.String(), nil, true, nil + return &Metadata{ + Digest: hs.src.Checksum, + Filename: getFileName(hs.src.URL, hs.src.Filename, nil), + }, nil } uh, err := hs.urlHash() if err != nil { - return "", "", nil, false, err + return nil, err } // look up metadata(previously stored headers) for that URL mds, err := searchHTTPURLDigest(ctx, hs.cache, uh) if err != nil { - return "", "", nil, false, errors.Wrapf(err, "failed to search metadata for %s", uh) + return nil, errors.Wrapf(err, "failed to search metadata for %s", uh) } req, err := hs.newHTTPRequest(ctx, g) if err != nil { - return "", "", nil, false, err + return nil, err } m := map[string]cacheRefMetadata{} @@ -286,10 +309,18 @@ func (hs *httpSourceHandler) CacheKey(ctx context.Context, g session.Group, inde hs.refID = md.ID() dgst := md.getHTTPChecksum() if dgst != "" { - hs.cacheKey = dgst - modTime := md.getHTTPModTime() + var modTime *time.Time + if modTimeStr := md.getHTTPModTime(); modTimeStr != "" { + if t, err := http.ParseTime(modTimeStr); err == nil { + modTime = &t + } + } resp.Body.Close() - return hs.formatCacheKey(getFileName(hs.src.URL, hs.src.Filename, resp), dgst, modTime).String(), dgst.String(), nil, true, nil + return &Metadata{ + Digest: dgst, + Filename: getFileName(hs.src.URL, hs.src.Filename, resp), + LastModified: modTime, + }, nil } } } @@ -304,10 +335,10 @@ func (hs *httpSourceHandler) CacheKey(ctx context.Context, g session.Group, inde resp, err := client.Do(req) if err != nil { - return "", "", nil, false, err + return nil, err } if resp.StatusCode < 200 || resp.StatusCode >= 400 { - return "", "", nil, false, errors.Errorf("invalid response status %d", resp.StatusCode) + return nil, errors.Errorf("invalid response status %d", resp.StatusCode) } if resp.StatusCode == http.StatusNotModified { respETag := etagValue(resp.Header.Get("ETag")) @@ -320,29 +351,55 @@ func (hs *httpSourceHandler) CacheKey(ctx context.Context, g session.Group, inde } md, ok := m[respETag] if !ok { - return "", "", nil, false, errors.Errorf("invalid not-modified ETag: %v", respETag) + return nil, errors.Errorf("invalid not-modified ETag: %v", respETag) } hs.refID = md.ID() dgst := md.getHTTPChecksum() if dgst == "" { - return "", "", nil, false, errors.Errorf("invalid metadata change") + return nil, errors.Errorf("invalid metadata change") } - hs.cacheKey = dgst - modTime := md.getHTTPModTime() - resp.Body.Close() - return hs.formatCacheKey(getFileName(hs.src.URL, hs.src.Filename, resp), dgst, modTime).String(), dgst.String(), nil, true, nil + resp.Body.Close() + var modTime *time.Time + if modTimeStr := md.getHTTPModTime(); modTimeStr != "" { + if t, err := http.ParseTime(modTimeStr); err == nil { + modTime = &t + } + } + return &Metadata{ + Digest: dgst, + Filename: getFileName(hs.src.URL, hs.src.Filename, resp), + LastModified: modTime, + }, nil } ref, dgst, err := hs.save(ctx, resp, g) if err != nil { - return "", "", nil, false, err + return nil, err } ref.Release(context.TODO()) - hs.cacheKey = dgst + var modTime *time.Time + if modTimeStr := resp.Header.Get("Last-Modified"); modTimeStr != "" { + if t, err := http.ParseTime(modTimeStr); err == nil { + modTime = &t + } + } + + return &Metadata{ + Digest: dgst, + Filename: getFileName(hs.src.URL, hs.src.Filename, resp), + LastModified: modTime, + }, nil +} - return hs.formatCacheKey(getFileName(hs.src.URL, hs.src.Filename, resp), dgst, resp.Header.Get("Last-Modified")).String(), dgst.String(), nil, true, nil +func (hs *httpSourceHandler) CacheKey(ctx context.Context, g session.Group, index int) (string, string, solver.CacheOpts, bool, error) { + md, err := hs.resolveMetadata(ctx, g) + if err != nil { + return "", "", nil, false, err + } + hs.cacheKey = md.Digest + return hs.formatCacheKey(md.Filename, md.Digest, md.LastModified).String(), md.Digest.String(), nil, true, nil } func (hs *httpSourceHandler) save(ctx context.Context, resp *http.Response, s session.Group) (ref cache.ImmutableRef, dgst digest.Digest, retErr error) { diff --git a/util/testutil/httpserver/server.go b/util/testutil/httpserver/server.go index 221c16da3ce7..de5536365d90 100644 --- a/util/testutil/httpserver/server.go +++ b/util/testutil/httpserver/server.go @@ -56,6 +56,10 @@ func (s *TestServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Encoding", resp.ContentEncoding) } + if resp.ContentDisposition != "" { + w.Header().Set("Content-Disposition", resp.ContentDisposition) + } + if resp.Etag != "" { w.Header().Set("ETag", resp.Etag) if match := r.Header.Get("If-None-Match"); match == resp.Etag { @@ -80,10 +84,11 @@ func (s *TestServer) Stats(name string) (st Stat) { } type Response struct { - Content []byte - Etag string - LastModified *time.Time - ContentEncoding string + Content []byte + Etag string + LastModified *time.Time + ContentEncoding string + ContentDisposition string } type Stat struct { diff --git a/worker/base/worker.go b/worker/base/worker.go index e54d06854b75..70600956fa08 100644 --- a/worker/base/worker.go +++ b/worker/base/worker.go @@ -96,6 +96,7 @@ type Worker struct { ImageSource *containerimage.Source OCILayoutSource *containerimage.Source GitSource *git.Source + HTTPSource *http.Source } // NewWorker instantiates a local worker @@ -214,6 +215,7 @@ func NewWorker(ctx context.Context, opt WorkerOpt) (*Worker, error) { ImageSource: is, OCILayoutSource: os, GitSource: gitSource, + HTTPSource: hs, }, nil } @@ -459,6 +461,22 @@ func (w *Worker) ResolveSourceMetadata(ctx context.Context, op *pb.SourceOp, opt CommitChecksum: md.CommitChecksum, }, }, nil + case *http.HTTPIdentifier: + if w.HTTPSource == nil { + return nil, errors.New("http source is not supported") + } + md, err := w.HTTPSource.ResolveMetadata(ctx, idt, sm, g) + if err != nil { + return nil, err + } + return &sourceresolver.MetaResponse{ + Op: op, + HTTP: &sourceresolver.ResolveHTTPResponse{ + Digest: md.Digest, + Filename: md.Filename, + LastModified: md.LastModified, + }, + }, nil } return &sourceresolver.MetaResponse{