diff --git a/api/services/control/control.pb.go b/api/services/control/control.pb.go index 9a04c36721bb..3c24ebb5b5cc 100644 --- a/api/services/control/control.pb.go +++ b/api/services/control/control.pb.go @@ -367,21 +367,25 @@ func (m *UsageRecord) GetParents() []string { } type SolveRequest struct { - Ref string `protobuf:"bytes,1,opt,name=Ref,proto3" json:"Ref,omitempty"` - Definition *pb.Definition `protobuf:"bytes,2,opt,name=Definition,proto3" json:"Definition,omitempty"` - Exporter string `protobuf:"bytes,3,opt,name=Exporter,proto3" json:"Exporter,omitempty"` - ExporterAttrs map[string]string `protobuf:"bytes,4,rep,name=ExporterAttrs,proto3" json:"ExporterAttrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Session string `protobuf:"bytes,5,opt,name=Session,proto3" json:"Session,omitempty"` - Frontend string `protobuf:"bytes,6,opt,name=Frontend,proto3" json:"Frontend,omitempty"` - FrontendAttrs map[string]string `protobuf:"bytes,7,rep,name=FrontendAttrs,proto3" json:"FrontendAttrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Cache CacheOptions `protobuf:"bytes,8,opt,name=Cache,proto3" json:"Cache"` - Entitlements []github_com_moby_buildkit_util_entitlements.Entitlement `protobuf:"bytes,9,rep,name=Entitlements,proto3,customtype=github.com/moby/buildkit/util/entitlements.Entitlement" json:"Entitlements,omitempty"` - FrontendInputs map[string]*pb.Definition `protobuf:"bytes,10,rep,name=FrontendInputs,proto3" json:"FrontendInputs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Internal bool `protobuf:"varint,11,opt,name=Internal,proto3" json:"Internal,omitempty"` - SourcePolicy *pb1.Policy `protobuf:"bytes,12,opt,name=SourcePolicy,proto3" json:"SourcePolicy,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Ref string `protobuf:"bytes,1,opt,name=Ref,proto3" json:"Ref,omitempty"` + Definition *pb.Definition `protobuf:"bytes,2,opt,name=Definition,proto3" json:"Definition,omitempty"` + // ExporterDeprecated and ExporterAttrsDeprecated are deprecated in favor + // of the new Exporters. If these fields are set, then they will be + // appended to the Exporters field if Exporters was not explicitly set. + ExporterDeprecated string `protobuf:"bytes,3,opt,name=ExporterDeprecated,proto3" json:"ExporterDeprecated,omitempty"` + ExporterAttrsDeprecated map[string]string `protobuf:"bytes,4,rep,name=ExporterAttrsDeprecated,proto3" json:"ExporterAttrsDeprecated,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Session string `protobuf:"bytes,5,opt,name=Session,proto3" json:"Session,omitempty"` + Frontend string `protobuf:"bytes,6,opt,name=Frontend,proto3" json:"Frontend,omitempty"` + FrontendAttrs map[string]string `protobuf:"bytes,7,rep,name=FrontendAttrs,proto3" json:"FrontendAttrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Cache CacheOptions `protobuf:"bytes,8,opt,name=Cache,proto3" json:"Cache"` + Entitlements []github_com_moby_buildkit_util_entitlements.Entitlement `protobuf:"bytes,9,rep,name=Entitlements,proto3,customtype=github.com/moby/buildkit/util/entitlements.Entitlement" json:"Entitlements,omitempty"` + FrontendInputs map[string]*pb.Definition `protobuf:"bytes,10,rep,name=FrontendInputs,proto3" json:"FrontendInputs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Internal bool `protobuf:"varint,11,opt,name=Internal,proto3" json:"Internal,omitempty"` + SourcePolicy *pb1.Policy `protobuf:"bytes,12,opt,name=SourcePolicy,proto3" json:"SourcePolicy,omitempty"` + Exporters []*Exporter `protobuf:"bytes,13,rep,name=Exporters,proto3" json:"Exporters,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SolveRequest) Reset() { *m = SolveRequest{} } @@ -431,16 +435,16 @@ func (m *SolveRequest) GetDefinition() *pb.Definition { return nil } -func (m *SolveRequest) GetExporter() string { +func (m *SolveRequest) GetExporterDeprecated() string { if m != nil { - return m.Exporter + return m.ExporterDeprecated } return "" } -func (m *SolveRequest) GetExporterAttrs() map[string]string { +func (m *SolveRequest) GetExporterAttrsDeprecated() map[string]string { if m != nil { - return m.ExporterAttrs + return m.ExporterAttrsDeprecated } return nil } @@ -494,6 +498,13 @@ func (m *SolveRequest) GetSourcePolicy() *pb1.Policy { return nil } +func (m *SolveRequest) GetExporters() []*Exporter { + if m != nil { + return m.Exporters + } + return nil +} + type CacheOptions struct { // ExportRefDeprecated is deprecated in favor or the new Exports since BuildKit v0.4.0. // When ExportRefDeprecated is set, the solver appends @@ -1832,11 +1843,12 @@ func (m *Descriptor) GetAnnotations() map[string]string { } type BuildResultInfo struct { - Result *Descriptor `protobuf:"bytes,1,opt,name=Result,proto3" json:"Result,omitempty"` - Attestations []*Descriptor `protobuf:"bytes,2,rep,name=Attestations,proto3" json:"Attestations,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ResultDeprecated *Descriptor `protobuf:"bytes,1,opt,name=ResultDeprecated,proto3" json:"ResultDeprecated,omitempty"` + Attestations []*Descriptor `protobuf:"bytes,2,rep,name=Attestations,proto3" json:"Attestations,omitempty"` + Results map[int64]*Descriptor `protobuf:"bytes,3,rep,name=Results,proto3" json:"Results,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *BuildResultInfo) Reset() { *m = BuildResultInfo{} } @@ -1872,9 +1884,9 @@ func (m *BuildResultInfo) XXX_DiscardUnknown() { var xxx_messageInfo_BuildResultInfo proto.InternalMessageInfo -func (m *BuildResultInfo) GetResult() *Descriptor { +func (m *BuildResultInfo) GetResultDeprecated() *Descriptor { if m != nil { - return m.Result + return m.ResultDeprecated } return nil } @@ -1886,8 +1898,18 @@ func (m *BuildResultInfo) GetAttestations() []*Descriptor { return nil } +func (m *BuildResultInfo) GetResults() map[int64]*Descriptor { + if m != nil { + return m.Results + } + return nil +} + +// Exporter describes the output exporter type Exporter struct { - Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"` + // Type identifies the exporter + Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"` + // Attrs specifies exporter configuration Attrs map[string]string `protobuf:"bytes,2,rep,name=Attrs,proto3" json:"Attrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1948,7 +1970,7 @@ func init() { proto.RegisterType((*DiskUsageResponse)(nil), "moby.buildkit.v1.DiskUsageResponse") proto.RegisterType((*UsageRecord)(nil), "moby.buildkit.v1.UsageRecord") proto.RegisterType((*SolveRequest)(nil), "moby.buildkit.v1.SolveRequest") - proto.RegisterMapType((map[string]string)(nil), "moby.buildkit.v1.SolveRequest.ExporterAttrsEntry") + proto.RegisterMapType((map[string]string)(nil), "moby.buildkit.v1.SolveRequest.ExporterAttrsDeprecatedEntry") proto.RegisterMapType((map[string]string)(nil), "moby.buildkit.v1.SolveRequest.FrontendAttrsEntry") proto.RegisterMapType((map[string]*pb.Definition)(nil), "moby.buildkit.v1.SolveRequest.FrontendInputsEntry") proto.RegisterType((*CacheOptions)(nil), "moby.buildkit.v1.CacheOptions") @@ -1979,6 +2001,7 @@ func init() { proto.RegisterType((*Descriptor)(nil), "moby.buildkit.v1.Descriptor") proto.RegisterMapType((map[string]string)(nil), "moby.buildkit.v1.Descriptor.AnnotationsEntry") proto.RegisterType((*BuildResultInfo)(nil), "moby.buildkit.v1.BuildResultInfo") + proto.RegisterMapType((map[int64]*Descriptor)(nil), "moby.buildkit.v1.BuildResultInfo.ResultsEntry") proto.RegisterType((*Exporter)(nil), "moby.buildkit.v1.Exporter") proto.RegisterMapType((map[string]string)(nil), "moby.buildkit.v1.Exporter.AttrsEntry") } @@ -1986,149 +2009,152 @@ func init() { func init() { proto.RegisterFile("control.proto", fileDescriptor_0c5120591600887d) } var fileDescriptor_0c5120591600887d = []byte{ - // 2260 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0xcd, 0x6e, 0x1b, 0xc9, - 0x11, 0xde, 0x21, 0x25, 0xfe, 0x14, 0x29, 0x59, 0x6a, 0x7b, 0x8d, 0xc9, 0xc4, 0x2b, 0xc9, 0xb3, - 0x76, 0x22, 0x38, 0xf6, 0x50, 0xcb, 0xac, 0x63, 0xaf, 0x9c, 0x38, 0x16, 0x45, 0x66, 0x2d, 0xc7, - 0x82, 0xb5, 0x2d, 0x79, 0x0d, 0x2c, 0xe0, 0x04, 0x23, 0xb2, 0x45, 0x0f, 0x34, 0x9c, 0x99, 0x74, - 0x37, 0xb5, 0xe6, 0x3e, 0x40, 0x80, 0xcd, 0x21, 0xc8, 0x25, 0xc8, 0x25, 0xf7, 0x9c, 0x72, 0xce, - 0x13, 0x04, 0xf0, 0x31, 0xe7, 0x3d, 0x38, 0x81, 0x1f, 0x20, 0xc8, 0x31, 0xb9, 0x05, 0xfd, 0x33, - 0xe4, 0x90, 0x33, 0x94, 0x28, 0xdb, 0x27, 0x76, 0x75, 0xd7, 0x57, 0x53, 0x55, 0x5d, 0x5d, 0x5d, - 0xd5, 0x84, 0x85, 0x76, 0x18, 0x70, 0x1a, 0xfa, 0x4e, 0x44, 0x43, 0x1e, 0xa2, 0xa5, 0x5e, 0x78, - 0x38, 0x70, 0x0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, 0x0a, 0x29, - 0x9e, 0x29, 0x64, 0x4e, 0x0a, 0x48, 0x60, 0xd0, 0x0a, 0x80, 0x74, 0xc2, 0x76, 0xd8, 0x0f, 0xb8, - 0x59, 0x92, 0xba, 0x27, 0x66, 0xd0, 0x1a, 0x54, 0x9a, 0x84, 0xb5, 0xa9, 0x17, 0xc9, 0xad, 0x2e, - 0x4b, 0xf7, 0x24, 0xa7, 0x84, 0x04, 0xe5, 0xc1, 0x83, 0x41, 0x44, 0x4c, 0x90, 0x0c, 0x89, 0x19, - 0xb1, 0x97, 0xfb, 0x2f, 0x5c, 0x4a, 0x3a, 0x66, 0x45, 0xba, 0x4b, 0x53, 0xc2, 0xbf, 0xca, 0x13, - 0xcc, 0xac, 0xca, 0x4d, 0x8e, 0x49, 0xfb, 0x77, 0x45, 0xa8, 0xee, 0x8b, 0xa3, 0x10, 0x87, 0xc3, - 0x12, 0xe4, 0x31, 0x39, 0xd2, 0x7b, 0x23, 0x86, 0xc8, 0x01, 0x68, 0x92, 0x23, 0x2f, 0xf0, 0xa4, - 0x56, 0x39, 0x69, 0xf8, 0xa2, 0x13, 0x1d, 0x3a, 0xa3, 0x59, 0x9c, 0xe0, 0x40, 0x16, 0x94, 0x5a, - 0x2f, 0xa3, 0x90, 0x8a, 0x90, 0xca, 0x4b, 0x31, 0x43, 0x1a, 0x3d, 0x83, 0x85, 0x78, 0xbc, 0xc5, - 0x39, 0x15, 0x81, 0x2a, 0xc2, 0xe8, 0x93, 0x74, 0x18, 0x25, 0x95, 0x72, 0xc6, 0x30, 0xad, 0x80, - 0xd3, 0x01, 0x1e, 0x97, 0x23, 0x2c, 0xdc, 0x27, 0x8c, 0x09, 0x0d, 0xe5, 0xf6, 0xe3, 0x98, 0x14, - 0xea, 0xfc, 0x82, 0x86, 0x01, 0x27, 0x41, 0x47, 0x6e, 0x7d, 0x19, 0x0f, 0x69, 0xa1, 0x4e, 0x3c, - 0x56, 0xea, 0x14, 0x67, 0x52, 0x67, 0x0c, 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62, 0x96, 0x11, 0x29, 0x88, 0x28, 0x75, 0xb0, 0x04, 0x25, 0x3c, - 0xad, 0x0e, 0xce, 0xb5, 0xd3, 0xe1, 0x13, 0x9e, 0xfe, 0x5f, 0x09, 0x50, 0x7a, 0x39, 0xa3, 0x37, - 0x4d, 0x36, 0x77, 0xb9, 0x89, 0xe6, 0xee, 0xf9, 0x64, 0x73, 0xa7, 0xae, 0xe6, 0x3b, 0xb3, 0x68, - 0x32, 0x43, 0x8b, 0x77, 0x17, 0xca, 0x71, 0x75, 0x13, 0x5f, 0xe0, 0x56, 0x5a, 0xf4, 0xb0, 0x00, - 0x1a, 0x31, 0xa3, 0xf5, 0xf8, 0xc6, 0x51, 0x77, 0x1d, 0x8a, 0x73, 0x0a, 0x8d, 0xda, 0x8e, 0xae, - 0x2b, 0xf4, 0x2d, 0x74, 0xff, 0x7c, 0xef, 0x16, 0x73, 0x93, 0x6f, 0x16, 0x0d, 0xa8, 0x6c, 0xc7, - 0x89, 0xf2, 0x1c, 0x8f, 0x16, 0x49, 0x10, 0xda, 0xd0, 0x85, 0x8d, 0x4a, 0xcd, 0x57, 0xd2, 0x26, - 0xc6, 0x0f, 0x14, 0x21, 0xd5, 0x95, 0xcd, 0x51, 0x46, 0x69, 0x59, 0x96, 0x0e, 0xda, 0x9c, 0xc9, - 0xf7, 0x33, 0xd6, 0x97, 0xe8, 0x33, 0x28, 0x60, 0xc2, 0xfa, 0x3e, 0x97, 0x2f, 0x21, 0x95, 0xfa, - 0xd5, 0x29, 0xd2, 0x15, 0x93, 0x3c, 0xab, 0x1a, 0x80, 0x7e, 0x09, 0x45, 0x35, 0x62, 0x66, 0x65, - 0x5a, 0xcb, 0x9f, 0xa1, 0x99, 0xc6, 0xe8, 0x86, 0x42, 0x53, 0xe2, 0x38, 0x7e, 0x4e, 0x02, 0xa2, - 0x5f, 0xe8, 0x44, 0x5b, 0x3b, 0x8f, 0x13, 0x33, 0xa8, 0x0e, 0xf3, 0x9c, 0xba, 0x6d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c, 0xc3, 0x40, 0xbb, 0xc3, 0xf7, - 0xe8, 0x2c, 0xd5, 0x92, 0xd5, 0xae, 0x75, 0xc6, 0xfa, 0xba, 0xb1, 0x61, 0xa0, 0xaf, 0xa0, 0x92, - 0xa8, 0x67, 0x51, 0x46, 0x35, 0x95, 0x2e, 0x8e, 0xad, 0xeb, 0x67, 0x70, 0x69, 0xcb, 0x5b, 0x30, - 0x27, 0x0f, 0x52, 0x86, 0xb3, 0x13, 0xe5, 0x6e, 0x96, 0x9a, 0x63, 0xe5, 0xef, 0xa1, 0x2a, 0xd0, - 0x49, 0x90, 0x8c, 0x3e, 0x74, 0xfd, 0xac, 0x7b, 0x75, 0x6a, 0xd8, 0xa4, 0x82, 0x78, 0xc3, 0x40, - 0x21, 0xa0, 0x74, 0xf2, 0x44, 0x3f, 0xca, 0x88, 0x92, 0x69, 0x19, 0xdc, 0xba, 0x39, 0x1b, 0xb3, - 0x32, 0xaa, 0x51, 0x7d, 0xf5, 0x66, 0xc5, 0xf8, 0xc7, 0x9b, 0x15, 0xe3, 0x5f, 0x6f, 0x56, 0x8c, - 0xc3, 0x82, 0xac, 0x98, 0x7e, 0xfc, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xf6, 0x99, 0xcf, - 0x0b, 0x1d, 0x00, 0x00, + // 2315 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0x4f, 0x73, 0x1b, 0x49, + 0x15, 0xcf, 0x48, 0xb2, 0x2c, 0x3d, 0xc9, 0x8e, 0xdc, 0xc9, 0x86, 0x61, 0xc8, 0xda, 0xce, 0x6c, + 0x02, 0xae, 0x90, 0x8c, 0xbc, 0x82, 0x90, 0xac, 0x03, 0x21, 0xb6, 0x25, 0x36, 0x0e, 0x49, 0xc5, + 0xdb, 0x76, 0x36, 0xd4, 0x56, 0x05, 0x6a, 0x2c, 0xb5, 0x95, 0x29, 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 0xa2, 0xad, 0x1b, 0xe8, 0xce, 0xbd, 0x1e, 0x61, 0xdc, 0xed, 0x45, 0x8a, 0xc1, 0xfe, 0xad, + 0x01, 0xd5, 0x5d, 0xda, 0x0f, 0x08, 0x26, 0xbf, 0xee, 0x13, 0xc6, 0xd1, 0x25, 0x28, 0x1e, 0x7a, + 0x3e, 0x27, 0xd4, 0x34, 0x56, 0xf3, 0x6b, 0x65, 0xac, 0x29, 0x54, 0x83, 0xbc, 0xeb, 0xfb, 0x66, + 0x6e, 0xd5, 0x58, 0x2b, 0x61, 0x31, 0x44, 0x6b, 0x50, 0x3d, 0x22, 0x24, 0x6a, 0xf6, 0xa9, 0xcb, + 0xbd, 0x30, 0x30, 0xf3, 0xab, 0xc6, 0x5a, 0x7e, 0xab, 0xf0, 0xea, 0xf5, 0x8a, 0x81, 0x47, 0x56, + 0x90, 0x0d, 0x65, 0x41, 0x6f, 0x9d, 0x70, 0xc2, 0xcc, 0x42, 0x82, 0x6d, 0x38, 0x6d, 0x5f, 0x87, + 0x5a, 0xd3, 0x63, 0x47, 0x4f, 0x99, 0xdb, 0x3d, 0x4b, 0x17, 0xfb, 0x21, 0x2c, 0x25, 0x78, 0x59, + 0x14, 0x06, 0x8c, 0xa0, 0x5b, 0x50, 0xa4, 0xa4, 0x1d, 0xd2, 0x8e, 0x64, 0xae, 0x34, 0x3e, 0x74, + 0xc6, 0xc3, 0xc0, 0xd1, 0x00, 0xc1, 0x84, 0x35, 0xb3, 0xfd, 0xa7, 0x3c, 0x54, 0x12, 0xf3, 0x68, + 0x11, 0x72, 0x3b, 0x4d, 0xd3, 0x58, 0x35, 0xd6, 0xca, 0x38, 0xb7, 0xd3, 0x44, 0x26, 0xcc, 0x3f, + 0xee, 0x73, 0xf7, 0xc0, 0x27, 0xda, 0xf6, 0x98, 0x44, 0x17, 0x61, 0x6e, 0x27, 0x78, 0xca, 0x88, + 0x34, 0xbc, 0x84, 0x15, 0x81, 0x10, 0x14, 0xf6, 0xbc, 0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, 0xa3, 0x90, 0x72, 0x42, 0x9b, 0x24, 0xa2, 0xa4, 0x2d, 0x1c, 0x28, 0xf7, 0xaf, 0x8c, 0x33, + 0x56, 0x50, 0x1f, 0xbe, 0x15, 0xcf, 0x6e, 0x72, 0x4e, 0x59, 0x02, 0x54, 0x90, 0x41, 0x76, 0x37, + 0x1d, 0x64, 0x49, 0x95, 0x9d, 0x09, 0xe8, 0x56, 0xc0, 0xe9, 0x09, 0x9e, 0x24, 0x5b, 0xf8, 0x64, + 0x8f, 0x30, 0x26, 0x6c, 0x92, 0x01, 0x83, 0x63, 0x12, 0x59, 0x50, 0xfa, 0x19, 0x0d, 0x03, 0x4e, + 0x82, 0x8e, 0x0c, 0x96, 0x32, 0x1e, 0xd0, 0xe8, 0x19, 0x2c, 0xc4, 0x63, 0x29, 0xd0, 0x9c, 0x97, + 0x2a, 0x7e, 0x7c, 0x86, 0x8a, 0x23, 0x18, 0xa5, 0xd8, 0xa8, 0x1c, 0xb4, 0x01, 0x73, 0xdb, 0x6e, + 0xfb, 0x05, 0x91, 0x71, 0x51, 0x69, 0x2c, 0xa7, 0x05, 0xca, 0xe5, 0x27, 0x32, 0x10, 0x98, 0x3c, + 0xda, 0xe7, 0xb0, 0x82, 0xa0, 0x5f, 0x42, 0xb5, 0x15, 0x70, 0x8f, 0xfb, 0xa4, 0x27, 0xf7, 0xb8, + 0x2c, 0xf6, 0x78, 0x6b, 0xe3, 0xeb, 0xd7, 0x2b, 0x3f, 0x9a, 0x98, 0xd1, 0xfa, 0xdc, 0xf3, 0xeb, + 0x24, 0x81, 0x72, 0x12, 0x22, 0xf0, 0x88, 0x3c, 0xf4, 0x05, 0x2c, 0xc6, 0xca, 0xee, 0x04, 0x51, + 0x9f, 0x33, 0x13, 0xa4, 0xd5, 0x8d, 0x29, 0xad, 0x56, 0x20, 0x65, 0xf6, 0x98, 0x24, 0xe1, 0xec, + 0x9d, 0x80, 0x13, 0x1a, 0xb8, 0xbe, 0x0e, 0xda, 0x01,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xf4, 0xa1, 0x6b, 0x67, 0xd5, 0x03, + 0x13, 0xc3, 0x26, 0x15, 0xc4, 0xeb, 0x06, 0x0a, 0x01, 0xa5, 0x93, 0x3e, 0xfa, 0x7e, 0x46, 0x94, + 0x4c, 0xba, 0x79, 0xac, 0x1b, 0xd3, 0x31, 0x2b, 0xa3, 0xb6, 0xaa, 0xaf, 0xde, 0x2c, 0x1b, 0xff, + 0x7c, 0xb3, 0x6c, 0xfc, 0xfb, 0xcd, 0xb2, 0x71, 0x50, 0x94, 0x95, 0xde, 0x0f, 0xbe, 0x09, 0x00, + 0x00, 0xff, 0xff, 0x16, 0xc8, 0xe5, 0x4c, 0x39, 0x1e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2892,6 +2918,20 @@ func (m *SolveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.Exporters) > 0 { + for iNdEx := len(m.Exporters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Exporters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintControl(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + } + } if m.SourcePolicy != nil { { size, err := m.SourcePolicy.MarshalToSizedBuffer(dAtA[:i]) @@ -2992,9 +3032,9 @@ func (m *SolveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - if len(m.ExporterAttrs) > 0 { - for k := range m.ExporterAttrs { - v := m.ExporterAttrs[k] + if len(m.ExporterAttrsDeprecated) > 0 { + for k := range m.ExporterAttrsDeprecated { + v := m.ExporterAttrsDeprecated[k] baseI := i i -= len(v) copy(dAtA[i:], v) @@ -3011,10 +3051,10 @@ func (m *SolveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x22 } } - if len(m.Exporter) > 0 { - i -= len(m.Exporter) - copy(dAtA[i:], m.Exporter) - i = encodeVarintControl(dAtA, i, uint64(len(m.Exporter))) + if len(m.ExporterDeprecated) > 0 { + i -= len(m.ExporterDeprecated) + copy(dAtA[i:], m.ExporterDeprecated) + i = encodeVarintControl(dAtA, i, uint64(len(m.ExporterDeprecated))) i-- dAtA[i] = 0x1a } @@ -4339,6 +4379,30 @@ func (m *BuildResultInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.Results) > 0 { + for k := range m.Results { + v := m.Results[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintControl(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i = encodeVarintControl(dAtA, i, uint64(k)) + i-- + dAtA[i] = 0x8 + i = encodeVarintControl(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } + } if len(m.Attestations) > 0 { for iNdEx := len(m.Attestations) - 1; iNdEx >= 0; iNdEx-- { { @@ -4353,9 +4417,9 @@ func (m *BuildResultInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - if m.Result != nil { + if m.ResultDeprecated != nil { { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ResultDeprecated.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4564,12 +4628,12 @@ func (m *SolveRequest) Size() (n int) { l = m.Definition.Size() n += 1 + l + sovControl(uint64(l)) } - l = len(m.Exporter) + l = len(m.ExporterDeprecated) if l > 0 { n += 1 + l + sovControl(uint64(l)) } - if len(m.ExporterAttrs) > 0 { - for k, v := range m.ExporterAttrs { + if len(m.ExporterAttrsDeprecated) > 0 { + for k, v := range m.ExporterAttrsDeprecated { _ = k _ = v mapEntrySize := 1 + len(k) + sovControl(uint64(len(k))) + 1 + len(v) + sovControl(uint64(len(v))) @@ -4620,6 +4684,12 @@ func (m *SolveRequest) Size() (n int) { l = m.SourcePolicy.Size() n += 1 + l + sovControl(uint64(l)) } + if len(m.Exporters) > 0 { + for _, e := range m.Exporters { + l = e.Size() + n += 1 + l + sovControl(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -5203,8 +5273,8 @@ func (m *BuildResultInfo) Size() (n int) { } var l int _ = l - if m.Result != nil { - l = m.Result.Size() + if m.ResultDeprecated != nil { + l = m.ResultDeprecated.Size() n += 1 + l + sovControl(uint64(l)) } if len(m.Attestations) > 0 { @@ -5213,6 +5283,19 @@ func (m *BuildResultInfo) Size() (n int) { n += 1 + l + sovControl(uint64(l)) } } + if len(m.Results) > 0 { + for k, v := range m.Results { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovControl(uint64(l)) + } + mapEntrySize := 1 + sovControl(uint64(k)) + l + n += mapEntrySize + 1 + sovControl(uint64(mapEntrySize)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -6035,7 +6118,7 @@ func (m *SolveRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exporter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExporterDeprecated", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6063,11 +6146,11 @@ func (m *SolveRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Exporter = string(dAtA[iNdEx:postIndex]) + m.ExporterDeprecated = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExporterAttrs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExporterAttrsDeprecated", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6094,8 +6177,8 @@ func (m *SolveRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ExporterAttrs == nil { - m.ExporterAttrs = make(map[string]string) + if m.ExporterAttrsDeprecated == nil { + m.ExporterAttrsDeprecated = make(map[string]string) } var mapkey string var mapvalue string @@ -6190,7 +6273,7 @@ func (m *SolveRequest) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.ExporterAttrs[mapkey] = mapvalue + m.ExporterAttrsDeprecated[mapkey] = mapvalue iNdEx = postIndex case 5: if wireType != 2 { @@ -6633,6 +6716,40 @@ func (m *SolveRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Exporters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowControl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthControl + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthControl + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Exporters = append(m.Exporters, &Exporter{}) + if err := m.Exporters[len(m.Exporters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipControl(dAtA[iNdEx:]) @@ -10589,7 +10706,7 @@ func (m *BuildResultInfo) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResultDeprecated", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10616,10 +10733,10 @@ func (m *BuildResultInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Result == nil { - m.Result = &Descriptor{} + if m.ResultDeprecated == nil { + m.ResultDeprecated = &Descriptor{} } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ResultDeprecated.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10657,6 +10774,121 @@ func (m *BuildResultInfo) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowControl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthControl + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthControl + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Results == nil { + m.Results = make(map[int64]*Descriptor) + } + var mapkey int64 + var mapvalue *Descriptor + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowControl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowControl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowControl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthControl + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthControl + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Descriptor{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipControl(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthControl + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Results[mapkey] = mapvalue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipControl(dAtA[iNdEx:]) diff --git a/api/services/control/control.proto b/api/services/control/control.proto index ccc9980de3a0..919b1dd8c387 100644 --- a/api/services/control/control.proto +++ b/api/services/control/control.proto @@ -60,8 +60,11 @@ message UsageRecord { message SolveRequest { string Ref = 1; pb.Definition Definition = 2; - string Exporter = 3; - map ExporterAttrs = 4; + // ExporterDeprecated and ExporterAttrsDeprecated are deprecated in favor + // of the new Exporters. If these fields are set, then they will be + // appended to the Exporters field if Exporters was not explicitly set. + string ExporterDeprecated = 3; + map ExporterAttrsDeprecated = 4; string Session = 5; string Frontend = 6; map FrontendAttrs = 7; @@ -70,6 +73,7 @@ message SolveRequest { map FrontendInputs = 10; bool Internal = 11; // Internal builds are not recorded in build history moby.buildkit.v1.sourcepolicy.Policy SourcePolicy = 12; + repeated Exporter Exporters = 13; } message CacheOptions { @@ -227,11 +231,15 @@ message Descriptor { } message BuildResultInfo { - Descriptor Result = 1; + Descriptor ResultDeprecated = 1; repeated Descriptor Attestations = 2; + map Results = 3; } +// Exporter describes the output exporter message Exporter { + // Type identifies the exporter string Type = 1; + // Attrs specifies exporter configuration map Attrs = 2; } diff --git a/client/client_test.go b/client/client_test.go index 7951bd709765..b364a3673bf8 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -46,6 +46,7 @@ import ( gatewaypb "github.com/moby/buildkit/frontend/gateway/pb" "github.com/moby/buildkit/identity" "github.com/moby/buildkit/session" + "github.com/moby/buildkit/session/filesync" "github.com/moby/buildkit/session/secrets/secretsprovider" "github.com/moby/buildkit/session/sshforward/sshprovider" "github.com/moby/buildkit/solver/errdefs" @@ -152,6 +153,7 @@ var allTests = []func(t *testing.T, sb integration.Sandbox){ testTarExporterWithSocketCopy, testTarExporterSymlink, testMultipleRegistryCacheImportExport, + testMultipleExporters, testSourceMap, testSourceMapFromRef, testLazyImagePush, @@ -2569,6 +2571,106 @@ func testUser(t *testing.T, sb integration.Sandbox) { checkAllReleasable(t, c, sb, true) } +func testMultipleExporters(t *testing.T, sb integration.Sandbox) { + requiresLinux(t) + + c, err := New(sb.Context(), sb.Address()) + require.NoError(t, err) + defer c.Close() + + def, err := llb.Scratch().File(llb.Mkfile("foo.txt", 0o755, nil)).Marshal(context.TODO()) + require.NoError(t, err) + + destDir, destDir2 := t.TempDir(), t.TempDir() + out := filepath.Join(destDir, "out.tar") + outW, err := os.Create(out) + require.NoError(t, err) + defer outW.Close() + + out2 := filepath.Join(destDir, "out2.tar") + outW2, err := os.Create(out2) + require.NoError(t, err) + defer outW2.Close() + + registry, err := sb.NewRegistry() + if errors.Is(err, integration.ErrRequirements) { + t.Skip(err.Error()) + } + require.NoError(t, err) + + target1, target2 := registry+"/buildkit/build/exporter:image", + registry+"/buildkit/build/alternative:image" + + imageExporter := ExporterImage + if workers.IsTestDockerd() { + imageExporter = "moby" + } + + ref := identity.NewID() + resp, err := c.Solve(sb.Context(), def, SolveOpt{ + Ref: ref, + Exports: []ExportEntry{ + { + Type: imageExporter, + Attrs: map[string]string{ + "name": target1, + }, + }, + { + Type: imageExporter, + Attrs: map[string]string{ + "name": target2, + "oci-mediatypes": "true", + }, + }, + // Ensure that multiple local exporter destinations are written properly + { + Type: ExporterLocal, + OutputDir: destDir, + }, + { + Type: ExporterLocal, + OutputDir: destDir2, + }, + // Ensure that multiple instances of the same exporter are possible + { + Type: ExporterTar, + Output: fixedWriteCloser(outW), + }, + { + Type: ExporterTar, + Output: fixedWriteCloser(outW2), + }, + }, + }, nil) + require.NoError(t, err) + + require.Equal(t, resp.ExporterResponse["image.name"], target2) + require.FileExists(t, filepath.Join(destDir, "out.tar")) + require.FileExists(t, filepath.Join(destDir, "out2.tar")) + require.FileExists(t, filepath.Join(destDir, "foo.txt")) + require.FileExists(t, filepath.Join(destDir2, "foo.txt")) + + history, err := c.ControlClient().ListenBuildHistory(sb.Context(), &controlapi.BuildHistoryRequest{ + Ref: ref, + EarlyExit: true, + }) + require.NoError(t, err) + for { + ev, err := history.Recv() + if err != nil { + require.Equal(t, io.EOF, err) + break + } + require.Equal(t, ref, ev.Record.Ref) + + require.Len(t, ev.Record.Result.Results, 2) + require.Equal(t, images.MediaTypeDockerSchema2Manifest, ev.Record.Result.Results[0].MediaType) + require.Equal(t, ocispecs.MediaTypeImageManifest, ev.Record.Result.Results[1].MediaType) + require.Equal(t, ev.Record.Result.Results[0], ev.Record.Result.ResultDeprecated) + } +} + func testOCIExporter(t *testing.T, sb integration.Sandbox) { workers.CheckFeatureCompat(t, sb, workers.FeatureOCIExporter) requiresLinux(t) @@ -6979,7 +7081,7 @@ func testMergeOpCache(t *testing.T, sb integration.Sandbox, mode string) { for i, layer := range manifest.Layers { _, err = contentStore.Info(ctx, layer.Digest) - require.ErrorIs(t, err, ctderrdefs.ErrNotFound, "unexpected error %v for index %d", err, i) + require.ErrorIs(t, err, ctderrdefs.ErrNotFound, "unexpected error %v for index %d (%s)", err, i, layer.Digest) } // re-run the build with a change only to input1 using the remote cache @@ -9659,7 +9761,7 @@ var hostNetwork integration.ConfigUpdater = &netModeHost{} var defaultNetwork integration.ConfigUpdater = &netModeDefault{} var bridgeDNSNetwork integration.ConfigUpdater = &netModeBridgeDNS{} -func fixedWriteCloser(wc io.WriteCloser) func(map[string]string) (io.WriteCloser, error) { +func fixedWriteCloser(wc io.WriteCloser) filesync.FileOutputFunc { return func(map[string]string) (io.WriteCloser, error) { return wc, nil } diff --git a/client/solve.go b/client/solve.go index 1c6f1489ed9b..6c4dcff67c41 100644 --- a/client/solve.go +++ b/client/solve.go @@ -56,8 +56,8 @@ type SolveOpt struct { type ExportEntry struct { Type string Attrs map[string]string - Output func(map[string]string) (io.WriteCloser, error) // for ExporterOCI and ExporterDocker - OutputDir string // for ExporterLocal + Output filesync.FileOutputFunc // for ExporterOCI and ExporterDocker + OutputDir string // for ExporterLocal } type CacheOptionsEntry struct { @@ -130,14 +130,6 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG return nil, err } - var ex ExportEntry - if len(opt.Exports) > 1 { - return nil, errors.New("currently only single Exports can be specified") - } - if len(opt.Exports) == 1 { - ex = opt.Exports[0] - } - storesToUpdate := []string{} if !opt.SessionPreInitialized { @@ -161,51 +153,52 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG contentStores[key2] = store } - var supportFile bool - var supportDir bool - switch ex.Type { - case ExporterLocal: - supportDir = true - case ExporterTar: - supportFile = true - case ExporterOCI, ExporterDocker: - supportDir = ex.OutputDir != "" - supportFile = ex.Output != nil - } - - if supportFile && supportDir { - return nil, errors.Errorf("both file and directory output is not supported by %s exporter", ex.Type) - } - if !supportFile && ex.Output != nil { - return nil, errors.Errorf("output file writer is not supported by %s exporter", ex.Type) - } - if !supportDir && ex.OutputDir != "" { - return nil, errors.Errorf("output directory is not supported by %s exporter", ex.Type) - } - - if supportFile { - if ex.Output == nil { - return nil, errors.Errorf("output file writer is required for %s exporter", ex.Type) - } - s.Allow(filesync.NewFSSyncTarget(ex.Output)) - } - if supportDir { - if ex.OutputDir == "" { - return nil, errors.Errorf("output directory is required for %s exporter", ex.Type) - } + var syncTargets []filesync.FSSyncTarget + for exID, ex := range opt.Exports { + var supportFile bool + var supportDir bool switch ex.Type { + case ExporterLocal: + supportDir = true + case ExporterTar: + supportFile = true case ExporterOCI, ExporterDocker: - if err := os.MkdirAll(ex.OutputDir, 0755); err != nil { - return nil, err + supportDir = ex.OutputDir != "" + supportFile = ex.Output != nil + } + if supportFile && supportDir { + return nil, errors.Errorf("both file and directory output is not supported by %s exporter", ex.Type) + } + if !supportFile && ex.Output != nil { + return nil, errors.Errorf("output file writer is not supported by %s exporter", ex.Type) + } + if !supportDir && ex.OutputDir != "" { + return nil, errors.Errorf("output directory is not supported by %s exporter", ex.Type) + } + if supportFile { + if ex.Output == nil { + return nil, errors.Errorf("output file writer is required for %s exporter", ex.Type) } - cs, err := contentlocal.NewStore(ex.OutputDir) - if err != nil { - return nil, err + syncTargets = append(syncTargets, filesync.WithFSSync(exID, ex.Output)) + } + if supportDir { + if ex.OutputDir == "" { + return nil, errors.Errorf("output directory is required for %s exporter", ex.Type) + } + switch ex.Type { + case ExporterOCI, ExporterDocker: + if err := os.MkdirAll(ex.OutputDir, 0755); err != nil { + return nil, err + } + cs, err := contentlocal.NewStore(ex.OutputDir) + if err != nil { + return nil, err + } + contentStores["export"] = cs + storesToUpdate = append(storesToUpdate, ex.OutputDir) + default: + syncTargets = append(syncTargets, filesync.WithFSSyncDir(exID, ex.OutputDir)) } - contentStores["export"] = cs - storesToUpdate = append(storesToUpdate, ex.OutputDir) - default: - s.Allow(filesync.NewFSSyncTargetDir(ex.OutputDir)) } } @@ -213,6 +206,10 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG s.Allow(sessioncontent.NewAttachable(contentStores)) } + if len(syncTargets) > 0 { + s.Allow(filesync.NewFSSyncTarget(syncTargets...)) + } + eg.Go(func() error { sd := c.sessionDialer if sd == nil { @@ -260,19 +257,34 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG frontendInputs[key] = def.ToPB() } + exports := make([]*controlapi.Exporter, 0, len(opt.Exports)) + exportDeprecated := "" + exportAttrDeprecated := map[string]string{} + for i, exp := range opt.Exports { + if i == 0 { + exportDeprecated = exp.Type + exportAttrDeprecated = exp.Attrs + } + exports = append(exports, &controlapi.Exporter{ + Type: exp.Type, + Attrs: exp.Attrs, + }) + } + resp, err := c.ControlClient().Solve(ctx, &controlapi.SolveRequest{ - Ref: ref, - Definition: pbd, - Exporter: ex.Type, - ExporterAttrs: ex.Attrs, - Session: s.ID(), - Frontend: opt.Frontend, - FrontendAttrs: frontendAttrs, - FrontendInputs: frontendInputs, - Cache: cacheOpt.options, - Entitlements: opt.AllowedEntitlements, - Internal: opt.Internal, - SourcePolicy: opt.SourcePolicy, + Ref: ref, + Definition: pbd, + Exporters: exports, + ExporterDeprecated: exportDeprecated, + ExporterAttrsDeprecated: exportAttrDeprecated, + Session: s.ID(), + Frontend: opt.Frontend, + FrontendAttrs: frontendAttrs, + FrontendInputs: frontendInputs, + Cache: cacheOpt.options, + Entitlements: opt.AllowedEntitlements, + Internal: opt.Internal, + SourcePolicy: opt.SourcePolicy, }) if err != nil { return errors.Wrap(err, "failed to solve") diff --git a/cmd/buildctl/build/output.go b/cmd/buildctl/build/output.go index e22a6e034936..c5547583c849 100644 --- a/cmd/buildctl/build/output.go +++ b/cmd/buildctl/build/output.go @@ -9,6 +9,7 @@ import ( "github.com/containerd/console" "github.com/moby/buildkit/client" + "github.com/moby/buildkit/session/filesync" "github.com/pkg/errors" ) @@ -66,7 +67,7 @@ func ParseOutput(exports []string) ([]client.ExportEntry, error) { } // resolveExporterDest returns at most either one of io.WriteCloser (single file) or a string (directory path). -func resolveExporterDest(exporter, dest string, attrs map[string]string) (func(map[string]string) (io.WriteCloser, error), string, error) { +func resolveExporterDest(exporter, dest string, attrs map[string]string) (filesync.FileOutputFunc, string, error) { wrapWriter := func(wc io.WriteCloser) func(map[string]string) (io.WriteCloser, error) { return func(m map[string]string) (io.WriteCloser, error) { return wc, nil diff --git a/cmd/buildctl/debug/monitor.go b/cmd/buildctl/debug/monitor.go index 2cf83e9326bf..0ecbe9284c41 100644 --- a/cmd/buildctl/debug/monitor.go +++ b/cmd/buildctl/debug/monitor.go @@ -59,16 +59,24 @@ func monitor(clicontext *cli.Context) error { } if ev.Record.Result != nil { - if ev.Record.Result.Result != nil { - fmt.Printf(" descriptor: %s\n", ev.Record.Result.Result) + if len(ev.Record.Result.Results) > 0 { + for _, res := range ev.Record.Result.Results { + fmt.Printf(" descriptor: %s\n", res) + } + } else if ev.Record.Result.ResultDeprecated != nil { + fmt.Printf(" descriptor: %s\n", ev.Record.Result.ResultDeprecated) } for _, att := range ev.Record.Result.Attestations { fmt.Printf(" attestation: %s\n", att) } } for k, res := range ev.Record.Results { - if res.Result != nil { - fmt.Printf(" [%s] descriptor: %s\n", k, res.Result) + if len(ev.Record.Result.Results) > 0 { + for _, res := range res.Results { + fmt.Printf(" [%s] descriptor: %s\n", k, res) + } + } else if res.ResultDeprecated != nil { + fmt.Printf(" [%s] descriptor: %s\n", k, res.ResultDeprecated) } for _, att := range res.Attestations { fmt.Printf(" [%s] attestation: %s\n", k, att) diff --git a/control/control.go b/control/control.go index 3d6409c529b8..56a96901de36 100644 --- a/control/control.go +++ b/control/control.go @@ -313,6 +313,7 @@ func translateLegacySolveRequest(req *controlapi.SolveRequest) { req.Cache.ExportRefDeprecated = "" req.Cache.ExportAttrsDeprecated = nil } + // translates ImportRefs to new Imports (v0.4.0) for _, legacyImportRef := range req.Cache.ImportRefsDeprecated { im := &controlapi.CacheOptionsEntry{ @@ -323,6 +324,16 @@ func translateLegacySolveRequest(req *controlapi.SolveRequest) { req.Cache.Imports = append(req.Cache.Imports, im) } req.Cache.ImportRefsDeprecated = nil + + // translate single exporter to a slice (v0.13.0) + if len(req.Exporters) == 0 && req.ExporterDeprecated != "" { + req.Exporters = append(req.Exporters, &controlapi.Exporter{ + Type: req.ExporterDeprecated, + Attrs: req.ExporterAttrsDeprecated, + }) + req.ExporterDeprecated = "" + req.ExporterAttrsDeprecated = nil + } } func (c *Controller) Solve(ctx context.Context, req *controlapi.SolveRequest) (*controlapi.SolveResponse, error) { @@ -335,7 +346,6 @@ func (c *Controller) Solve(ctx context.Context, req *controlapi.SolveRequest) (* time.AfterFunc(time.Second, c.throttledGC) }() - var expi exporter.ExporterInstance // TODO: multiworker // This is actually tricky, as the exporter should come from the worker that has the returned reference. We may need to delay this so that the solver loads this. w, err := c.opt.WorkerController.GetDefault() @@ -343,25 +353,29 @@ func (c *Controller) Solve(ctx context.Context, req *controlapi.SolveRequest) (* return nil, err } - // if SOURCE_DATE_EPOCH is set, enable it for the exporter + // if SOURCE_DATE_EPOCH is set, enable it for the exporters if v, ok := epoch.ParseBuildArgs(req.FrontendAttrs); ok { - if _, ok := req.ExporterAttrs[string(exptypes.OptKeySourceDateEpoch)]; !ok { - if req.ExporterAttrs == nil { - req.ExporterAttrs = make(map[string]string) + for _, ex := range req.Exporters { + if _, ok := ex.Attrs[string(exptypes.OptKeySourceDateEpoch)]; !ok { + if ex.Attrs == nil { + ex.Attrs = make(map[string]string) + } + ex.Attrs[string(exptypes.OptKeySourceDateEpoch)] = v } - req.ExporterAttrs[string(exptypes.OptKeySourceDateEpoch)] = v } } - if req.Exporter != "" { - exp, err := w.Exporter(req.Exporter, c.opt.SessionManager) + var expis []exporter.ExporterInstance + for i, ex := range req.Exporters { + exp, err := w.Exporter(ex.Type, c.opt.SessionManager) if err != nil { return nil, err } - expi, err = exp.Resolve(ctx, req.ExporterAttrs) + expi, err := exp.Resolve(ctx, i, ex.Attrs) if err != nil { return nil, err } + expis = append(expis, expi) } if c, err := findDuplicateCacheOptions(req.Cache.Exports); err != nil { @@ -453,10 +467,8 @@ func (c *Controller) Solve(ctx context.Context, req *controlapi.SolveRequest) (* FrontendInputs: req.FrontendInputs, CacheImports: cacheImports, }, llbsolver.ExporterRequest{ - Exporter: expi, + Exporters: expis, CacheExporters: cacheExporters, - Type: req.Exporter, - Attrs: req.ExporterAttrs, }, req.Entitlements, procs, req.Internal, req.SourcePolicy) if err != nil { return nil, err diff --git a/exporter/containerimage/export.go b/exporter/containerimage/export.go index 3f8865f8e830..26afb842dcc7 100644 --- a/exporter/containerimage/export.go +++ b/exporter/containerimage/export.go @@ -64,9 +64,10 @@ func New(opt Opt) (exporter.Exporter, error) { return im, nil } -func (e *imageExporter) Resolve(ctx context.Context, opt map[string]string) (exporter.ExporterInstance, error) { +func (e *imageExporter) Resolve(ctx context.Context, id int, opt map[string]string) (exporter.ExporterInstance, error) { i := &imageExporterInstance{ imageExporter: e, + id: id, opts: ImageCommitOpts{ RefCfg: cacheconfig.RefConfig{ Compression: compression.New(compression.Default), @@ -167,6 +168,8 @@ func (e *imageExporter) Resolve(ctx context.Context, opt map[string]string) (exp type imageExporterInstance struct { *imageExporter + id int + opts ImageCommitOpts push bool pushByDigest bool @@ -179,6 +182,10 @@ type imageExporterInstance struct { meta map[string][]byte } +func (e *imageExporterInstance) ID() int { + return e.id +} + func (e *imageExporterInstance) Name() string { return "exporting to image" } @@ -187,7 +194,8 @@ func (e *imageExporterInstance) Config() *exporter.Config { return exporter.NewConfigWithCompression(e.opts.RefCfg.Compression) } -func (e *imageExporterInstance) Export(ctx context.Context, src *exporter.Source, sessionID string) (_ map[string]string, descref exporter.DescriptorReference, err error) { +func (e *imageExporterInstance) Export(ctx context.Context, src *exporter.Source, inlineCache exptypes.InlineCache, sessionID string) (_ map[string]string, descref exporter.DescriptorReference, err error) { + src = src.Clone() if src.Metadata == nil { src.Metadata = make(map[string][]byte) } @@ -212,7 +220,7 @@ func (e *imageExporterInstance) Export(ctx context.Context, src *exporter.Source } }() - desc, err := e.opt.ImageWriter.Commit(ctx, src, sessionID, &opts) + desc, err := e.opt.ImageWriter.Commit(ctx, src, sessionID, inlineCache, &opts) if err != nil { return nil, nil, err } diff --git a/exporter/containerimage/exptypes/parse.go b/exporter/containerimage/exptypes/parse.go index f77cd3f52565..293a24ed0772 100644 --- a/exporter/containerimage/exptypes/parse.go +++ b/exporter/containerimage/exptypes/parse.go @@ -46,10 +46,13 @@ func ParsePlatforms(meta map[string][]byte) (Platforms, error) { return ps, nil } -func ParseKey(meta map[string][]byte, key string, p Platform) []byte { - if v, ok := meta[fmt.Sprintf("%s/%s", key, p.ID)]; ok { - return v - } else if v, ok := meta[key]; ok { +func ParseKey(meta map[string][]byte, key string, p *Platform) []byte { + if p != nil { + if v, ok := meta[fmt.Sprintf("%s/%s", key, p.ID)]; ok { + return v + } + } + if v, ok := meta[key]; ok { return v } return nil diff --git a/exporter/containerimage/exptypes/types.go b/exporter/containerimage/exptypes/types.go index c4d5721ea65d..74465c858304 100644 --- a/exporter/containerimage/exptypes/types.go +++ b/exporter/containerimage/exptypes/types.go @@ -1,6 +1,9 @@ package exptypes import ( + "context" + + "github.com/moby/buildkit/solver/result" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" ) @@ -10,7 +13,6 @@ const ( ExporterImageConfigKey = "containerimage.config" ExporterImageConfigDigestKey = "containerimage.config.digest" ExporterImageDescriptorKey = "containerimage.descriptor" - ExporterInlineCache = "containerimage.inlinecache" ExporterPlatformsKey = "refs.platforms" ) @@ -18,7 +20,6 @@ const ( // a platform to become platform specific var KnownRefMetadataKeys = []string{ ExporterImageConfigKey, - ExporterInlineCache, } type Platforms struct { @@ -29,3 +30,8 @@ type Platform struct { ID string Platform ocispecs.Platform } + +type InlineCacheEntry struct { + Data []byte +} +type InlineCache func(ctx context.Context) (*result.Result[*InlineCacheEntry], error) diff --git a/exporter/containerimage/writer.go b/exporter/containerimage/writer.go index a215b1affe5f..089c11798854 100644 --- a/exporter/containerimage/writer.go +++ b/exporter/containerimage/writer.go @@ -59,7 +59,7 @@ type ImageWriter struct { opt WriterOpt } -func (ic *ImageWriter) Commit(ctx context.Context, inp *exporter.Source, sessionID string, opts *ImageCommitOpts) (*ocispecs.Descriptor, error) { +func (ic *ImageWriter) Commit(ctx context.Context, inp *exporter.Source, sessionID string, inlineCache exptypes.InlineCache, opts *ImageCommitOpts) (*ocispecs.Descriptor, error) { if _, ok := inp.Metadata[exptypes.ExporterPlatformsKey]; len(inp.Refs) > 0 && !ok { return nil, errors.Errorf("unable to export multiple refs, missing platforms mapping") } @@ -114,36 +114,50 @@ func (ic *ImageWriter) Commit(ctx context.Context, inp *exporter.Source, session } var ref cache.ImmutableRef - var p exptypes.Platform + var p *exptypes.Platform if len(ps.Platforms) > 0 { - p = ps.Platforms[0] + p = &ps.Platforms[0] if r, ok := inp.FindRef(p.ID); ok { ref = r } } else { ref = inp.Ref } + config := exptypes.ParseKey(inp.Metadata, exptypes.ExporterImageConfigKey, p) remotes, err := ic.exportLayers(ctx, opts.RefCfg, session.NewGroup(sessionID), ref) if err != nil { return nil, err } + remote := &remotes[0] + if opts.RewriteTimestamp { + remote, err = ic.rewriteRemoteWithEpoch(ctx, opts, remote) + if err != nil { + return nil, err + } + } annotations := opts.Annotations.Platform(nil) if len(annotations.Index) > 0 || len(annotations.IndexDescriptor) > 0 { return nil, errors.Errorf("index annotations not supported for single platform export") } - config := exptypes.ParseKey(inp.Metadata, exptypes.ExporterImageConfigKey, p) - inlineCache := exptypes.ParseKey(inp.Metadata, exptypes.ExporterInlineCache, p) - remote := &remotes[0] - if opts.RewriteTimestamp { - remote, err = ic.rewriteRemoteWithEpoch(ctx, opts, remote) + var inlineCacheEntry *exptypes.InlineCacheEntry + if inlineCache != nil { + inlineCacheResult, err := inlineCache(ctx) if err != nil { return nil, err } + if inlineCacheResult != nil { + if p != nil { + inlineCacheEntry, _ = inlineCacheResult.FindRef(p.ID) + } else { + inlineCacheEntry = inlineCacheResult.Ref + } + } } - mfstDesc, configDesc, err := ic.commitDistributionManifest(ctx, opts, ref, config, remote, annotations, inlineCache, opts.Epoch, session.NewGroup(sessionID)) + + mfstDesc, configDesc, err := ic.commitDistributionManifest(ctx, opts, ref, config, remote, annotations, inlineCacheEntry, opts.Epoch, session.NewGroup(sessionID)) if err != nil { return nil, err } @@ -178,6 +192,14 @@ func (ic *ImageWriter) Commit(ctx context.Context, inp *exporter.Source, session return nil, err } + var inlineCacheResult *result.Result[*exptypes.InlineCacheEntry] + if inlineCache != nil { + inlineCacheResult, err = inlineCache(ctx) + if err != nil { + return nil, err + } + } + idx := ocispecs.Index{ MediaType: ocispecs.MediaTypeImageIndex, Annotations: opts.Annotations.Platform(nil).Index, @@ -199,8 +221,7 @@ func (ic *ImageWriter) Commit(ctx context.Context, inp *exporter.Source, session if !ok { return nil, errors.Errorf("failed to find ref for ID %s", p.ID) } - config := exptypes.ParseKey(inp.Metadata, exptypes.ExporterImageConfigKey, p) - inlineCache := exptypes.ParseKey(inp.Metadata, exptypes.ExporterInlineCache, p) + config := exptypes.ParseKey(inp.Metadata, exptypes.ExporterImageConfigKey, &p) remote := &remotes[remotesMap[p.ID]] if remote == nil { @@ -208,7 +229,6 @@ func (ic *ImageWriter) Commit(ctx context.Context, inp *exporter.Source, session Provider: ic.opt.ContentStore, } } - if opts.RewriteTimestamp { remote, err = ic.rewriteRemoteWithEpoch(ctx, opts, remote) if err != nil { @@ -216,7 +236,12 @@ func (ic *ImageWriter) Commit(ctx context.Context, inp *exporter.Source, session } } - desc, _, err := ic.commitDistributionManifest(ctx, opts, r, config, remote, opts.Annotations.Platform(&p.Platform), inlineCache, opts.Epoch, session.NewGroup(sessionID)) + var inlineCacheEntry *exptypes.InlineCacheEntry + if inlineCacheResult != nil { + inlineCacheEntry, _ = inlineCacheResult.FindRef(p.ID) + } + + desc, _, err := ic.commitDistributionManifest(ctx, opts, r, config, remote, opts.Annotations.Platform(&p.Platform), inlineCacheEntry, opts.Epoch, session.NewGroup(sessionID)) if err != nil { return nil, err } @@ -386,7 +411,7 @@ func (ic *ImageWriter) rewriteRemoteWithEpoch(ctx context.Context, opts *ImageCo }, nil } -func (ic *ImageWriter) commitDistributionManifest(ctx context.Context, opts *ImageCommitOpts, ref cache.ImmutableRef, config []byte, remote *solver.Remote, annotations *Annotations, inlineCache []byte, epoch *time.Time, sg session.Group) (*ocispecs.Descriptor, *ocispecs.Descriptor, error) { +func (ic *ImageWriter) commitDistributionManifest(ctx context.Context, opts *ImageCommitOpts, ref cache.ImmutableRef, config []byte, remote *solver.Remote, annotations *Annotations, inlineCache *exptypes.InlineCacheEntry, epoch *time.Time, sg session.Group) (*ocispecs.Descriptor, *ocispecs.Descriptor, error) { if len(config) == 0 { var err error config, err = defaultImageConfig() @@ -633,7 +658,7 @@ func parseHistoryFromConfig(dt []byte) ([]ocispecs.History, error) { return config.History, nil } -func patchImageConfig(dt []byte, descs []ocispecs.Descriptor, history []ocispecs.History, cache []byte, epoch *time.Time) ([]byte, error) { +func patchImageConfig(dt []byte, descs []ocispecs.Descriptor, history []ocispecs.History, cache *exptypes.InlineCacheEntry, epoch *time.Time) ([]byte, error) { m := map[string]json.RawMessage{} if err := json.Unmarshal(dt, &m); err != nil { return nil, errors.Wrap(err, "failed to parse image config for patch") @@ -694,7 +719,7 @@ func patchImageConfig(dt []byte, descs []ocispecs.Descriptor, history []ocispecs } if cache != nil { - dt, err := json.Marshal(cache) + dt, err := json.Marshal(cache.Data) if err != nil { return nil, err } diff --git a/exporter/exporter.go b/exporter/exporter.go index 0e7d8d14f280..bbaf4b8a49a0 100644 --- a/exporter/exporter.go +++ b/exporter/exporter.go @@ -4,6 +4,7 @@ import ( "context" "github.com/moby/buildkit/cache" + "github.com/moby/buildkit/exporter/containerimage/exptypes" "github.com/moby/buildkit/solver/result" "github.com/moby/buildkit/util/compression" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" @@ -14,13 +15,14 @@ type Source = result.Result[cache.ImmutableRef] type Attestation = result.Attestation[cache.ImmutableRef] type Exporter interface { - Resolve(context.Context, map[string]string) (ExporterInstance, error) + Resolve(context.Context, int, map[string]string) (ExporterInstance, error) } type ExporterInstance interface { + ID() int Name() string Config() *Config - Export(ctx context.Context, src *Source, sessionID string) (map[string]string, DescriptorReference, error) + Export(ctx context.Context, src *Source, inlineCache exptypes.InlineCache, sessionID string) (map[string]string, DescriptorReference, error) } type DescriptorReference interface { diff --git a/exporter/local/export.go b/exporter/local/export.go index 96d8352bb04f..b6fa6866cb96 100644 --- a/exporter/local/export.go +++ b/exporter/local/export.go @@ -35,8 +35,9 @@ func New(opt Opt) (exporter.Exporter, error) { return le, nil } -func (e *localExporter) Resolve(ctx context.Context, opt map[string]string) (exporter.ExporterInstance, error) { +func (e *localExporter) Resolve(ctx context.Context, id int, opt map[string]string) (exporter.ExporterInstance, error) { i := &localExporterInstance{ + id: id, localExporter: e, } _, err := i.opts.Load(opt) @@ -49,9 +50,15 @@ func (e *localExporter) Resolve(ctx context.Context, opt map[string]string) (exp type localExporterInstance struct { *localExporter + id int + opts CreateFSOpts } +func (e *localExporterInstance) ID() int { + return e.id +} + func (e *localExporterInstance) Name() string { return "exporting to client directory" } @@ -60,7 +67,7 @@ func (e *localExporter) Config() *exporter.Config { return exporter.NewConfig() } -func (e *localExporterInstance) Export(ctx context.Context, inp *exporter.Source, sessionID string) (map[string]string, exporter.DescriptorReference, error) { +func (e *localExporterInstance) Export(ctx context.Context, inp *exporter.Source, _ exptypes.InlineCache, sessionID string) (map[string]string, exporter.DescriptorReference, error) { timeoutCtx, cancel := context.WithCancelCause(ctx) timeoutCtx, _ = context.WithTimeoutCause(timeoutCtx, 5*time.Second, errors.WithStack(context.DeadlineExceeded)) defer cancel(errors.WithStack(context.Canceled)) @@ -148,7 +155,7 @@ func (e *localExporterInstance) Export(ctx context.Context, inp *exporter.Source } progress := NewProgressHandler(ctx, lbl) - if err := filesync.CopyToCaller(ctx, outputFS, caller, progress); err != nil { + if err := filesync.CopyToCaller(ctx, outputFS, e.id, caller, progress); err != nil { return err } return nil diff --git a/exporter/oci/export.go b/exporter/oci/export.go index f1a1aa55c83b..3748f536caa4 100644 --- a/exporter/oci/export.go +++ b/exporter/oci/export.go @@ -58,9 +58,10 @@ func New(opt Opt) (exporter.Exporter, error) { return im, nil } -func (e *imageExporter) Resolve(ctx context.Context, opt map[string]string) (exporter.ExporterInstance, error) { +func (e *imageExporter) Resolve(ctx context.Context, id int, opt map[string]string) (exporter.ExporterInstance, error) { i := &imageExporterInstance{ imageExporter: e, + id: id, tar: true, opts: containerimage.ImageCommitOpts{ RefCfg: cacheconfig.RefConfig{ @@ -99,11 +100,17 @@ func (e *imageExporter) Resolve(ctx context.Context, opt map[string]string) (exp type imageExporterInstance struct { *imageExporter + id int + opts containerimage.ImageCommitOpts tar bool meta map[string][]byte } +func (e *imageExporterInstance) ID() int { + return e.id +} + func (e *imageExporterInstance) Name() string { return fmt.Sprintf("exporting to %s image format", e.opt.Variant) } @@ -112,11 +119,12 @@ func (e *imageExporterInstance) Config() *exporter.Config { return exporter.NewConfigWithCompression(e.opts.RefCfg.Compression) } -func (e *imageExporterInstance) Export(ctx context.Context, src *exporter.Source, sessionID string) (_ map[string]string, descref exporter.DescriptorReference, err error) { +func (e *imageExporterInstance) Export(ctx context.Context, src *exporter.Source, inlineCache exptypes.InlineCache, sessionID string) (_ map[string]string, descref exporter.DescriptorReference, err error) { if e.opt.Variant == VariantDocker && len(src.Refs) > 0 { return nil, nil, errors.Errorf("docker exporter does not currently support exporting manifest lists") } + src = src.Clone() if src.Metadata == nil { src.Metadata = make(map[string][]byte) } @@ -141,7 +149,7 @@ func (e *imageExporterInstance) Export(ctx context.Context, src *exporter.Source } }() - desc, err := e.opt.ImageWriter.Commit(ctx, src, sessionID, &opts) + desc, err := e.opt.ImageWriter.Commit(ctx, src, sessionID, inlineCache, &opts) if err != nil { return nil, nil, err } @@ -240,7 +248,7 @@ func (e *imageExporterInstance) Export(ctx context.Context, src *exporter.Source } if e.tar { - w, err := filesync.CopyFileWriter(ctx, resp, caller) + w, err := filesync.CopyFileWriter(ctx, resp, e.id, caller) if err != nil { return nil, nil, err } diff --git a/exporter/tar/export.go b/exporter/tar/export.go index c932000e594b..4f6afbd24f24 100644 --- a/exporter/tar/export.go +++ b/exporter/tar/export.go @@ -33,8 +33,11 @@ func New(opt Opt) (exporter.Exporter, error) { return le, nil } -func (e *localExporter) Resolve(ctx context.Context, opt map[string]string) (exporter.ExporterInstance, error) { - li := &localExporterInstance{localExporter: e} +func (e *localExporter) Resolve(ctx context.Context, id int, opt map[string]string) (exporter.ExporterInstance, error) { + li := &localExporterInstance{ + localExporter: e, + id: id, + } _, err := li.opts.Load(opt) if err != nil { return nil, err @@ -46,9 +49,15 @@ func (e *localExporter) Resolve(ctx context.Context, opt map[string]string) (exp type localExporterInstance struct { *localExporter + id int + opts local.CreateFSOpts } +func (e *localExporterInstance) ID() int { + return e.id +} + func (e *localExporterInstance) Name() string { return "exporting to client tarball" } @@ -57,7 +66,7 @@ func (e *localExporterInstance) Config() *exporter.Config { return exporter.NewConfig() } -func (e *localExporterInstance) Export(ctx context.Context, inp *exporter.Source, sessionID string) (map[string]string, exporter.DescriptorReference, error) { +func (e *localExporterInstance) Export(ctx context.Context, inp *exporter.Source, _ exptypes.InlineCache, sessionID string) (map[string]string, exporter.DescriptorReference, error) { var defers []func() error defer func() { @@ -152,7 +161,7 @@ func (e *localExporterInstance) Export(ctx context.Context, inp *exporter.Source return nil, nil, err } - w, err := filesync.CopyFileWriter(ctx, nil, caller) + w, err := filesync.CopyFileWriter(ctx, nil, e.id, caller) if err != nil { return nil, nil, err } diff --git a/frontend/dockerfile/dockerfile_test.go b/frontend/dockerfile/dockerfile_test.go index 1ed794e10a8f..db73ad5741e1 100644 --- a/frontend/dockerfile/dockerfile_test.go +++ b/frontend/dockerfile/dockerfile_test.go @@ -42,6 +42,7 @@ import ( "github.com/moby/buildkit/frontend/subrequests" "github.com/moby/buildkit/identity" "github.com/moby/buildkit/session" + "github.com/moby/buildkit/session/filesync" "github.com/moby/buildkit/session/upload/uploadprovider" "github.com/moby/buildkit/solver/errdefs" "github.com/moby/buildkit/solver/pb" @@ -7197,7 +7198,7 @@ func (*networkModeSandbox) UpdateConfigFile(in string) string { var networkHostGranted integration.ConfigUpdater = &networkModeHost{} var networkHostDenied integration.ConfigUpdater = &networkModeSandbox{} -func fixedWriteCloser(wc io.WriteCloser) func(map[string]string) (io.WriteCloser, error) { +func fixedWriteCloser(wc io.WriteCloser) filesync.FileOutputFunc { return func(map[string]string) (io.WriteCloser, error) { return wc, nil } diff --git a/session/filesync/filesync.go b/session/filesync/filesync.go index f05c475f6dcf..dc3402f2d3b8 100644 --- a/session/filesync/filesync.go +++ b/session/filesync/filesync.go @@ -27,6 +27,8 @@ const ( keyFollowPaths = "followpaths" keyDirName = "dir-name" keyExporterMetaPrefix = "exporter-md-" + + keyExporterID = "buildkit-attachable-exporter-id" ) type fsSyncProvider struct { @@ -35,6 +37,13 @@ type fsSyncProvider struct { doneCh chan error } +type FileOutputFunc func(map[string]string) (io.WriteCloser, error) + +type SyncedDir struct { + Dir string + Map func(string, *fstypes.Stat) fsutil.MapResult +} + type DirSource interface { LookupDir(string) (fsutil.FS, bool) } @@ -226,39 +235,87 @@ func FSSync(ctx context.Context, c session.Caller, opt FSSendRequestOpt) error { return pr.recvFn(stream, opt.DestDir, opt.CacheUpdater, opt.ProgressCb, opt.Differ, opt.Filter) } -// NewFSSyncTargetDir allows writing into a directory -func NewFSSyncTargetDir(outdir string) session.Attachable { - p := &fsSyncTarget{ +type FSSyncTarget interface { + target() *fsSyncTarget +} + +type fsSyncTarget struct { + id int + outdir string + f FileOutputFunc +} + +func (target *fsSyncTarget) target() *fsSyncTarget { + return target +} + +func WithFSSync(id int, f FileOutputFunc) FSSyncTarget { + return &fsSyncTarget{ + id: id, + f: f, + } +} + +func WithFSSyncDir(id int, outdir string) FSSyncTarget { + return &fsSyncTarget{ + id: id, outdir: outdir, } - return p } -// NewFSSyncTarget allows writing into an io.WriteCloser -func NewFSSyncTarget(f func(map[string]string) (io.WriteCloser, error)) session.Attachable { - p := &fsSyncTarget{ - f: f, +func NewFSSyncTarget(targets ...FSSyncTarget) session.Attachable { + fs := make(map[int]FileOutputFunc) + outdirs := make(map[int]string) + for _, t := range targets { + t := t.target() + if t.f != nil { + fs[t.id] = t.f + } + if t.outdir != "" { + outdirs[t.id] = t.outdir + } + } + return &fsSyncAttachable{ + fs: fs, + outdirs: outdirs, } - return p } -type fsSyncTarget struct { - outdir string - f func(map[string]string) (io.WriteCloser, error) +type fsSyncAttachable struct { + fs map[int]FileOutputFunc + outdirs map[int]string } -func (sp *fsSyncTarget) Register(server *grpc.Server) { +func (sp *fsSyncAttachable) Register(server *grpc.Server) { RegisterFileSendServer(server, sp) } -func (sp *fsSyncTarget) DiffCopy(stream FileSend_DiffCopyServer) (err error) { - if sp.outdir != "" { - return syncTargetDiffCopy(stream, sp.outdir) +func (sp *fsSyncAttachable) chooser(ctx context.Context) int { + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return 0 } + values := md[keyExporterID] + if len(values) == 0 { + return 0 + } + id, err := strconv.ParseInt(values[0], 10, 64) + if err != nil { + return 0 + } + return int(id) +} - if sp.f == nil { - return errors.New("empty outfile and outdir") +func (sp *fsSyncAttachable) DiffCopy(stream FileSend_DiffCopyServer) (err error) { + id := sp.chooser(stream.Context()) + if outdir, ok := sp.outdirs[id]; ok { + return syncTargetDiffCopy(stream, outdir) } + f, ok := sp.fs[id] + if !ok { + return errors.Errorf("exporter %d not found", id) + } + opts, _ := metadata.FromIncomingContext(stream.Context()) // if no metadata continue with empty object md := map[string]string{} for k, v := range opts { @@ -266,7 +323,7 @@ func (sp *fsSyncTarget) DiffCopy(stream FileSend_DiffCopyServer) (err error) { md[strings.TrimPrefix(k, keyExporterMetaPrefix)] = strings.Join(v, ",") } } - wc, err := sp.f(md) + wc, err := f(md) if err != nil { return err } @@ -282,7 +339,7 @@ func (sp *fsSyncTarget) DiffCopy(stream FileSend_DiffCopyServer) (err error) { return writeTargetFile(stream, wc) } -func CopyToCaller(ctx context.Context, fs fsutil.FS, c session.Caller, progress func(int, bool)) error { +func CopyToCaller(ctx context.Context, fs fsutil.FS, id int, c session.Caller, progress func(int, bool)) error { method := session.MethodURL(_FileSend_serviceDesc.ServiceName, "diffcopy") if !c.Supports(method) { return errors.Errorf("method %s not supported by the client", method) @@ -290,6 +347,11 @@ func CopyToCaller(ctx context.Context, fs fsutil.FS, c session.Caller, progress client := NewFileSendClient(c.Conn()) + opts := map[string][]string{ + keyExporterID: {fmt.Sprint(id)}, + } + ctx = metadata.NewOutgoingContext(ctx, opts) + cc, err := client.DiffCopy(ctx) if err != nil { return errors.WithStack(err) @@ -298,7 +360,7 @@ func CopyToCaller(ctx context.Context, fs fsutil.FS, c session.Caller, progress return sendDiffCopy(cc, fs, progress) } -func CopyFileWriter(ctx context.Context, md map[string]string, c session.Caller) (io.WriteCloser, error) { +func CopyFileWriter(ctx context.Context, md map[string]string, id int, c session.Caller) (io.WriteCloser, error) { method := session.MethodURL(_FileSend_serviceDesc.ServiceName, "diffcopy") if !c.Supports(method) { return nil, errors.Errorf("method %s not supported by the client", method) @@ -317,7 +379,10 @@ func CopyFileWriter(ctx context.Context, md map[string]string, c session.Caller) } opts[k] = []string{v} } - + if existingVal, ok := opts[keyExporterID]; ok { + bklog.G(ctx).Warnf("overwriting grpc metadata key %q from value %+v to %+v", keyExporterID, existingVal, id) + } + opts[keyExporterID] = []string{fmt.Sprint(id)} ctx = metadata.NewOutgoingContext(ctx, opts) cc, err := client.DiffCopy(ctx) diff --git a/session/filesync/filesync.proto b/session/filesync/filesync.proto index e0724d6f0fab..68162d8a38f4 100644 --- a/session/filesync/filesync.proto +++ b/session/filesync/filesync.proto @@ -6,16 +6,18 @@ option go_package = "filesync"; import "github.com/tonistiigi/fsutil/types/wire.proto"; +// FileSync exposes local files from the client to the server. service FileSync{ rpc DiffCopy(stream fsutil.types.Packet) returns (stream fsutil.types.Packet); rpc TarStream(stream fsutil.types.Packet) returns (stream fsutil.types.Packet); } +// FileSend allows sending files from the server back to the client. service FileSend{ rpc DiffCopy(stream BytesMessage) returns (stream BytesMessage); } // BytesMessage contains a chunk of byte data -message BytesMessage{ +message BytesMessage { bytes data = 1; } diff --git a/solver/llbsolver/history.go b/solver/llbsolver/history.go index e3a69f7dcd88..8a099ced0e46 100644 --- a/solver/llbsolver/history.go +++ b/solver/llbsolver/history.go @@ -526,9 +526,14 @@ func (h *HistoryQueue) update(ctx context.Context, rec controlapi.BuildHistoryRe return err } if rec.Result != nil { - if err := h.addResource(ctx, l, rec.Result.Result, true); err != nil { + if err := h.addResource(ctx, l, rec.Result.ResultDeprecated, true); err != nil { return err } + for _, res := range rec.Result.Results { + if err := h.addResource(ctx, l, res, true); err != nil { + return err + } + } for _, att := range rec.Result.Attestations { if err := h.addResource(ctx, l, att, false); err != nil { return err @@ -536,9 +541,14 @@ func (h *HistoryQueue) update(ctx context.Context, rec controlapi.BuildHistoryRe } } for _, r := range rec.Results { - if err := h.addResource(ctx, l, r.Result, true); err != nil { + if err := h.addResource(ctx, l, r.ResultDeprecated, true); err != nil { return err } + for _, res := range r.Results { + if err := h.addResource(ctx, l, res, true); err != nil { + return err + } + } for _, att := range r.Attestations { if err := h.addResource(ctx, l, att, false); err != nil { return err diff --git a/solver/llbsolver/solver.go b/solver/llbsolver/solver.go index 4f6ab93c981f..8b516223a783 100644 --- a/solver/llbsolver/solver.go +++ b/solver/llbsolver/solver.go @@ -53,7 +53,7 @@ const ( type ExporterRequest struct { Type string Attrs map[string]string - Exporter exporter.ExporterInstance + Exporters []exporter.ExporterInstance CacheExporters []RemoteCacheExporter } @@ -149,7 +149,7 @@ func (s *Solver) Bridge(b solver.Builder) frontend.FrontendLLBBridge { return s.bridge(b) } -func (s *Solver) recordBuildHistory(ctx context.Context, id string, req frontend.SolveRequest, exp ExporterRequest, j *solver.Job, usage *resources.SysSampler) (func(*Result, exporter.DescriptorReference, error) error, error) { +func (s *Solver) recordBuildHistory(ctx context.Context, id string, req frontend.SolveRequest, exp ExporterRequest, j *solver.Job, usage *resources.SysSampler) (func(*Result, []exporter.DescriptorReference, error) error, error) { var stopTrace func() []tracetest.SpanStub if s := trace.SpanFromContext(ctx); s.SpanContext().IsValid() { @@ -182,7 +182,7 @@ func (s *Solver) recordBuildHistory(ctx context.Context, id string, req frontend return nil, err } - return func(res *Result, descref exporter.DescriptorReference, err error) error { + return func(res *Result, descrefs []exporter.DescriptorReference, err error) error { en := time.Now() rec.CompletedAt = &en @@ -314,24 +314,39 @@ func (s *Solver) recordBuildHistory(ctx context.Context, id string, req frontend return j.Status(ctx2, ch) }) - if descref != nil { + setDeprecated := true + for i, descref := range descrefs { + i, descref := i, descref + if descref == nil { + continue + } + deprecate := setDeprecated + setDeprecated = false eg.Go(func() error { mu.Lock() - if rec.Result == nil { - rec.Result = &controlapi.BuildResultInfo{} - } desc := descref.Descriptor() - rec.Result.Result = &controlapi.Descriptor{ + controlDesc := &controlapi.Descriptor{ Digest: desc.Digest, Size_: desc.Size, MediaType: desc.MediaType, Annotations: desc.Annotations, } + if rec.Result == nil { + rec.Result = &controlapi.BuildResultInfo{} + } + if rec.Result.Results == nil { + rec.Result.Results = make(map[int64]*controlapi.Descriptor) + } + if deprecate { + // write the first available descriptor to the deprecated + // field for legacy clients + rec.Result.ResultDeprecated = controlDesc + } + rec.Result.Results[int64(i)] = controlDesc mu.Unlock() return nil }) } - if err1 := eg.Wait(); err == nil { err = err1 } @@ -425,15 +440,17 @@ func (s *Solver) Solve(ctx context.Context, id string, sessionID string, req fro var res *frontend.Result var resProv *Result - var descref exporter.DescriptorReference + var descrefs []exporter.DescriptorReference var releasers []func() defer func() { for _, f := range releasers { f() } - if descref != nil { - descref.Release() + for _, descref := range descrefs { + if descref != nil { + descref.Release() + } } }() @@ -475,7 +492,7 @@ func (s *Solver) Solve(ctx context.Context, id string, sessionID string, req fro return nil, err1 } defer func() { - err = rec(resProv, descref, err) + err = rec(resProv, descrefs, err) }() } @@ -554,21 +571,9 @@ func (s *Solver) Solve(ctx context.Context, id string, sessionID string, req fro cacheExporters, inlineCacheExporter := splitCacheExporters(exp.CacheExporters) var exporterResponse map[string]string - if e := exp.Exporter; e != nil { - meta, err := runInlineCacheExporter(ctx, e, inlineCacheExporter, j, cached) - if err != nil { - return nil, err - } - for k, v := range meta { - inp.AddMeta(k, v) - } - - if err := inBuilderContext(ctx, j, e.Name(), j.SessionID+"-export", func(ctx context.Context, _ session.Group) error { - exporterResponse, descref, err = e.Export(ctx, inp, j.SessionID) - return err - }); err != nil { - return nil, err - } + exporterResponse, descrefs, err = s.runExporters(ctx, exp.Exporters, inlineCacheExporter, j, cached, inp) + if err != nil { + return nil, err } cacheExporterResponse, err := runCacheExporters(ctx, cacheExporters, j, cached, inp) @@ -602,41 +607,43 @@ func runCacheExporters(ctx context.Context, exporters []RemoteCacheExporter, j * var cacheExporterResponse map[string]string resps := make([]map[string]string, len(exporters)) for i, exp := range exporters { - func(exp RemoteCacheExporter, i int) { - eg.Go(func() (err error) { - id := fmt.Sprint(j.SessionID, "-cache-", i) - err = inBuilderContext(ctx, j, exp.Exporter.Name(), id, func(ctx context.Context, _ session.Group) error { - prepareDone := progress.OneOff(ctx, "preparing build cache for export") - if err := result.EachRef(cached, inp, func(res solver.CachedResult, ref cache.ImmutableRef) error { - ctx = withDescHandlerCacheOpts(ctx, ref) - - // Configure compression - compressionConfig := exp.Config().Compression - - // all keys have same export chain so exporting others is not needed - _, err = res.CacheKeys()[0].Exporter.ExportTo(ctx, exp, solver.CacheExportOpt{ - ResolveRemotes: workerRefResolver(cacheconfig.RefConfig{Compression: compressionConfig}, false, g), - Mode: exp.CacheExportMode, - Session: g, - CompressionOpt: &compressionConfig, - }) - return err - }); err != nil { - return prepareDone(err) - } - resps[i], err = exp.Finalize(ctx) + i, exp := i, exp + eg.Go(func() (err error) { + id := fmt.Sprint(j.SessionID, "-cache-", i) + err = inBuilderContext(ctx, j, exp.Exporter.Name(), id, func(ctx context.Context, _ session.Group) error { + prepareDone := progress.OneOff(ctx, "preparing build cache for export") + if err := result.EachRef(cached, inp, func(res solver.CachedResult, ref cache.ImmutableRef) error { + ctx = withDescHandlerCacheOpts(ctx, ref) + + // Configure compression + compressionConfig := exp.Config().Compression + + // all keys have same export chain so exporting others is not needed + _, err = res.CacheKeys()[0].Exporter.ExportTo(ctx, exp, solver.CacheExportOpt{ + ResolveRemotes: workerRefResolver(cacheconfig.RefConfig{Compression: compressionConfig}, false, g), + Mode: exp.CacheExportMode, + Session: g, + CompressionOpt: &compressionConfig, + }) + return err + }); err != nil { return prepareDone(err) - }) - if exp.IgnoreError { - err = nil } - return err + resps[i], err = exp.Finalize(ctx) + return prepareDone(err) }) - }(exp, i) + if exp.IgnoreError { + err = nil + } + return err + }) } if err := eg.Wait(); err != nil { return nil, err } + + // TODO: separate these out, and return multiple cache exporter responses + // to the client for _, resp := range resps { for k, v := range resp { if cacheExporterResponse == nil { @@ -648,42 +655,69 @@ func runCacheExporters(ctx context.Context, exporters []RemoteCacheExporter, j * return cacheExporterResponse, nil } -func runInlineCacheExporter(ctx context.Context, e exporter.ExporterInstance, inlineExporter *RemoteCacheExporter, j *solver.Job, cached *result.Result[solver.CachedResult]) (map[string][]byte, error) { - meta := map[string][]byte{} +func runInlineCacheExporter(ctx context.Context, e exporter.ExporterInstance, inlineExporter inlineCacheExporter, j *solver.Job, cached *result.Result[solver.CachedResult]) (*result.Result[*exptypes.InlineCacheEntry], error) { if inlineExporter == nil { return nil, nil } - if err := inBuilderContext(ctx, j, "preparing layers for inline cache", j.SessionID+"-cache-inline", func(ctx context.Context, _ session.Group) error { - if res := cached.Ref; res != nil { - dtic, err := inlineCache(ctx, inlineExporter.Exporter, res, e.Config().Compression(), session.NewGroup(j.SessionID)) - if err != nil { - return err - } - if dtic != nil { - meta[exptypes.ExporterInlineCache] = dtic - } + + done := progress.OneOff(ctx, "preparing layers for inline cache") + res, err := result.ConvertResult(cached, func(res solver.CachedResult) (*exptypes.InlineCacheEntry, error) { + dtic, err := inlineCache(ctx, inlineExporter, res, e.Config().Compression(), session.NewGroup(j.SessionID)) + if err != nil { + return nil, err } - for k, res := range cached.Refs { - dtic, err := inlineCache(ctx, inlineExporter.Exporter, res, e.Config().Compression(), session.NewGroup(j.SessionID)) - if err != nil { - return err - } - if dtic != nil { - meta[fmt.Sprintf("%s/%s", exptypes.ExporterInlineCache, k)] = dtic + if dtic == nil { + return nil, nil + } + return &exptypes.InlineCacheEntry{Data: dtic}, nil + }) + return res, done(err) +} + +func (s *Solver) runExporters(ctx context.Context, exporters []exporter.ExporterInstance, inlineCacheExporter inlineCacheExporter, job *solver.Job, cached *result.Result[solver.CachedResult], inp *result.Result[cache.ImmutableRef]) (exporterResponse map[string]string, descrefs []exporter.DescriptorReference, err error) { + eg, ctx := errgroup.WithContext(ctx) + resps := make([]map[string]string, len(exporters)) + descs := make([]exporter.DescriptorReference, len(exporters)) + for i, exp := range exporters { + i, exp := i, exp + eg.Go(func() error { + id := fmt.Sprint(job.SessionID, "-export-", i) + return inBuilderContext(ctx, job, exp.Name(), id, func(ctx context.Context, _ session.Group) error { + inlineCache := exptypes.InlineCache(func(ctx context.Context) (*result.Result[*exptypes.InlineCacheEntry], error) { + return runInlineCacheExporter(ctx, exp, inlineCacheExporter, job, cached) + }) + + resps[i], descs[i], err = exp.Export(ctx, inp, inlineCache, job.SessionID) + if err != nil { + return err + } + return nil + }) + }) + } + if err := eg.Wait(); err != nil { + return nil, nil, err + } + + // TODO: separate these out, and return multiple exporter responses to the + // client + for _, resp := range resps { + for k, v := range resp { + if exporterResponse == nil { + exporterResponse = make(map[string]string) } + exporterResponse[k] = v } - return nil - }); err != nil { - return nil, err } - return meta, nil + + return exporterResponse, descs, nil } -func splitCacheExporters(exporters []RemoteCacheExporter) (rest []RemoteCacheExporter, inline *RemoteCacheExporter) { +func splitCacheExporters(exporters []RemoteCacheExporter) (rest []RemoteCacheExporter, inline inlineCacheExporter) { rest = make([]RemoteCacheExporter, 0, len(exporters)) - for i, exp := range exporters { - if _, ok := asInlineCache(exp.Exporter); ok { - inline = &exporters[i] + for _, exp := range exporters { + if ic, ok := asInlineCache(exp.Exporter); ok { + inline = ic continue } rest = append(rest, exp) @@ -821,6 +855,7 @@ func getProvenance(ref solver.ResultProxy, br *provenanceBridge, id string, reqs } type inlineCacheExporter interface { + solver.CacheExporterTarget ExportForLayers(context.Context, []digest.Digest) ([]byte, error) } @@ -829,11 +864,7 @@ func asInlineCache(e remotecache.Exporter) (inlineCacheExporter, bool) { return ie, ok } -func inlineCache(ctx context.Context, e remotecache.Exporter, res solver.CachedResult, compressionopt compression.Config, g session.Group) ([]byte, error) { - ie, ok := asInlineCache(e) - if !ok { - return nil, nil - } +func inlineCache(ctx context.Context, ie inlineCacheExporter, res solver.CachedResult, compressionopt compression.Config, g session.Group) ([]byte, error) { workerRef, ok := res.Sys().(*worker.WorkerRef) if !ok { return nil, errors.Errorf("invalid reference: %T", res.Sys()) @@ -852,7 +883,7 @@ func inlineCache(ctx context.Context, e remotecache.Exporter, res solver.CachedR ctx = withDescHandlerCacheOpts(ctx, workerRef.ImmutableRef) refCfg := cacheconfig.RefConfig{Compression: compressionopt} - if _, err := res.CacheKeys()[0].Exporter.ExportTo(ctx, e, solver.CacheExportOpt{ + if _, err := res.CacheKeys()[0].Exporter.ExportTo(ctx, ie, solver.CacheExportOpt{ ResolveRemotes: workerRefResolver(refCfg, true, g), // load as many compression blobs as possible Mode: solver.CacheExportModeMin, Session: g, diff --git a/solver/pb/caps.go b/solver/pb/caps.go index 5e1963ff8faa..5b99ab17d1b6 100644 --- a/solver/pb/caps.go +++ b/solver/pb/caps.go @@ -85,6 +85,8 @@ const ( // CapSourceDateEpoch is the capability to automatically handle the date epoch CapSourceDateEpoch apicaps.CapID = "exporter.sourcedateepoch" + CapMultipleExporters apicaps.CapID = "exporter.multiple" + CapSourcePolicy apicaps.CapID = "source.policy" ) @@ -454,6 +456,12 @@ func init() { Status: apicaps.CapStatusExperimental, }) + Caps.Init(apicaps.Cap{ + ID: CapMultipleExporters, + Enabled: true, + Status: apicaps.CapStatusExperimental, + }) + Caps.Init(apicaps.Cap{ ID: CapSourcePolicy, Enabled: true, diff --git a/solver/result/result.go b/solver/result/result.go index cfcfe9dcbd3e..644ec5d0fd53 100644 --- a/solver/result/result.go +++ b/solver/result/result.go @@ -1,6 +1,7 @@ package result import ( + "maps" "sync" "github.com/pkg/errors" @@ -14,6 +15,15 @@ type Result[T comparable] struct { Attestations map[string][]Attestation[T] } +func (r *Result[T]) Clone() *Result[T] { + return &Result[T]{ + Ref: r.Ref, + Refs: maps.Clone(r.Refs), + Metadata: maps.Clone(r.Metadata), + Attestations: maps.Clone(r.Attestations), + } +} + func (r *Result[T]) AddMeta(k string, v []byte) { r.mu.Lock() if r.Metadata == nil {