hack: generate vtproto files for buildx

Integrates vtproto into buildx. The generated files dockerfile has been
modified to copy the buildkit equivalent file to ensure files are laid
out in the appropriate way for imports.

An import has also been included to change the grpc codec to the version
in buildkit that supports vtproto. This will allow buildx to utilize the
speed and memory improvements from that.

Also updates the gc control options for prune.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
Jonathan A. Sternberg
2024-10-08 13:35:06 -05:00
parent d353f5f6ba
commit 64c5139ab6
109 changed files with 68070 additions and 2941 deletions

View File

@ -2,7 +2,7 @@
// versions:
// protoc-gen-go v1.34.1
// protoc v3.11.4
// source: errdefs.proto
// source: github.com/moby/buildkit/solver/errdefs/errdefs.proto
package errdefs
@ -32,7 +32,7 @@ type Vertex struct {
func (x *Vertex) Reset() {
*x = Vertex{}
if protoimpl.UnsafeEnabled {
mi := &file_errdefs_proto_msgTypes[0]
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -45,7 +45,7 @@ func (x *Vertex) String() string {
func (*Vertex) ProtoMessage() {}
func (x *Vertex) ProtoReflect() protoreflect.Message {
mi := &file_errdefs_proto_msgTypes[0]
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -58,7 +58,7 @@ func (x *Vertex) ProtoReflect() protoreflect.Message {
// Deprecated: Use Vertex.ProtoReflect.Descriptor instead.
func (*Vertex) Descriptor() ([]byte, []int) {
return file_errdefs_proto_rawDescGZIP(), []int{0}
return file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescGZIP(), []int{0}
}
func (x *Vertex) GetDigest() string {
@ -80,7 +80,7 @@ type Source struct {
func (x *Source) Reset() {
*x = Source{}
if protoimpl.UnsafeEnabled {
mi := &file_errdefs_proto_msgTypes[1]
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -93,7 +93,7 @@ func (x *Source) String() string {
func (*Source) ProtoMessage() {}
func (x *Source) ProtoReflect() protoreflect.Message {
mi := &file_errdefs_proto_msgTypes[1]
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -106,7 +106,7 @@ func (x *Source) ProtoReflect() protoreflect.Message {
// Deprecated: Use Source.ProtoReflect.Descriptor instead.
func (*Source) Descriptor() ([]byte, []int) {
return file_errdefs_proto_rawDescGZIP(), []int{1}
return file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescGZIP(), []int{1}
}
func (x *Source) GetInfo() *pb.SourceInfo {
@ -134,7 +134,7 @@ type FrontendCap struct {
func (x *FrontendCap) Reset() {
*x = FrontendCap{}
if protoimpl.UnsafeEnabled {
mi := &file_errdefs_proto_msgTypes[2]
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -147,7 +147,7 @@ func (x *FrontendCap) String() string {
func (*FrontendCap) ProtoMessage() {}
func (x *FrontendCap) ProtoReflect() protoreflect.Message {
mi := &file_errdefs_proto_msgTypes[2]
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -160,7 +160,7 @@ func (x *FrontendCap) ProtoReflect() protoreflect.Message {
// Deprecated: Use FrontendCap.ProtoReflect.Descriptor instead.
func (*FrontendCap) Descriptor() ([]byte, []int) {
return file_errdefs_proto_rawDescGZIP(), []int{2}
return file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescGZIP(), []int{2}
}
func (x *FrontendCap) GetName() string {
@ -181,7 +181,7 @@ type Subrequest struct {
func (x *Subrequest) Reset() {
*x = Subrequest{}
if protoimpl.UnsafeEnabled {
mi := &file_errdefs_proto_msgTypes[3]
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -194,7 +194,7 @@ func (x *Subrequest) String() string {
func (*Subrequest) ProtoMessage() {}
func (x *Subrequest) ProtoReflect() protoreflect.Message {
mi := &file_errdefs_proto_msgTypes[3]
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -207,7 +207,7 @@ func (x *Subrequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use Subrequest.ProtoReflect.Descriptor instead.
func (*Subrequest) Descriptor() ([]byte, []int) {
return file_errdefs_proto_rawDescGZIP(), []int{3}
return file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescGZIP(), []int{3}
}
func (x *Subrequest) GetName() string {
@ -236,7 +236,7 @@ type Solve struct {
func (x *Solve) Reset() {
*x = Solve{}
if protoimpl.UnsafeEnabled {
mi := &file_errdefs_proto_msgTypes[4]
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -249,7 +249,7 @@ func (x *Solve) String() string {
func (*Solve) ProtoMessage() {}
func (x *Solve) ProtoReflect() protoreflect.Message {
mi := &file_errdefs_proto_msgTypes[4]
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -262,7 +262,7 @@ func (x *Solve) ProtoReflect() protoreflect.Message {
// Deprecated: Use Solve.ProtoReflect.Descriptor instead.
func (*Solve) Descriptor() ([]byte, []int) {
return file_errdefs_proto_rawDescGZIP(), []int{4}
return file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescGZIP(), []int{4}
}
func (x *Solve) GetInputIDs() []string {
@ -342,7 +342,7 @@ type FileAction struct {
func (x *FileAction) Reset() {
*x = FileAction{}
if protoimpl.UnsafeEnabled {
mi := &file_errdefs_proto_msgTypes[5]
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -355,7 +355,7 @@ func (x *FileAction) String() string {
func (*FileAction) ProtoMessage() {}
func (x *FileAction) ProtoReflect() protoreflect.Message {
mi := &file_errdefs_proto_msgTypes[5]
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -368,7 +368,7 @@ func (x *FileAction) ProtoReflect() protoreflect.Message {
// Deprecated: Use FileAction.ProtoReflect.Descriptor instead.
func (*FileAction) Descriptor() ([]byte, []int) {
return file_errdefs_proto_rawDescGZIP(), []int{5}
return file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescGZIP(), []int{5}
}
func (x *FileAction) GetIndex() int64 {
@ -390,7 +390,7 @@ type ContentCache struct {
func (x *ContentCache) Reset() {
*x = ContentCache{}
if protoimpl.UnsafeEnabled {
mi := &file_errdefs_proto_msgTypes[6]
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -403,7 +403,7 @@ func (x *ContentCache) String() string {
func (*ContentCache) ProtoMessage() {}
func (x *ContentCache) ProtoReflect() protoreflect.Message {
mi := &file_errdefs_proto_msgTypes[6]
mi := &file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -416,7 +416,7 @@ func (x *ContentCache) ProtoReflect() protoreflect.Message {
// Deprecated: Use ContentCache.ProtoReflect.Descriptor instead.
func (*ContentCache) Descriptor() ([]byte, []int) {
return file_errdefs_proto_rawDescGZIP(), []int{6}
return file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescGZIP(), []int{6}
}
func (x *ContentCache) GetIndex() int64 {
@ -426,69 +426,72 @@ func (x *ContentCache) GetIndex() int64 {
return 0
}
var File_errdefs_proto protoreflect.FileDescriptor
var File_github_com_moby_buildkit_solver_errdefs_errdefs_proto protoreflect.FileDescriptor
var file_errdefs_proto_rawDesc = []byte{
0x0a, 0x0d, 0x65, 0x72, 0x72, 0x64, 0x65, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x07, 0x65, 0x72, 0x72, 0x64, 0x65, 0x66, 0x73, 0x1a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x6f, 0x62, 0x79, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b,
0x69, 0x74, 0x2f, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x62, 0x2f, 0x6f, 0x70, 0x73,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x06, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78,
0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f,
0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73,
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67,
0x65, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x21, 0x0a, 0x0b, 0x46, 0x72, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x64, 0x43, 0x61, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x0a, 0x0a,
0x53, 0x75, 0x62, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbf,
0x02, 0x0a, 0x05, 0x53, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x70, 0x75,
0x74, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x70, 0x75,
0x74, 0x49, 0x44, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x73,
0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x73,
0x12, 0x16, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x70,
0x62, 0x2e, 0x4f, 0x70, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x29, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x72, 0x72, 0x64, 0x65, 0x66, 0x73,
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x04, 0x66,
0x69, 0x6c, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x72, 0x72, 0x64, 0x65, 0x66, 0x73, 0x2e, 0x43, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x48, 0x00, 0x52, 0x05, 0x63, 0x61, 0x63,
0x68, 0x65, 0x12, 0x41, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x72, 0x72, 0x64, 0x65, 0x66,
0x73, 0x2e, 0x53, 0x6f, 0x6c, 0x76, 0x65, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x3e, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74,
0x22, 0x22, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14,
0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69,
0x6e, 0x64, 0x65, 0x78, 0x22, 0x24, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x43,
0x61, 0x63, 0x68, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x6f, 0x62, 0x79, 0x2f, 0x62, 0x75,
0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x2f, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x65, 0x72,
0x72, 0x64, 0x65, 0x66, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
var file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDesc = []byte{
0x0a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x6f, 0x62,
0x79, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x2f, 0x73, 0x6f, 0x6c, 0x76, 0x65,
0x72, 0x2f, 0x65, 0x72, 0x72, 0x64, 0x65, 0x66, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x64, 0x65, 0x66,
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x65, 0x72, 0x72, 0x64, 0x65, 0x66, 0x73,
0x1a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x6f, 0x62,
0x79, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x2f, 0x73, 0x6f, 0x6c, 0x76, 0x65,
0x72, 0x2f, 0x70, 0x62, 0x2f, 0x6f, 0x70, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x20,
0x0a, 0x06, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65,
0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74,
0x22, 0x4f, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x69, 0x6e,
0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x21,
0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09,
0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65,
0x73, 0x22, 0x21, 0x0a, 0x0b, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x43, 0x61, 0x70,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x72, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbf, 0x02, 0x0a, 0x05, 0x53, 0x6f, 0x6c, 0x76, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x49, 0x44, 0x73, 0x12, 0x1a, 0x0a, 0x08,
0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08,
0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x73, 0x12, 0x16, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x52, 0x02, 0x6f, 0x70,
0x12, 0x29, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13,
0x2e, 0x65, 0x72, 0x72, 0x64, 0x65, 0x66, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x63,
0x61, 0x63, 0x68, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x72, 0x72,
0x64, 0x65, 0x66, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x63, 0x68,
0x65, 0x48, 0x00, 0x52, 0x05, 0x63, 0x61, 0x63, 0x68, 0x65, 0x12, 0x41, 0x0a, 0x0b, 0x64, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1f, 0x2e, 0x65, 0x72, 0x72, 0x64, 0x65, 0x66, 0x73, 0x2e, 0x53, 0x6f, 0x6c, 0x76, 0x65, 0x2e,
0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x3e, 0x0a,
0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x09, 0x0a,
0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x22, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65,
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18,
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x24, 0x0a, 0x0c,
0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, 0x64,
0x65, 0x78, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x6d, 0x6f, 0x62, 0x79, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x2f, 0x73,
0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x65, 0x72, 0x72, 0x64, 0x65, 0x66, 0x73, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_errdefs_proto_rawDescOnce sync.Once
file_errdefs_proto_rawDescData = file_errdefs_proto_rawDesc
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescOnce sync.Once
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescData = file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDesc
)
func file_errdefs_proto_rawDescGZIP() []byte {
file_errdefs_proto_rawDescOnce.Do(func() {
file_errdefs_proto_rawDescData = protoimpl.X.CompressGZIP(file_errdefs_proto_rawDescData)
func file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescGZIP() []byte {
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescOnce.Do(func() {
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescData)
})
return file_errdefs_proto_rawDescData
return file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDescData
}
var file_errdefs_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_errdefs_proto_goTypes = []interface{}{
var file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_goTypes = []interface{}{
(*Vertex)(nil), // 0: errdefs.Vertex
(*Source)(nil), // 1: errdefs.Source
(*FrontendCap)(nil), // 2: errdefs.FrontendCap
@ -501,7 +504,7 @@ var file_errdefs_proto_goTypes = []interface{}{
(*pb.Range)(nil), // 9: pb.Range
(*pb.Op)(nil), // 10: pb.Op
}
var file_errdefs_proto_depIdxs = []int32{
var file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_depIdxs = []int32{
8, // 0: errdefs.Source.info:type_name -> pb.SourceInfo
9, // 1: errdefs.Source.ranges:type_name -> pb.Range
10, // 2: errdefs.Solve.op:type_name -> pb.Op
@ -515,13 +518,13 @@ var file_errdefs_proto_depIdxs = []int32{
0, // [0:6] is the sub-list for field type_name
}
func init() { file_errdefs_proto_init() }
func file_errdefs_proto_init() {
if File_errdefs_proto != nil {
func init() { file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_init() }
func file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_init() {
if File_github_com_moby_buildkit_solver_errdefs_errdefs_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_errdefs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Vertex); i {
case 0:
return &v.state
@ -533,7 +536,7 @@ func file_errdefs_proto_init() {
return nil
}
}
file_errdefs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Source); i {
case 0:
return &v.state
@ -545,7 +548,7 @@ func file_errdefs_proto_init() {
return nil
}
}
file_errdefs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FrontendCap); i {
case 0:
return &v.state
@ -557,7 +560,7 @@ func file_errdefs_proto_init() {
return nil
}
}
file_errdefs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Subrequest); i {
case 0:
return &v.state
@ -569,7 +572,7 @@ func file_errdefs_proto_init() {
return nil
}
}
file_errdefs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Solve); i {
case 0:
return &v.state
@ -581,7 +584,7 @@ func file_errdefs_proto_init() {
return nil
}
}
file_errdefs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FileAction); i {
case 0:
return &v.state
@ -593,7 +596,7 @@ func file_errdefs_proto_init() {
return nil
}
}
file_errdefs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ContentCache); i {
case 0:
return &v.state
@ -606,7 +609,7 @@ func file_errdefs_proto_init() {
}
}
}
file_errdefs_proto_msgTypes[4].OneofWrappers = []interface{}{
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes[4].OneofWrappers = []interface{}{
(*Solve_File)(nil),
(*Solve_Cache)(nil),
}
@ -614,18 +617,18 @@ func file_errdefs_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_errdefs_proto_rawDesc,
RawDescriptor: file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDesc,
NumEnums: 0,
NumMessages: 8,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_errdefs_proto_goTypes,
DependencyIndexes: file_errdefs_proto_depIdxs,
MessageInfos: file_errdefs_proto_msgTypes,
GoTypes: file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_goTypes,
DependencyIndexes: file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_depIdxs,
MessageInfos: file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_msgTypes,
}.Build()
File_errdefs_proto = out.File
file_errdefs_proto_rawDesc = nil
file_errdefs_proto_goTypes = nil
file_errdefs_proto_depIdxs = nil
File_github_com_moby_buildkit_solver_errdefs_errdefs_proto = out.File
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_rawDesc = nil
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_goTypes = nil
file_github_com_moby_buildkit_solver_errdefs_errdefs_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
package errdefs
//go:generate protoc -I=. -I=../../vendor/ -I=../../../../../ --go_out=paths=source_relative:. errdefs.proto

View File

@ -8,7 +8,6 @@ import (
pb "github.com/moby/buildkit/solver/pb"
"github.com/moby/buildkit/util/grpcerrors"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
)
func WithSource(err error, src *Source) error {
@ -36,7 +35,7 @@ func Sources(err error) []*Source {
var es *ErrorSource
if errors.As(err, &es) {
out = Sources(es.Unwrap())
out = append(out, proto.Clone(es.Source).(*Source))
out = append(out, es.Source.CloneVT())
}
return out
}

View File

@ -67,6 +67,7 @@ const (
CapFileCopyIncludeExcludePatterns apicaps.CapID = "file.copy.includeexcludepatterns"
CapFileRmNoFollowSymlink apicaps.CapID = "file.rm.nofollowsymlink"
CapFileCopyAlwaysReplaceExistingDestPaths apicaps.CapID = "file.copy.alwaysreplaceexistingdestpaths"
CapFileCopyModeStringFormat apicaps.CapID = "file.copy.modestring"
CapConstraints apicaps.CapID = "constraints"
CapPlatform apicaps.CapID = "platform"
@ -91,6 +92,9 @@ const (
CapMultipleExporters apicaps.CapID = "exporter.multiple"
CapSourcePolicy apicaps.CapID = "source.policy"
// GC/Prune controls allow MinFreeSpace and MaxUsedSpace to be set
CapGCFreeSpaceFilter apicaps.CapID = "gc.freespacefilter"
)
func init() {
@ -488,4 +492,10 @@ func init() {
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
Caps.Init(apicaps.Cap{
ID: CapGCFreeSpaceFilter,
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
}

View File

@ -1,3 +0,0 @@
package pb
//go:generate protoc -I=. -I=../../vendor/ --go_out=paths=source_relative:. ops.proto

View File

@ -1,23 +1,21 @@
package pb
import proto "google.golang.org/protobuf/proto"
func (m *Definition) IsNil() bool {
return m == nil || m.Metadata == nil
}
func (m *Definition) Marshal() ([]byte, error) {
return proto.Marshal(m)
return m.MarshalVT()
}
func (m *Definition) Unmarshal(dAtA []byte) error {
return proto.Unmarshal(dAtA, m)
return m.UnmarshalVT(dAtA)
}
func (m *Op) Marshal() ([]byte, error) {
return proto.Marshal(m)
return m.MarshalVT()
}
func (m *Op) Unmarshal(dAtA []byte) error {
return proto.Unmarshal(dAtA, m)
return m.UnmarshalVT(dAtA)
}

File diff suppressed because it is too large Load Diff

View File

@ -341,6 +341,8 @@ message FileActionCopy {
repeated string exclude_patterns = 13;
// alwaysReplaceExistingDestPaths results in an existing dest path that differs in type from the src path being replaced rather than the default of returning an error
bool alwaysReplaceExistingDestPaths = 14;
// mode in non-octal format
string modeStr = 15;
}
message FileActionMkFile {

File diff suppressed because it is too large Load Diff