diff --git a/api/services/control/control.pb.go b/api/services/control/control.pb.go index 98208cf7a7d9..31c3adec6857 100644 --- a/api/services/control/control.pb.go +++ b/api/services/control/control.pb.go @@ -11,6 +11,7 @@ import ( github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "github.com/golang/protobuf/ptypes/timestamp" types "github.com/moby/buildkit/api/types" + pb1 "github.com/moby/buildkit/frontend/gateway/pb" pb "github.com/moby/buildkit/solver/pb" github_com_moby_buildkit_util_entitlements "github.com/moby/buildkit/util/entitlements" github_com_opencontainers_go_digest "github.com/opencontainers/go-digest" @@ -35,6 +36,92 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type DebugCloseRequest struct { + Ref string `protobuf:"bytes,1,opt,name=Ref,proto3" json:"Ref,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DebugCloseRequest) Reset() { *m = DebugCloseRequest{} } +func (m *DebugCloseRequest) String() string { return proto.CompactTextString(m) } +func (*DebugCloseRequest) ProtoMessage() {} +func (*DebugCloseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0c5120591600887d, []int{0} +} +func (m *DebugCloseRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DebugCloseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DebugCloseRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DebugCloseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DebugCloseRequest.Merge(m, src) +} +func (m *DebugCloseRequest) XXX_Size() int { + return m.Size() +} +func (m *DebugCloseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DebugCloseRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DebugCloseRequest proto.InternalMessageInfo + +func (m *DebugCloseRequest) GetRef() string { + if m != nil { + return m.Ref + } + return "" +} + +type DebugCloseResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DebugCloseResponse) Reset() { *m = DebugCloseResponse{} } +func (m *DebugCloseResponse) String() string { return proto.CompactTextString(m) } +func (*DebugCloseResponse) ProtoMessage() {} +func (*DebugCloseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0c5120591600887d, []int{1} +} +func (m *DebugCloseResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DebugCloseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DebugCloseResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DebugCloseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DebugCloseResponse.Merge(m, src) +} +func (m *DebugCloseResponse) XXX_Size() int { + return m.Size() +} +func (m *DebugCloseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DebugCloseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DebugCloseResponse proto.InternalMessageInfo + type PruneRequest struct { Filter []string `protobuf:"bytes,1,rep,name=filter,proto3" json:"filter,omitempty"` All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"` @@ -49,7 +136,7 @@ func (m *PruneRequest) Reset() { *m = PruneRequest{} } func (m *PruneRequest) String() string { return proto.CompactTextString(m) } func (*PruneRequest) ProtoMessage() {} func (*PruneRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{0} + return fileDescriptor_0c5120591600887d, []int{2} } func (m *PruneRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -117,7 +204,7 @@ func (m *DiskUsageRequest) Reset() { *m = DiskUsageRequest{} } func (m *DiskUsageRequest) String() string { return proto.CompactTextString(m) } func (*DiskUsageRequest) ProtoMessage() {} func (*DiskUsageRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{1} + return fileDescriptor_0c5120591600887d, []int{3} } func (m *DiskUsageRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +251,7 @@ func (m *DiskUsageResponse) Reset() { *m = DiskUsageResponse{} } func (m *DiskUsageResponse) String() string { return proto.CompactTextString(m) } func (*DiskUsageResponse) ProtoMessage() {} func (*DiskUsageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{2} + return fileDescriptor_0c5120591600887d, []int{4} } func (m *DiskUsageResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -222,7 +309,7 @@ func (m *UsageRecord) Reset() { *m = UsageRecord{} } func (m *UsageRecord) String() string { return proto.CompactTextString(m) } func (*UsageRecord) ProtoMessage() {} func (*UsageRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{3} + return fileDescriptor_0c5120591600887d, []int{5} } func (m *UsageRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -347,6 +434,7 @@ type SolveRequest struct { 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"` + Debug bool `protobuf:"varint,11,opt,name=Debug,proto3" json:"Debug,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -356,7 +444,7 @@ func (m *SolveRequest) Reset() { *m = SolveRequest{} } func (m *SolveRequest) String() string { return proto.CompactTextString(m) } func (*SolveRequest) ProtoMessage() {} func (*SolveRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{4} + return fileDescriptor_0c5120591600887d, []int{6} } func (m *SolveRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -448,6 +536,13 @@ func (m *SolveRequest) GetFrontendInputs() map[string]*pb.Definition { return nil } +func (m *SolveRequest) GetDebug() bool { + if m != nil { + return m.Debug + } + return false +} + type CacheOptions struct { // ExportRefDeprecated is deprecated in favor or the new Exports since BuildKit v0.4.0. // When ExportRefDeprecated is set, the solver appends @@ -475,7 +570,7 @@ func (m *CacheOptions) Reset() { *m = CacheOptions{} } func (m *CacheOptions) String() string { return proto.CompactTextString(m) } func (*CacheOptions) ProtoMessage() {} func (*CacheOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{5} + return fileDescriptor_0c5120591600887d, []int{7} } func (m *CacheOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -554,7 +649,7 @@ func (m *CacheOptionsEntry) Reset() { *m = CacheOptionsEntry{} } func (m *CacheOptionsEntry) String() string { return proto.CompactTextString(m) } func (*CacheOptionsEntry) ProtoMessage() {} func (*CacheOptionsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{6} + return fileDescriptor_0c5120591600887d, []int{8} } func (m *CacheOptionsEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -608,7 +703,7 @@ func (m *SolveResponse) Reset() { *m = SolveResponse{} } func (m *SolveResponse) String() string { return proto.CompactTextString(m) } func (*SolveResponse) ProtoMessage() {} func (*SolveResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{7} + return fileDescriptor_0c5120591600887d, []int{9} } func (m *SolveResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -655,7 +750,7 @@ func (m *StatusRequest) Reset() { *m = StatusRequest{} } func (m *StatusRequest) String() string { return proto.CompactTextString(m) } func (*StatusRequest) ProtoMessage() {} func (*StatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{8} + return fileDescriptor_0c5120591600887d, []int{10} } func (m *StatusRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -705,7 +800,7 @@ func (m *StatusResponse) Reset() { *m = StatusResponse{} } func (m *StatusResponse) String() string { return proto.CompactTextString(m) } func (*StatusResponse) ProtoMessage() {} func (*StatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{9} + return fileDescriptor_0c5120591600887d, []int{11} } func (m *StatusResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -780,7 +875,7 @@ func (m *Vertex) Reset() { *m = Vertex{} } func (m *Vertex) String() string { return proto.CompactTextString(m) } func (*Vertex) ProtoMessage() {} func (*Vertex) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{10} + return fileDescriptor_0c5120591600887d, []int{12} } func (m *Vertex) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -869,7 +964,7 @@ func (m *VertexStatus) Reset() { *m = VertexStatus{} } func (m *VertexStatus) String() string { return proto.CompactTextString(m) } func (*VertexStatus) ProtoMessage() {} func (*VertexStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{11} + return fileDescriptor_0c5120591600887d, []int{13} } func (m *VertexStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -961,7 +1056,7 @@ func (m *VertexLog) Reset() { *m = VertexLog{} } func (m *VertexLog) String() string { return proto.CompactTextString(m) } func (*VertexLog) ProtoMessage() {} func (*VertexLog) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{12} + return fileDescriptor_0c5120591600887d, []int{14} } func (m *VertexLog) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1028,7 +1123,7 @@ func (m *VertexWarning) Reset() { *m = VertexWarning{} } func (m *VertexWarning) String() string { return proto.CompactTextString(m) } func (*VertexWarning) ProtoMessage() {} func (*VertexWarning) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{13} + return fileDescriptor_0c5120591600887d, []int{15} } func (m *VertexWarning) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1110,7 +1205,7 @@ func (m *BytesMessage) Reset() { *m = BytesMessage{} } func (m *BytesMessage) String() string { return proto.CompactTextString(m) } func (*BytesMessage) ProtoMessage() {} func (*BytesMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{14} + return fileDescriptor_0c5120591600887d, []int{16} } func (m *BytesMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1157,7 +1252,7 @@ func (m *ListWorkersRequest) Reset() { *m = ListWorkersRequest{} } func (m *ListWorkersRequest) String() string { return proto.CompactTextString(m) } func (*ListWorkersRequest) ProtoMessage() {} func (*ListWorkersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{15} + return fileDescriptor_0c5120591600887d, []int{17} } func (m *ListWorkersRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1204,7 +1299,7 @@ func (m *ListWorkersResponse) Reset() { *m = ListWorkersResponse{} } func (m *ListWorkersResponse) String() string { return proto.CompactTextString(m) } func (*ListWorkersResponse) ProtoMessage() {} func (*ListWorkersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{16} + return fileDescriptor_0c5120591600887d, []int{18} } func (m *ListWorkersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1250,7 +1345,7 @@ func (m *InfoRequest) Reset() { *m = InfoRequest{} } func (m *InfoRequest) String() string { return proto.CompactTextString(m) } func (*InfoRequest) ProtoMessage() {} func (*InfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{17} + return fileDescriptor_0c5120591600887d, []int{19} } func (m *InfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1290,7 +1385,7 @@ func (m *InfoResponse) Reset() { *m = InfoResponse{} } func (m *InfoResponse) String() string { return proto.CompactTextString(m) } func (*InfoResponse) ProtoMessage() {} func (*InfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0c5120591600887d, []int{18} + return fileDescriptor_0c5120591600887d, []int{20} } func (m *InfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1327,6 +1422,8 @@ func (m *InfoResponse) GetBuildkitVersion() *types.BuildkitVersion { } func init() { + proto.RegisterType((*DebugCloseRequest)(nil), "moby.buildkit.v1.DebugCloseRequest") + proto.RegisterType((*DebugCloseResponse)(nil), "moby.buildkit.v1.DebugCloseResponse") proto.RegisterType((*PruneRequest)(nil), "moby.buildkit.v1.PruneRequest") proto.RegisterType((*DiskUsageRequest)(nil), "moby.buildkit.v1.DiskUsageRequest") proto.RegisterType((*DiskUsageResponse)(nil), "moby.buildkit.v1.DiskUsageResponse") @@ -1357,107 +1454,113 @@ func init() { func init() { proto.RegisterFile("control.proto", fileDescriptor_0c5120591600887d) } var fileDescriptor_0c5120591600887d = []byte{ - // 1597 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcb, 0x6e, 0x1c, 0x45, - 0x17, 0x4e, 0xcf, 0x7d, 0xce, 0x8c, 0xfd, 0x3b, 0x95, 0xfc, 0x51, 0xab, 0x7f, 0xfd, 0xb6, 0xd3, - 0x09, 0xc2, 0x8a, 0x92, 0x1e, 0xc7, 0x10, 0x08, 0xe6, 0xa2, 0x64, 0x3c, 0x86, 0x38, 0x8a, 0x45, - 0x52, 0xce, 0x45, 0xca, 0x02, 0xa9, 0x67, 0xa6, 0x3c, 0x6e, 0xb9, 0xa7, 0xab, 0xa9, 0xaa, 0x76, -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1, 0xac, 0xbc, 0x3a, 0x58, - 0x38, 0xf7, 0xdd, 0xef, 0x32, 0x77, 0x03, 0x33, 0x74, 0x07, 0xe0, 0x81, 0xcf, 0xc5, 0x13, 0xae, - 0x40, 0xca, 0xc7, 0x82, 0x14, 0x14, 0x40, 0xc6, 0x06, 0xcd, 0x03, 0xa8, 0x24, 0xac, 0xd1, 0x24, - 0x12, 0x76, 0x45, 0xf9, 0x9e, 0x99, 0x41, 0x8b, 0x50, 0x6b, 0x11, 0xde, 0x61, 0x41, 0xac, 0x4a, - 0x5d, 0x55, 0xe9, 0xc9, 0x4e, 0x49, 0x04, 0x9d, 0xc1, 0xc7, 0xfb, 0x31, 0xb1, 0x41, 0x29, 0x64, - 0x66, 0x64, 0x2d, 0xb7, 0x76, 0x7c, 0x46, 0xba, 0x76, 0x4d, 0xa5, 0xcb, 0x48, 0x32, 0xbf, 0x3a, - 0x13, 0xdc, 0xae, 0xab, 0x22, 0xa7, 0xa2, 0xfb, 0x43, 0x09, 0xea, 0x5b, 0x92, 0xe3, 0x29, 0x1d, - 0xe6, 0x20, 0x8f, 0xc9, 0xb6, 0xa9, 0x8d, 0x1c, 0x22, 0x0f, 0xa0, 0x45, 0xb6, 0x83, 0x28, 0x50, - 0x5e, 0xe5, 0x54, 0xe0, 0xb3, 0x5e, 0xdc, 0xf6, 0x0e, 0x67, 0x71, 0x46, 0x03, 0x39, 0x50, 0x59, - 0x7f, 0x19, 0x53, 0x26, 0x29, 0x95, 0x57, 0x30, 0x03, 0x19, 0x3d, 0x83, 0x99, 0x74, 0x7c, 0x57, - 0x08, 0x26, 0x89, 0x2a, 0x69, 0x74, 0x73, 0x9c, 0x46, 0x59, 0xa7, 0xbc, 0x21, 0x9b, 0xf5, 0x48, - 0xb0, 0x7d, 0x3c, 0x8c, 0x23, 0x23, 0xdc, 0x22, 0x9c, 0x4b, 0x0f, 0x55, 0xf9, 0x71, 0x2a, 0x4a, - 0x77, 0x3e, 0x67, 0x34, 0x12, 0x24,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eb, 0x4b, 0xd6, 0xb2, 0x85, 0x9e, 0x43, 0x2d, - 0x43, 0x2d, 0x34, 0x81, 0x42, 0xe3, 0x3c, 0x75, 0xde, 0x39, 0x46, 0xcb, 0x44, 0xbe, 0x0e, 0x05, - 0x49, 0x29, 0x34, 0x21, 0xd9, 0x19, 0xe6, 0x4d, 0x72, 0x33, 0xcb, 0xc4, 0x66, 0xfd, 0xd5, 0x9b, - 0x79, 0xeb, 0xb7, 0x37, 0xf3, 0xd6, 0x1f, 0x6f, 0xe6, 0xad, 0x76, 0x49, 0x9d, 0x55, 0xef, 0xfd, - 0x13, 0x00, 0x00, 0xff, 0xff, 0x96, 0x5c, 0xf7, 0x1b, 0xef, 0x12, 0x00, 0x00, + // 1689 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4b, 0x6f, 0x1c, 0x4b, + 0x15, 0xbe, 0x3d, 0xe3, 0x79, 0x9d, 0x19, 0x1b, 0xbb, 0x62, 0xae, 0x5a, 0x8d, 0xb0, 0x7d, 0xfb, + 0xe6, 0x82, 0x15, 0x25, 0x3d, 0x8e, 0x21, 0x10, 0xcc, 0x43, 0xc9, 0x78, 0x0c, 0x71, 0x14, 0x0b, + 0xa7, 0x9c, 0xc4, 0x52, 0x16, 0x48, 0x3d, 0x33, 0x35, 0xed, 0x96, 0x7b, 0xba, 0x9a, 0xaa, 0x6a, + 0x27, 0xc3, 0x0f, 0x60, 0xcd, 0x8e, 0x9f, 0xc0, 0x8a, 0x35, 0xe2, 0x07, 0x20, 0x65, 0xc9, 0x3a, + 0x0b, 0x83, 0xf2, 0x03, 0x10, 0x1b, 0x24, 0x96, 0xa8, 0x1e, 0x3d, 0xee, 0x79, 0xf9, 0x15, 0x56, + 0x53, 0xa7, 0xfa, 0x7c, 0x5f, 0x9f, 0x57, 0x9d, 0x3e, 0x35, 0xb0, 0xd8, 0xa5, 0xb1, 0x60,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 0x9e, 0x6f, 0x5a, 0x5b, 0x16, 0x7a, 0x0b, 0xf5, 0x5c, 0x69, 0xa1, 0x19, 0x25, 0x34, + 0x5d, 0xa7, 0xce, 0x37, 0x57, 0x68, 0x19, 0xcf, 0xf7, 0x60, 0x41, 0x96, 0x14, 0x9a, 0x11, 0xec, + 0x5c, 0xe5, 0xcd, 0x32, 0x73, 0xac, 0x12, 0xfb, 0xb0, 0xac, 0xee, 0x49, 0x7b, 0xef, 0x49, 0xf7, + 0x90, 0xd1, 0x2e, 0xe1, 0x1c, 0x7d, 0x6f, 0x1a, 0x93, 0xfd, 0x49, 0xe5, 0x49, 0xbd, 0x2c, 0x04, + 0xd7, 0xd4, 0x53, 0xa1, 0x38, 0x96, 0x17, 0xf9, 0xec, 0xcf, 0x29, 0x34, 0xab, 0xde, 0x26, 0xff, + 0xe1, 0x72, 0xee, 0x5e, 0xae, 0xa4, 0x1d, 0x68, 0x35, 0x3e, 0x7c, 0x5a, 0xb3, 0xfe, 0xfe, 0x69, + 0xcd, 0xfa, 0xe7, 0xa7, 0x35, 0xab, 0x53, 0x56, 0xcd, 0xf6, 0x07, 0xff, 0x0b, 0x00, 0x00, 0xff, + 0xff, 0x78, 0xa6, 0xe2, 0xba, 0x3f, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1479,6 +1582,8 @@ type ControlClient interface { Session(ctx context.Context, opts ...grpc.CallOption) (Control_SessionClient, error) ListWorkers(ctx context.Context, in *ListWorkersRequest, opts ...grpc.CallOption) (*ListWorkersResponse, error) Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) + DebugExecProcess(ctx context.Context, opts ...grpc.CallOption) (Control_DebugExecProcessClient, error) + DebugClose(ctx context.Context, in *DebugCloseRequest, opts ...grpc.CallOption) (*DebugCloseResponse, error) } type controlClient struct { @@ -1620,6 +1725,46 @@ func (c *controlClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc. return out, nil } +func (c *controlClient) DebugExecProcess(ctx context.Context, opts ...grpc.CallOption) (Control_DebugExecProcessClient, error) { + stream, err := c.cc.NewStream(ctx, &_Control_serviceDesc.Streams[3], "/moby.buildkit.v1.Control/DebugExecProcess", opts...) + if err != nil { + return nil, err + } + x := &controlDebugExecProcessClient{stream} + return x, nil +} + +type Control_DebugExecProcessClient interface { + Send(*pb1.ExecMessage) error + Recv() (*pb1.ExecMessage, error) + grpc.ClientStream +} + +type controlDebugExecProcessClient struct { + grpc.ClientStream +} + +func (x *controlDebugExecProcessClient) Send(m *pb1.ExecMessage) error { + return x.ClientStream.SendMsg(m) +} + +func (x *controlDebugExecProcessClient) Recv() (*pb1.ExecMessage, error) { + m := new(pb1.ExecMessage) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *controlClient) DebugClose(ctx context.Context, in *DebugCloseRequest, opts ...grpc.CallOption) (*DebugCloseResponse, error) { + out := new(DebugCloseResponse) + err := c.cc.Invoke(ctx, "/moby.buildkit.v1.Control/DebugClose", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ControlServer is the server API for Control service. type ControlServer interface { DiskUsage(context.Context, *DiskUsageRequest) (*DiskUsageResponse, error) @@ -1629,6 +1774,8 @@ type ControlServer interface { Session(Control_SessionServer) error ListWorkers(context.Context, *ListWorkersRequest) (*ListWorkersResponse, error) Info(context.Context, *InfoRequest) (*InfoResponse, error) + DebugExecProcess(Control_DebugExecProcessServer) error + DebugClose(context.Context, *DebugCloseRequest) (*DebugCloseResponse, error) } // UnimplementedControlServer can be embedded to have forward compatible implementations. @@ -1656,6 +1803,12 @@ func (*UnimplementedControlServer) ListWorkers(ctx context.Context, req *ListWor func (*UnimplementedControlServer) Info(ctx context.Context, req *InfoRequest) (*InfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") } +func (*UnimplementedControlServer) DebugExecProcess(srv Control_DebugExecProcessServer) error { + return status.Errorf(codes.Unimplemented, "method DebugExecProcess not implemented") +} +func (*UnimplementedControlServer) DebugClose(ctx context.Context, req *DebugCloseRequest) (*DebugCloseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DebugClose not implemented") +} func RegisterControlServer(s *grpc.Server, srv ControlServer) { s.RegisterService(&_Control_serviceDesc, srv) @@ -1801,6 +1954,50 @@ func _Control_Info_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Control_DebugExecProcess_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ControlServer).DebugExecProcess(&controlDebugExecProcessServer{stream}) +} + +type Control_DebugExecProcessServer interface { + Send(*pb1.ExecMessage) error + Recv() (*pb1.ExecMessage, error) + grpc.ServerStream +} + +type controlDebugExecProcessServer struct { + grpc.ServerStream +} + +func (x *controlDebugExecProcessServer) Send(m *pb1.ExecMessage) error { + return x.ServerStream.SendMsg(m) +} + +func (x *controlDebugExecProcessServer) Recv() (*pb1.ExecMessage, error) { + m := new(pb1.ExecMessage) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Control_DebugClose_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DebugCloseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).DebugClose(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.buildkit.v1.Control/DebugClose", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).DebugClose(ctx, req.(*DebugCloseRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Control_serviceDesc = grpc.ServiceDesc{ ServiceName: "moby.buildkit.v1.Control", HandlerType: (*ControlServer)(nil), @@ -1821,6 +2018,10 @@ var _Control_serviceDesc = grpc.ServiceDesc{ MethodName: "Info", Handler: _Control_Info_Handler, }, + { + MethodName: "DebugClose", + Handler: _Control_DebugClose_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -1839,10 +2040,77 @@ var _Control_serviceDesc = grpc.ServiceDesc{ ServerStreams: true, ClientStreams: true, }, + { + StreamName: "DebugExecProcess", + Handler: _Control_DebugExecProcess_Handler, + ServerStreams: true, + ClientStreams: true, + }, }, Metadata: "control.proto", } +func (m *DebugCloseRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DebugCloseRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DebugCloseRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Ref) > 0 { + i -= len(m.Ref) + copy(dAtA[i:], m.Ref) + i = encodeVarintControl(dAtA, i, uint64(len(m.Ref))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DebugCloseResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DebugCloseResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DebugCloseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil +} + func (m *PruneRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2122,6 +2390,16 @@ func (m *SolveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.Debug { + i-- + if m.Debug { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } if len(m.FrontendInputs) > 0 { for k := range m.FrontendInputs { v := m.FrontendInputs[k] @@ -3069,6 +3347,34 @@ func encodeVarintControl(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *DebugCloseRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Ref) + if l > 0 { + n += 1 + l + sovControl(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DebugCloseResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *PruneRequest) Size() (n int) { if m == nil { return 0 @@ -3250,6 +3556,9 @@ func (m *SolveRequest) Size() (n int) { n += mapEntrySize + 1 + sovControl(uint64(mapEntrySize)) } } + if m.Debug { + n += 2 + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -3633,6 +3942,140 @@ func sovControl(x uint64) (n int) { func sozControl(x uint64) (n int) { return sovControl(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *DebugCloseRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowControl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DebugCloseRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DebugCloseRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowControl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthControl + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthControl + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ref = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipControl(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthControl + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DebugCloseResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowControl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DebugCloseResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DebugCloseResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipControl(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthControl + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *PruneRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4961,6 +5404,26 @@ func (m *SolveRequest) Unmarshal(dAtA []byte) error { } m.FrontendInputs[mapkey] = mapvalue iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Debug", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowControl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Debug = bool(v != 0) default: iNdEx = preIndex skippy, err := skipControl(dAtA[iNdEx:]) diff --git a/api/services/control/control.proto b/api/services/control/control.proto index 6f5c976bce51..11353bd65d6e 100644 --- a/api/services/control/control.proto +++ b/api/services/control/control.proto @@ -6,6 +6,7 @@ import "github.com/gogo/protobuf/gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; import "github.com/moby/buildkit/solver/pb/ops.proto"; import "github.com/moby/buildkit/api/types/worker.proto"; +import "github.com/moby/buildkit/frontend/gateway/pb/gateway.proto"; option (gogoproto.sizer_all) = true; option (gogoproto.marshaler_all) = true; @@ -19,8 +20,17 @@ service Control { rpc Session(stream BytesMessage) returns (stream BytesMessage); rpc ListWorkers(ListWorkersRequest) returns (ListWorkersResponse); rpc Info(InfoRequest) returns (InfoResponse); + + rpc DebugExecProcess(stream moby.buildkit.v1.frontend.ExecMessage) returns (stream moby.buildkit.v1.frontend.ExecMessage); + rpc DebugClose(DebugCloseRequest) returns (DebugCloseResponse); } +message DebugCloseRequest { + string Ref = 1; +} + +message DebugCloseResponse {} + message PruneRequest { repeated string filter = 1; bool all = 2; @@ -62,6 +72,7 @@ message SolveRequest { CacheOptions Cache = 8 [(gogoproto.nullable) = false]; repeated string Entitlements = 9 [(gogoproto.customtype) = "github.com/moby/buildkit/util/entitlements.Entitlement" ]; map FrontendInputs = 10; + bool Debug = 11; } message CacheOptions { diff --git a/client/client.go b/client/client.go index da0bc0e018ab..8577220e6d56 100644 --- a/client/client.go +++ b/client/client.go @@ -27,11 +27,15 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials/insecure" + + "github.com/moby/buildkit/frontend/gateway/grpcclient" + gatewaypb "github.com/moby/buildkit/frontend/gateway/pb" ) type Client struct { conn *grpc.ClientConn sessionDialer func(ctx context.Context, proto string, meta map[string][]string) (net.Conn, error) + execMsgs *grpcclient.MessageForwarder } type ClientOpt interface{} @@ -150,6 +154,9 @@ func New(ctx context.Context, address string, opts ...ClientOpt) (*Client, error c := &Client{ conn: conn, sessionDialer: sessionDialer, + execMsgs: grpcclient.NewMessageForwarder(context.TODO(), func(ctx context.Context) (gatewaypb.LLBBridge_ExecProcessClient, error) { + return controlapi.NewControlClient(conn).DebugExecProcess(ctx) + }), } if tracerDelegate != nil { diff --git a/client/solve.go b/client/solve.go index f14d9c410d79..8756f97a56bc 100644 --- a/client/solve.go +++ b/client/solve.go @@ -3,6 +3,7 @@ package client import ( "context" "encoding/json" + "fmt" "io" "os" "path/filepath" @@ -27,6 +28,9 @@ import ( fstypes "github.com/tonistiigi/fsutil/types" "go.opentelemetry.io/otel/trace" "golang.org/x/sync/errgroup" + + gatewayclient "github.com/moby/buildkit/frontend/gateway/client" + "github.com/moby/buildkit/frontend/gateway/grpcclient" ) type SolveOpt struct { @@ -42,6 +46,7 @@ type SolveOpt struct { AllowedEntitlements []entitlements.Entitlement SharedSession *session.Session // TODO: refactor to better session syncing SessionPreInitialized bool // TODO: refactor to better session syncing + Debug bool } type ExportEntry struct { @@ -89,6 +94,9 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG ref := identity.NewID() eg, ctx := errgroup.WithContext(ctx) + if opt.Debug { + defer bklog.G(ctx).Infof("debug for build %q is enabled", ref) + } statusContext, cancelStatus := context.WithCancel(context.Background()) defer cancelStatus() @@ -216,6 +224,7 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG FrontendInputs: frontendInputs, Cache: cacheOpt.options, Entitlements: opt.AllowedEntitlements, + Debug: opt.Debug, }) if err != nil { return errors.Wrap(err, "failed to solve") @@ -260,6 +269,10 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG if err != nil { if err == io.EOF { return nil + } else if (errors.Is(err, context.Canceled) || errors.Is(statusContext.Err(), context.Canceled)) && opt.Debug { + // We cancel watching status while the job hasn't been discarded for debugging. This situation isn't an error. + bklog.G(ctx).WithError(err).Info("canceled watching status") + return nil } return errors.Wrap(err, "failed to receive status") } @@ -332,6 +345,26 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG return res, nil } +func (c *Client) DebugClose(ctx context.Context, ref string) error { + _, err := c.controlClient().DebugClose(ctx, &controlapi.DebugCloseRequest{ + Ref: ref, + }) + return err +} + +func (c *Client) DebugExecProcess(ctx context.Context, ref, vtx string, req gatewayclient.StartRequest) (gatewayclient.ContainerProcess, error) { + // ensure message forwarder is started, only sets up stream first time called + if err := c.execMsgs.Start(); err != nil { + return nil, fmt.Errorf("failed to start execMsgs: %w", err) + } + if req.Attrs == nil { + req.Attrs = make(map[string]string) + } + req.Attrs["control.ref.debug"] = ref + req.Attrs["control.vtx.debug"] = vtx + return grpcclient.StartProcess(ctx, vtx, req, c.execMsgs) +} + func prepareSyncedDirs(def *llb.Definition, localDirs map[string]string) ([]filesync.SyncedDir, error) { for _, d := range localDirs { fi, err := os.Stat(d) diff --git a/cmd/buildctl/build.go b/cmd/buildctl/build.go index d656d878ff5f..ec07011d69fe 100644 --- a/cmd/buildctl/build.go +++ b/cmd/buildctl/build.go @@ -87,6 +87,10 @@ var buildCommand = cli.Command{ Name: "metadata-file", Usage: "Output build metadata (e.g., image digest) to a file as JSON", }, + cli.BoolFlag{ + Name: "debug-build", + Usage: "Allow debugging the build", + }, }, } @@ -191,6 +195,7 @@ func buildAction(clicontext *cli.Context) error { CacheImports: cacheImports, Session: attachable, AllowedEntitlements: allowed, + Debug: clicontext.Bool("debug-build"), } solveOpt.FrontendAttrs, err = build.ParseOpt(clicontext.StringSlice("opt")) diff --git a/cmd/buildctl/debug.go b/cmd/buildctl/debug.go index 2db7a6cfb6a2..8ee7f91d0677 100644 --- a/cmd/buildctl/debug.go +++ b/cmd/buildctl/debug.go @@ -13,5 +13,7 @@ var debugCommand = cli.Command{ debug.DumpMetadataCommand, debug.WorkersCommand, debug.InfoCommand, + debugShellCommand, + debugCloseCommand, }, } diff --git a/cmd/buildctl/debug_shell.go b/cmd/buildctl/debug_shell.go new file mode 100644 index 000000000000..8e40abddd62f --- /dev/null +++ b/cmd/buildctl/debug_shell.go @@ -0,0 +1,72 @@ +package main + +import ( + "context" + "fmt" + "os" + + "github.com/containerd/console" + "github.com/moby/buildkit/client" + bccommon "github.com/moby/buildkit/cmd/buildctl/common" + gwclient "github.com/moby/buildkit/frontend/gateway/client" + "github.com/urfave/cli" +) + +var debugShellCommand = cli.Command{ + Name: "shell", + Usage: "exec shell in a vertex", + Action: debugShellAction, +} + +var debugCloseCommand = cli.Command{ + Name: "close", + Usage: "close a build job remaining for debugging", + Action: debugCloseAction, +} + +func debugCloseAction(clicontext *cli.Context) error { + ref := clicontext.Args().Get(0) + if ref == "" { + return fmt.Errorf("ref must be specified") + } + c, err := bccommon.ResolveClient(clicontext) + if err != nil { + return err + } + ctx := clicontext.App.Metadata["context"].(context.Context) + return c.DebugClose(ctx, ref) +} + +func debugShellAction(clicontext *cli.Context) error { + ref := clicontext.Args().Get(0) + vtx := clicontext.Args().Get(1) + if ref == "" || vtx == "" { + return fmt.Errorf("ref and vertex must be specified") + } + c, err := bccommon.ResolveClient(clicontext) + if err != nil { + return err + } + ctx := clicontext.App.Metadata["context"].(context.Context) + return execProcess(ctx, c, ref, vtx, gwclient.StartRequest{ + Args: []string{"/bin/sh"}, + Stdin: os.Stdin, + Stdout: os.Stderr, + Stderr: os.Stderr, + Tty: true, + }) +} + +func execProcess(ctx context.Context, c *client.Client, ref, vtx string, req gwclient.StartRequest) error { + con := console.Current() + defer con.Reset() + if err := con.SetRaw(); err != nil { + return err + } + p, err := c.DebugExecProcess(ctx, ref, vtx, req) + if err != nil { + return fmt.Errorf("failed to start process: %w", err) + } + resizeConsole(ctx, p, con) + return p.Wait() +} diff --git a/cmd/buildctl/exec_nolinux.go b/cmd/buildctl/exec_nolinux.go new file mode 100644 index 000000000000..f003599867b8 --- /dev/null +++ b/cmd/buildctl/exec_nolinux.go @@ -0,0 +1,13 @@ +//go:build !linux +// +build !linux + +package main + +import ( + "context" + + "github.com/containerd/console" + gwclient "github.com/moby/buildkit/frontend/gateway/client" +) + +func resizeConsole(ctx context.Context, p gwclient.ContainerProcess, con console.Console) {} diff --git a/cmd/buildctl/exec_unix.go b/cmd/buildctl/exec_unix.go new file mode 100644 index 000000000000..fabbeff83c2d --- /dev/null +++ b/cmd/buildctl/exec_unix.go @@ -0,0 +1,32 @@ +//go:build linux +// +build linux + +package main + +import ( + "context" + "os" + "os/signal" + "syscall" + + "github.com/containerd/console" + gwclient "github.com/moby/buildkit/frontend/gateway/client" +) + +func resizeConsole(ctx context.Context, p gwclient.ContainerProcess, con console.Console) { + ch := make(chan os.Signal, 1) + signal.Notify(ch, syscall.SIGWINCH) + go func() { + for { + select { + case <-ch: + size, err := con.Size() + if err != nil { + continue + } + p.Resize(ctx, gwclient.WinSize{Cols: uint32(size.Width), Rows: uint32(size.Height)}) + } + } + }() + ch <- syscall.SIGWINCH +} diff --git a/control/control.go b/control/control.go index f0dba193949b..a80b177f7efe 100644 --- a/control/control.go +++ b/control/control.go @@ -2,8 +2,10 @@ package control import ( "context" + "fmt" "sync" "sync/atomic" + "syscall" "time" controlapi "github.com/moby/buildkit/api/services/control" @@ -11,6 +13,7 @@ import ( "github.com/moby/buildkit/cache/remotecache" "github.com/moby/buildkit/client" controlgateway "github.com/moby/buildkit/control/gateway" + "github.com/moby/buildkit/executor" "github.com/moby/buildkit/exporter" "github.com/moby/buildkit/frontend" "github.com/moby/buildkit/session" @@ -20,6 +23,7 @@ import ( "github.com/moby/buildkit/solver/pb" "github.com/moby/buildkit/util/bklog" "github.com/moby/buildkit/util/imageutil" + "github.com/moby/buildkit/util/stack" "github.com/moby/buildkit/util/throttle" "github.com/moby/buildkit/util/tracing/transform" "github.com/moby/buildkit/version" @@ -31,6 +35,9 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + + frontendgateway "github.com/moby/buildkit/frontend/gateway" + gatewayclient "github.com/moby/buildkit/frontend/gateway/client" ) type Opt struct { @@ -54,6 +61,9 @@ type Controller struct { // TODO: ControlService throttledGC func() gcmu sync.Mutex *tracev1.UnimplementedTraceServiceServer + + debugJobs map[string]*solver.Job + debugJobsMu sync.Mutex } func NewController(opt Opt) (*Controller, error) { @@ -243,6 +253,23 @@ func translateLegacySolveRequest(req *controlapi.SolveRequest) error { } func (c *Controller) Solve(ctx context.Context, req *controlapi.SolveRequest) (*controlapi.SolveResponse, error) { + var j *solver.Job + if req.Debug { + var err error + j, err = c.solver.NewJob(req.Ref, true) + if err != nil { + return nil, err + } + defer func() { + c.debugJobsMu.Lock() + if c.debugJobs == nil { + c.debugJobs = make(map[string]*solver.Job) + } + c.debugJobs[req.Ref] = j + c.debugJobsMu.Unlock() + }() + } + atomic.AddInt64(&c.buildCount, 1) defer atomic.AddInt64(&c.buildCount, -1) @@ -307,17 +334,24 @@ func (c *Controller) Solve(ctx context.Context, req *controlapi.SolveRequest) (* }) } - resp, err := c.solver.Solve(ctx, req.Ref, req.Session, frontend.SolveRequest{ + solveReq := frontend.SolveRequest{ Frontend: req.Frontend, Definition: req.Definition, FrontendOpt: req.FrontendAttrs, FrontendInputs: req.FrontendInputs, CacheImports: cacheImports, - }, llbsolver.ExporterRequest{ + } + expReq := llbsolver.ExporterRequest{ Exporter: expi, CacheExporter: cacheExporter, CacheExportMode: cacheExportMode, - }, req.Entitlements) + } + var resp *client.SolveResponse + if j != nil { + resp, err = c.solver.SolveWithJob(ctx, j, req.Session, solveReq, expReq, req.Entitlements) + } else { + resp, err = c.solver.Solve(ctx, req.Ref, req.Session, solveReq, expReq, req.Entitlements) + } if err != nil { return nil, err } @@ -527,3 +561,75 @@ func toPBBuildkitVersion(in client.BuildkitVersion) *apitypes.BuildkitVersion { Revision: in.Revision, } } + +func (c *Controller) DebugClose(ctx context.Context, req *controlapi.DebugCloseRequest) (*controlapi.DebugCloseResponse, error) { + c.debugJobsMu.Lock() + j, ok := c.debugJobs[req.Ref] + if ok { + delete(c.debugJobs, req.Ref) + } + c.debugJobsMu.Unlock() + if !ok { + return nil, fmt.Errorf("job %q isn't registered or not completed", req.Ref) + } + return &controlapi.DebugCloseResponse{}, j.Discard() +} + +func (c *Controller) DebugExecProcess(srv controlapi.Control_DebugExecProcessServer) error { + return frontendgateway.ExecProcess(srv, func(ctx context.Context, req *frontendgateway.InitProcessRequest) (*frontendgateway.InitProcessResponse, error) { + init := req.Init + ref, ok := init.Attrs["control.ref.debug"] + if !ok { + return nil, fmt.Errorf("job ref must be passed") + } + vtx, ok := init.Attrs["control.vtx.debug"] + if !ok { + return nil, fmt.Errorf("target vtx must be passed") + } + + c.debugJobsMu.Lock() + j, ok := c.debugJobs[ref] + c.debugJobsMu.Unlock() + if !ok { + return nil, fmt.Errorf("job %q isn't registered or not completed", ref) + } + handler, err := j.GetDebugHandler(ctx, vtx) + if err != nil { + return nil, stack.Enable(err) + } else if handler == nil { + return nil, stack.Enable(fmt.Errorf("Op %q doesn't implement debug handler", vtx)) + } + + var res frontendgateway.InitProcessResponse + procG, procGCtx := errgroup.WithContext(srv.Context()) + procG.Go(func() error { + handler.Exec(procGCtx, func(meta executor.Meta) executor.ProcessInfo { + resize := make(chan executor.WinSize) + signal := make(chan syscall.Signal) + procInfo := executor.ProcessInfo{ + Meta: meta, + Stdin: req.Stdin, + Stdout: req.Stdout, + Stderr: req.Stderr, + Resize: resize, + Signal: signal, + } + procInfo.Meta.Args = init.Meta.Args + procInfo.Meta.Tty = init.Tty + // TODO: allow overwrite other fields as well + res.ResizeCallback = func(ctx context.Context, size gatewayclient.WinSize) error { + resize <- executor.WinSize{Cols: size.Cols, Rows: size.Rows} + return nil + } + res.SignalCallback = func(ctx context.Context, sig syscall.Signal) error { + signal <- sig + return nil + } + return procInfo + }) + return stack.Enable(err) + }) + res.WaitForExit = procG.Wait + return &res, nil + }) +} diff --git a/frontend/gateway/client/client.go b/frontend/gateway/client/client.go index 61bc018ff5df..8ed4ff80e83e 100644 --- a/frontend/gateway/client/client.go +++ b/frontend/gateway/client/client.go @@ -64,6 +64,7 @@ type StartRequest struct { Stdin io.ReadCloser Stdout, Stderr io.WriteCloser SecurityMode pb.SecurityMode + Attrs map[string]string } // WinSize is same as executor.WinSize, copied here to prevent circular package diff --git a/frontend/gateway/gateway.go b/frontend/gateway/gateway.go index 8e9a00262d50..420414d2fcea 100644 --- a/frontend/gateway/gateway.go +++ b/frontend/gateway/gateway.go @@ -1128,6 +1128,49 @@ func (w *outputWriter) Write(msg []byte) (int, error) { } func (lbf *llbBridgeForwarder) ExecProcess(srv pb.LLBBridge_ExecProcessServer) error { + return ExecProcess(srv, func(ctx context.Context, req *InitProcessRequest) (*InitProcessResponse, error) { + init := req.Init + id := init.ContainerID + lbf.ctrsMu.Lock() + ctr, ok := lbf.ctrs[id] + lbf.ctrsMu.Unlock() + if !ok { + return nil, stack.Enable(status.Errorf(codes.NotFound, "container %q previously released or not created", id)) + } + + proc, err := ctr.Start(ctx, gwclient.StartRequest{ + Args: init.Meta.Args, + Env: init.Meta.Env, + User: init.Meta.User, + Cwd: init.Meta.Cwd, + Tty: init.Tty, + Stdin: req.Stdin, + Stdout: req.Stdout, + Stderr: req.Stderr, + SecurityMode: init.Security, + }) + if err != nil { + return nil, stack.Enable(err) + } + + return &InitProcessResponse{proc.Resize, proc.Signal, proc.Wait}, nil + }) +} + +type InitProcessRequest struct { + Init *pb.InitMessage + Stdin io.ReadCloser + Stdout io.WriteCloser + Stderr io.WriteCloser +} + +type InitProcessResponse struct { + ResizeCallback func(ctx context.Context, size gwclient.WinSize) error + SignalCallback func(ctx context.Context, sig syscall.Signal) error + WaitForExit func() error +} + +func ExecProcess(srv pb.LLBBridge_ExecProcessServer, initFn func(ctx context.Context, req *InitProcessRequest) (*InitProcessResponse, error)) error { eg, ctx := errgroup.WithContext(srv.Context()) msgs := make(chan *pb.ExecMessage) @@ -1203,10 +1246,12 @@ func (lbf *llbBridgeForwarder) ExecProcess(srv pb.LLBBridge_ExecProcessServer) e if !pioFound { return stack.Enable(status.Errorf(codes.NotFound, "IO for process %q not found", pid)) } - pio.resize(ctx, gwclient.WinSize{ - Cols: resize.Cols, - Rows: resize.Rows, - }) + if pio.resize != nil { + pio.resize(ctx, gwclient.WinSize{ + Cols: resize.Cols, + Rows: resize.Rows, + }) + } } else if sig := execMsg.GetSignal(); sig != nil { if !pioFound { return stack.Enable(status.Errorf(codes.NotFound, "IO for process %q not found", pid)) @@ -1215,18 +1260,13 @@ func (lbf *llbBridgeForwarder) ExecProcess(srv pb.LLBBridge_ExecProcessServer) e if !ok { return stack.Enable(status.Errorf(codes.InvalidArgument, "Unknown signal %s", sig.Name)) } - pio.signal(ctx, syscallSignal) + if pio.signal != nil { + pio.signal(ctx, syscallSignal) + } } else if init := execMsg.GetInit(); init != nil { if pioFound { return stack.Enable(status.Errorf(codes.AlreadyExists, "Process %s already exists", pid)) } - id := init.ContainerID - lbf.ctrsMu.Lock() - ctr, ok := lbf.ctrs[id] - lbf.ctrsMu.Unlock() - if !ok { - return stack.Enable(status.Errorf(codes.NotFound, "container %q previously released or not created", id)) - } initCtx, initCancel := context.WithCancel(context.Background()) defer initCancel() @@ -1234,22 +1274,20 @@ func (lbf *llbBridgeForwarder) ExecProcess(srv pb.LLBBridge_ExecProcessServer) e pio := newProcessIO(pid, init.Fds) pios[pid] = pio - proc, err := ctr.Start(initCtx, gwclient.StartRequest{ - Args: init.Meta.Args, - Env: init.Meta.Env, - User: init.Meta.User, - Cwd: init.Meta.Cwd, - Tty: init.Tty, - Stdin: pio.processReaders[0], - Stdout: pio.processWriters[1], - Stderr: pio.processWriters[2], - SecurityMode: init.Security, - }) + resp, err := initFn(initCtx, &InitProcessRequest{init, pio.processReaders[0], pio.processWriters[1], pio.processWriters[2]}) if err != nil { + bklog.G(ctx).Debugf("|---> Done Message %s", pid) + srv.Send(&pb.ExecMessage{ + ProcessID: pid, + Input: &pb.ExecMessage_Done{ + Done: &pb.DoneMessage{}, + }, + }) return stack.Enable(err) } - pio.resize = proc.Resize - pio.signal = proc.Signal + wait := resp.WaitForExit + pio.resize = resp.ResizeCallback + pio.signal = resp.SignalCallback eg.Go(func() error { <-pio.done @@ -1267,7 +1305,7 @@ func (lbf *llbBridgeForwarder) ExecProcess(srv pb.LLBBridge_ExecProcessServer) e defer func() { pio.Close() }() - err := proc.Wait() + err := wait() var statusCode uint32 var exitError *pb.ExitError diff --git a/frontend/gateway/grpcclient/client.go b/frontend/gateway/grpcclient/client.go index ad1ecf6fca6b..1bc3088d6469 100644 --- a/frontend/gateway/grpcclient/client.go +++ b/frontend/gateway/grpcclient/client.go @@ -67,7 +67,7 @@ func New(ctx context.Context, opts map[string]string, session, product string, c caps: pb.Caps.CapSet(resp.FrontendAPICaps), llbCaps: opspb.Caps.CapSet(resp.LLBCaps), requests: map[string]*pb.SolveRequest{}, - execMsgs: newMessageForwarder(ctx, c), + execMsgs: NewMessageForwarder(ctx, func(ctx context.Context) (pb.LLBBridge_ExecProcessClient, error) { return c.ExecProcess(ctx) }), }, nil } @@ -276,7 +276,7 @@ type grpcClient struct { caps apicaps.CapSet llbCaps apicaps.CapSet requests map[string]*pb.SolveRequest - execMsgs *messageForwarder + execMsgs *MessageForwarder } func (c *grpcClient) requestForRef(ref client.Reference) (*pb.SolveRequest, error) { @@ -564,17 +564,17 @@ func (b *procMessageForwarder) Close() { b.Send(context.Background(), nil) // ensure channel is closed } -// messageForwarder manages a single grpc stream for ExecProcess to facilitate +// MessageForwarder manages a single grpc stream for ExecProcess to facilitate // a pub/sub message channel for each new process started from the client // connection. -type messageForwarder struct { - client pb.LLBBridgeClient - ctx context.Context - cancel func() - eg *errgroup.Group - mu sync.Mutex - pids map[string]*procMessageForwarder - stream pb.LLBBridge_ExecProcessClient +type MessageForwarder struct { + startFn func(ctx context.Context) (pb.LLBBridge_ExecProcessClient, error) + ctx context.Context + cancel func() + eg *errgroup.Group + mu sync.Mutex + pids map[string]*procMessageForwarder + stream pb.LLBBridge_ExecProcessClient // startOnce used to only start the exec message forwarder once, // so we only have one exec stream per client startOnce sync.Once @@ -583,19 +583,20 @@ type messageForwarder struct { startErr error } -func newMessageForwarder(ctx context.Context, client pb.LLBBridgeClient) *messageForwarder { +// func NewMessageForwarder(ctx context.Context, client pb.LLBBridgeClient) *MessageForwarder { +func NewMessageForwarder(ctx context.Context, startFn func(ctx context.Context) (pb.LLBBridge_ExecProcessClient, error)) *MessageForwarder { ctx, cancel := context.WithCancel(ctx) eg, ctx := errgroup.WithContext(ctx) - return &messageForwarder{ - client: client, - pids: map[string]*procMessageForwarder{}, - ctx: ctx, - cancel: cancel, - eg: eg, + return &MessageForwarder{ + startFn: startFn, + pids: map[string]*procMessageForwarder{}, + ctx: ctx, + cancel: cancel, + eg: eg, } } -func (m *messageForwarder) Start() (err error) { +func (m *MessageForwarder) Start() (err error) { defer func() { if err != nil { m.startErr = err @@ -607,7 +608,7 @@ func (m *messageForwarder) Start() (err error) { } m.startOnce.Do(func() { - m.stream, err = m.client.ExecProcess(m.ctx) + m.stream, err = m.startFn(m.ctx) if err != nil { return } @@ -661,7 +662,7 @@ func debugMessage(msg *pb.ExecMessage) string { return fmt.Sprintf("Unknown Message %s", msg.String()) } -func (m *messageForwarder) Send(msg *pb.ExecMessage) error { +func (m *MessageForwarder) Send(msg *pb.ExecMessage) error { m.mu.Lock() _, ok := m.pids[msg.ProcessID] defer m.mu.Unlock() @@ -672,12 +673,12 @@ func (m *messageForwarder) Send(msg *pb.ExecMessage) error { return m.stream.Send(msg) } -func (m *messageForwarder) Release() error { +func (m *MessageForwarder) Release() error { m.cancel() return m.eg.Wait() } -func (m *messageForwarder) Register(pid string) *procMessageForwarder { +func (m *MessageForwarder) register(pid string) *procMessageForwarder { m.mu.Lock() defer m.mu.Unlock() sender := newProcMessageForwarder() @@ -685,7 +686,7 @@ func (m *messageForwarder) Register(pid string) *procMessageForwarder { return sender } -func (m *messageForwarder) Deregister(pid string) { +func (m *MessageForwarder) deregister(pid string) { m.mu.Lock() defer m.mu.Unlock() sender, ok := m.pids[pid] @@ -697,7 +698,7 @@ func (m *messageForwarder) Deregister(pid string) { } type msgWriter struct { - mux *messageForwarder + mux *MessageForwarder fd uint32 processID string } @@ -775,15 +776,19 @@ func (c *grpcClient) NewContainer(ctx context.Context, req client.NewContainerRe type container struct { client pb.LLBBridgeClient id string - execMsgs *messageForwarder + execMsgs *MessageForwarder } func (ctr *container) Start(ctx context.Context, req client.StartRequest) (client.ContainerProcess, error) { - pid := fmt.Sprintf("%s:%s", ctr.id, identity.NewID()) - msgs := ctr.execMsgs.Register(pid) + return StartProcess(ctx, ctr.id, req, ctr.execMsgs) +} + +func StartProcess(ctx context.Context, containerID string, req client.StartRequest, execMsgs *MessageForwarder) (client.ContainerProcess, error) { + pid := fmt.Sprintf("%s:%s", containerID, identity.NewID()) + msgs := execMsgs.register(pid) init := &pb.InitMessage{ - ContainerID: ctr.id, + ContainerID: containerID, Meta: &opspb.Meta{ Args: req.Args, Env: req.Env, @@ -792,6 +797,7 @@ func (ctr *container) Start(ctx context.Context, req client.StartRequest) (clien }, Tty: req.Tty, Security: req.SecurityMode, + Attrs: req.Attrs, } if req.Stdin != nil { init.Fds = append(init.Fds, 0) @@ -803,7 +809,7 @@ func (ctr *container) Start(ctx context.Context, req client.StartRequest) (clien init.Fds = append(init.Fds, 2) } - err := ctr.execMsgs.Send(&pb.ExecMessage{ + err := execMsgs.Send(&pb.ExecMessage{ ProcessID: pid, Input: &pb.ExecMessage_Init{ Init: init, @@ -826,7 +832,7 @@ func (ctr *container) Start(ctx context.Context, req client.StartRequest) (clien done := make(chan struct{}) ctrProc := &containerProcess{ - execMsgs: ctr.execMsgs, + execMsgs: execMsgs, id: pid, eg: eg, } @@ -854,7 +860,7 @@ func (ctr *container) Start(ctx context.Context, req client.StartRequest) (clien ctrProc.eg.Go(func() error { m := &msgWriter{ - mux: ctr.execMsgs, + mux: execMsgs, processID: pid, fd: 0, } @@ -864,7 +870,7 @@ func (ctr *container) Start(ctx context.Context, req client.StartRequest) (clien return err } // not an error so must be eof - return ctr.execMsgs.Send(&pb.ExecMessage{ + return execMsgs.Send(&pb.ExecMessage{ ProcessID: pid, Input: &pb.ExecMessage_File{ File: &pb.FdMessage{ @@ -950,13 +956,13 @@ func (ctr *container) Release(ctx context.Context) error { } type containerProcess struct { - execMsgs *messageForwarder + execMsgs *MessageForwarder id string eg *errgroup.Group } func (ctrProc *containerProcess) Wait() error { - defer ctrProc.execMsgs.Deregister(ctrProc.id) + defer ctrProc.execMsgs.deregister(ctrProc.id) return ctrProc.eg.Wait() } diff --git a/frontend/gateway/pb/gateway.pb.go b/frontend/gateway/pb/gateway.pb.go index 5b9547011487..b76ebb8fc26a 100644 --- a/frontend/gateway/pb/gateway.pb.go +++ b/frontend/gateway/pb/gateway.pb.go @@ -1821,14 +1821,15 @@ func (*ExecMessage) XXX_OneofWrappers() []interface{} { } type InitMessage struct { - ContainerID string `protobuf:"bytes,1,opt,name=ContainerID,proto3" json:"ContainerID,omitempty"` - Meta *pb.Meta `protobuf:"bytes,2,opt,name=Meta,proto3" json:"Meta,omitempty"` - Fds []uint32 `protobuf:"varint,3,rep,packed,name=Fds,proto3" json:"Fds,omitempty"` - Tty bool `protobuf:"varint,4,opt,name=Tty,proto3" json:"Tty,omitempty"` - Security pb.SecurityMode `protobuf:"varint,5,opt,name=Security,proto3,enum=pb.SecurityMode" json:"Security,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ContainerID string `protobuf:"bytes,1,opt,name=ContainerID,proto3" json:"ContainerID,omitempty"` + Meta *pb.Meta `protobuf:"bytes,2,opt,name=Meta,proto3" json:"Meta,omitempty"` + Fds []uint32 `protobuf:"varint,3,rep,packed,name=Fds,proto3" json:"Fds,omitempty"` + Tty bool `protobuf:"varint,4,opt,name=Tty,proto3" json:"Tty,omitempty"` + Security pb.SecurityMode `protobuf:"varint,5,opt,name=Security,proto3,enum=pb.SecurityMode" json:"Security,omitempty"` + Attrs map[string]string `protobuf:"bytes,6,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:"-"` + XXX_sizecache int32 `json:"-"` } func (m *InitMessage) Reset() { *m = InitMessage{} } @@ -1899,6 +1900,13 @@ func (m *InitMessage) GetSecurity() pb.SecurityMode { return pb.SecurityMode_SANDBOX } +func (m *InitMessage) GetAttrs() map[string]string { + if m != nil { + return m.Attrs + } + return nil +} + type ExitMessage struct { Code uint32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` Error *rpc.Status `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"` @@ -2237,6 +2245,7 @@ func init() { proto.RegisterType((*ReleaseContainerResponse)(nil), "moby.buildkit.v1.frontend.ReleaseContainerResponse") proto.RegisterType((*ExecMessage)(nil), "moby.buildkit.v1.frontend.ExecMessage") proto.RegisterType((*InitMessage)(nil), "moby.buildkit.v1.frontend.InitMessage") + proto.RegisterMapType((map[string]string)(nil), "moby.buildkit.v1.frontend.InitMessage.AttrsEntry") proto.RegisterType((*ExitMessage)(nil), "moby.buildkit.v1.frontend.ExitMessage") proto.RegisterType((*StartedMessage)(nil), "moby.buildkit.v1.frontend.StartedMessage") proto.RegisterType((*DoneMessage)(nil), "moby.buildkit.v1.frontend.DoneMessage") @@ -2248,136 +2257,137 @@ func init() { func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } var fileDescriptor_f1a937782ebbded5 = []byte{ - // 2060 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0xcd, 0x6f, 0xe3, 0xc6, - 0x15, 0x37, 0x2d, 0xd9, 0x92, 0x9e, 0x3e, 0xd6, 0x99, 0xa4, 0x29, 0x43, 0x04, 0x1b, 0x87, 0x4d, - 0x5d, 0xed, 0xc6, 0xa1, 0x52, 0x6f, 0x02, 0x6f, 0xbd, 0x45, 0xd2, 0xf5, 0x17, 0xec, 0xc4, 0xf6, - 0xba, 0xe3, 0x14, 0x0b, 0x04, 0x29, 0x50, 0x5a, 0x1c, 0x69, 0x89, 0xa5, 0x39, 0xec, 0x70, 0xb4, - 0x5e, 0x27, 0x97, 0xf6, 0xd6, 0x63, 0x81, 0x02, 0xbd, 0x16, 0xe8, 0x5f, 0xd0, 0x53, 0x8f, 0x3d, - 0xe7, 0xd8, 0x63, 0xd1, 0x43, 0x50, 0xec, 0x1f, 0x51, 0xa0, 0xb7, 0xe2, 0xcd, 0x0c, 0x25, 0x4a, - 0x96, 0x29, 0x0b, 0x39, 0x69, 0xe6, 0xf1, 0xfd, 0xde, 0xbc, 0xaf, 0x79, 0xef, 0x8d, 0xa0, 0xd9, - 0xf7, 0x25, 0xbb, 0xf4, 0xaf, 0xbc, 0x44, 0x70, 0xc9, 0xc9, 0x5b, 0x17, 0xfc, 0xfc, 0xca, 0x3b, - 0x1f, 0x84, 0x51, 0xf0, 0x3c, 0x94, 0xde, 0x8b, 0x9f, 0x7a, 0x3d, 0xc1, 0x63, 0xc9, 0xe2, 0xc0, - 0xf9, 0xa0, 0x1f, 0xca, 0x67, 0x83, 0x73, 0xaf, 0xcb, 0x2f, 0x3a, 0x7d, 0xde, 0xe7, 0x1d, 0x85, - 0x38, 0x1f, 0xf4, 0xd4, 0x4e, 0x6d, 0xd4, 0x4a, 0x4b, 0x72, 0x36, 0x26, 0xd9, 0xfb, 0x9c, 0xf7, - 0x23, 0xe6, 0x27, 0x61, 0x6a, 0x96, 0x1d, 0x91, 0x74, 0x3b, 0xa9, 0xf4, 0xe5, 0x20, 0x35, 0x98, - 0xf5, 0x1c, 0x06, 0x15, 0xe9, 0x64, 0x8a, 0x74, 0x52, 0x1e, 0xbd, 0x60, 0xa2, 0x93, 0x9c, 0x77, - 0x78, 0x92, 0x71, 0x77, 0x6e, 0xe4, 0xf6, 0x93, 0xb0, 0x23, 0xaf, 0x12, 0x96, 0x76, 0x2e, 0xb9, - 0x78, 0xce, 0x84, 0x01, 0x3c, 0xb8, 0x11, 0x30, 0x90, 0x61, 0x84, 0xa8, 0xae, 0x9f, 0xa4, 0x78, - 0x08, 0xfe, 0x1a, 0x50, 0xde, 0x6c, 0xc9, 0xe3, 0x30, 0x95, 0x61, 0xd8, 0x0f, 0x3b, 0xbd, 0x54, - 0x61, 0xf4, 0x29, 0x68, 0x84, 0x66, 0x77, 0xff, 0x50, 0x82, 0x65, 0xca, 0xd2, 0x41, 0x24, 0xc9, - 0x1a, 0x34, 0x05, 0xeb, 0xed, 0xb2, 0x44, 0xb0, 0xae, 0x2f, 0x59, 0x60, 0x5b, 0xab, 0x56, 0xbb, - 0x76, 0xb0, 0x40, 0xc7, 0xc9, 0xe4, 0x57, 0xd0, 0x12, 0xac, 0x97, 0xe6, 0x18, 0x17, 0x57, 0xad, - 0x76, 0x7d, 0xe3, 0x7d, 0xef, 0xc6, 0x60, 0x78, 0x94, 0xf5, 0x8e, 0xfd, 0x64, 0x04, 0x39, 0x58, - 0xa0, 0x13, 0x42, 0xc8, 0x06, 0x94, 0x04, 0xeb, 0xd9, 0x25, 0x25, 0xeb, 0x6e, 0xb1, 0xac, 0x83, - 0x05, 0x8a, 0xcc, 0x64, 0x13, 0xca, 0x28, 0xc5, 0x2e, 0x2b, 0xd0, 0xbb, 0x33, 0x15, 0x38, 0x58, - 0xa0, 0x0a, 0x40, 0x3e, 0x87, 0xea, 0x05, 0x93, 0x7e, 0xe0, 0x4b, 0xdf, 0x86, 0xd5, 0x52, 0xbb, - 0xbe, 0xd1, 0x29, 0x04, 0xa3, 0x83, 0xbc, 0x63, 0x83, 0xd8, 0x8b, 0xa5, 0xb8, 0xa2, 0x43, 0x01, - 0xce, 0x23, 0x68, 0x8e, 0x7d, 0x22, 0x2b, 0x50, 0x7a, 0xce, 0xae, 0xb4, 0xff, 0x28, 0x2e, 0xc9, - 0x1b, 0xb0, 0xf4, 0xc2, 0x8f, 0x06, 0x4c, 0xb9, 0xaa, 0x41, 0xf5, 0x66, 0x6b, 0xf1, 0xa1, 0xb5, - 0x5d, 0x85, 0x65, 0xa1, 0xc4, 0xbb, 0x7f, 0xb6, 0x60, 0x65, 0xd2, 0x4f, 0xe4, 0xd0, 0x58, 0x68, - 0x29, 0x25, 0x3f, 0x9e, 0xc3, 0xc5, 0x48, 0x48, 0xb5, 0xaa, 0x4a, 0x84, 0xb3, 0x09, 0xb5, 0x21, - 0x69, 0x96, 0x8a, 0xb5, 0x9c, 0x8a, 0xee, 0x26, 0x94, 0x28, 0xeb, 0x91, 0x16, 0x2c, 0x86, 0x26, - 0x29, 0xe8, 0x62, 0x18, 0x90, 0x55, 0x28, 0x05, 0xac, 0x67, 0x82, 0xdf, 0xf2, 0x92, 0x73, 0x6f, - 0x97, 0xf5, 0xc2, 0x38, 0x94, 0x21, 0x8f, 0x29, 0x7e, 0x72, 0xff, 0x6a, 0x61, 0x72, 0xa1, 0x5a, - 0xe4, 0xd3, 0x31, 0x3b, 0x66, 0xa7, 0xca, 0x35, 0xed, 0x9f, 0x16, 0x6b, 0xff, 0x51, 0x5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x27, 0x4c, 0xe2, 0x70, - 0x43, 0xb3, 0x6f, 0x38, 0x31, 0x25, 0xd9, 0xc4, 0x54, 0x9e, 0x36, 0x31, 0x65, 0x5f, 0xc9, 0x26, - 0xd4, 0xbb, 0x3c, 0x4e, 0xa5, 0xf0, 0x43, 0x3c, 0x78, 0x49, 0x31, 0xff, 0x00, 0x99, 0x75, 0x60, - 0x77, 0x46, 0x1f, 0x69, 0x9e, 0x93, 0xdc, 0x07, 0x60, 0x2f, 0xa5, 0xf0, 0x0f, 0x78, 0x2a, 0x53, - 0x7b, 0x59, 0x29, 0x0c, 0x88, 0x43, 0xc2, 0xe1, 0x29, 0xcd, 0x7d, 0x75, 0xdf, 0x84, 0x37, 0xc6, - 0x3d, 0x62, 0x5c, 0xf5, 0x08, 0x7e, 0x48, 0x59, 0xc4, 0xfc, 0x94, 0xcd, 0xef, 0x2d, 0xd7, 0x01, - 0xfb, 0x3a, 0xd8, 0x08, 0xfe, 0x5f, 0x09, 0xea, 0x7b, 0x2f, 0x59, 0xf7, 0x98, 0xa5, 0xa9, 0xdf, - 0x67, 0xe4, 0x6d, 0xa8, 0x9d, 0x0a, 0xde, 0x65, 0x69, 0x3a, 0x94, 0x35, 0x22, 0x90, 0x9f, 0x43, - 0xf9, 0x30, 0x0e, 0xa5, 0x69, 0x73, 0x6b, 0x85, 0x63, 0x73, 0x28, 0x8d, 0x4c, 0x7c, 0x32, 0xe2, - 0x96, 0x6c, 0x41, 0x19, 0x8b, 0xc4, 0x6d, 0x0a, 0x75, 0x90, 0xc3, 0x22, 0x86, 0x6c, 0xab, 0x47, - 0x76, 0xf8, 0x35, 0x33, 0x51, 0x6a, 0x17, 0x77, 0x98, 0xf0, 0x6b, 0x36, 0x92, 0x60, 0x90, 0x64, - 0x0f, 0x2a, 0x67, 0xd2, 0x17, 0xf8, 0xde, 0xd6, 0xd1, 0xbb, 0x57, 0x34, 0x88, 0x68, 0xce, 0x91, - 0x94, 0x0c, 0x8b, 0x4e, 0xd8,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xc4, 0xe9, 0xdc, 0x9a, 0xdf, 0x1c, 0xf8, 0x0d, 0xbe, 0x09, 0xc6, 0x5b, 0x2d, 0xd9, 0x28, 0x74, - 0xc7, 0xd4, 0xa6, 0xee, 0x3c, 0x98, 0x0b, 0x63, 0x0e, 0xf7, 0x75, 0x2b, 0x37, 0xed, 0x9a, 0x14, - 0x77, 0xa6, 0x61, 0xcb, 0x77, 0x6e, 0xc9, 0xd7, 0xb6, 0x3e, 0xb4, 0x30, 0xcf, 0x70, 0x84, 0x2b, - 0x94, 0x9d, 0x9b, 0x6d, 0x0b, 0xf3, 0x2c, 0x3f, 0x0b, 0x6e, 0x37, 0xbe, 0x7d, 0x75, 0xd7, 0xfa, - 0xe7, 0xab, 0xbb, 0xd6, 0x7f, 0x5e, 0xdd, 0xb5, 0xce, 0x97, 0xd5, 0x5f, 0xeb, 0x0f, 0xfe, 0x1f, - 0x00, 0x00, 0xff, 0xff, 0xce, 0x5a, 0x92, 0x41, 0xac, 0x18, 0x00, 0x00, + // 2074 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4f, 0x6f, 0x1b, 0xc7, + 0x15, 0xd7, 0x92, 0x94, 0x48, 0x3e, 0xfe, 0xb1, 0x32, 0x4e, 0xd3, 0xcd, 0x22, 0x70, 0x94, 0x6d, + 0xaa, 0xd2, 0x8e, 0xb2, 0x4c, 0xe4, 0x04, 0x72, 0xe5, 0x22, 0xa9, 0xf5, 0xaf, 0x52, 0x22, 0xc9, + 0xea, 0x28, 0x85, 0x81, 0x20, 0x05, 0xba, 0xe2, 0x0e, 0xe9, 0x85, 0x57, 0xbb, 0xdb, 0xd9, 0xa1, + 0x65, 0x26, 0x97, 0xf6, 0xd6, 0x63, 0x81, 0x02, 0xfd, 0x00, 0xf9, 0x04, 0x3d, 0xf5, 0xd8, 0x73, + 0x8e, 0x3d, 0x16, 0x3d, 0x04, 0x85,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x08, 0x2b, 0x94, 0x25, 0xfd, 0x40, + 0x90, 0x75, 0x68, 0x70, 0xd6, 0xdd, 0x63, 0x31, 0x67, 0x1d, 0x57, 0x30, 0xcf, 0x34, 0xd6, 0x8c, + 0x56, 0xf5, 0x70, 0x89, 0x8e, 0x93, 0xc9, 0x6f, 0xa0, 0xc9, 0x59, 0x37, 0xc9, 0x30, 0x16, 0xd6, + 0x8c, 0x56, 0x6d, 0xf3, 0x3d, 0xe7, 0xc6, 0x64, 0x38, 0x94, 0x75, 0x4f, 0xdc, 0x78, 0x24, 0x72, + 0xb8, 0x44, 0x27, 0x94, 0x90, 0x4d, 0x28, 0x72, 0xd6, 0x35, 0x8b, 0x52, 0xd7, 0x9d, 0x7c, 0x5d, + 0x87, 0x4b, 0x14, 0x99, 0xc9, 0x16, 0x94, 0x50, 0x8b, 0x59, 0x92, 0x42, 0xef, 0xcc, 0x34, 0xe0, + 0x70, 0x89, 0x4a, 0x01, 0xf2, 0x39, 0x54, 0x2e, 0x99, 0x70, 0x3d, 0x57, 0xb8, 0x26, 0xac, 0x15, + 0x5b, 0xb5, 0xcd, 0x76, 0xae, 0x30, 0x06, 0xc8, 0x39, 0xd1, 0x12, 0xfb, 0xa1, 0xe0, 0x03, 0x3a, + 0x54, 0x60, 0x3d, 0x84, 0xc6, 0xd8, 0x27, 0xb2, 0x0a, 0xc5, 0x67, 0x6c, 0xa0, 0xe2, 0x47, 0x71, + 0x49, 0x5e, 0x87, 0xe5, 0xe7, 0x6e, 0xd0, 0x67, 0x32, 0x54, 0x75, 0xaa, 0x36, 0xdb, 0x85, 0x07, + 0xc6, 0x4e, 0x05, 0x56, 0xb8, 0x54, 0x6f, 0xff, 0xd5, 0x80, 0xd5, 0xc9, 0x38, 0x91, 0x23, 0xed, + 0xa1, 0x21, 0x8d, 0xfc, 0x78, 0x81, 0x10, 0x23, 0x21, 0x51, 0xa6, 0x4a, 0x15, 0xd6, 0x16, 0x54, + 0x87, 0xa4, 0x59, 0x26, 0x56, 0x33, 0x26, 0xda, 0x5b, 0x50, 0xa4, 0xac, 0x4b, 0x9a, 0x50, 0xf0, + 0x75, 0x51, 0xd0, 0x82, 0xef, 0x91, 0x35, 0x28, 0x7a, 0xac, 0xab, 0x93, 0xdf, 0x74, 0xe2, 0x0b, + 0x67, 0x8f, 0x75, 0xfd, 0xd0, 0x17, 0x7e, 0x14, 0x52, 0xfc, 0x64, 0x7f, 0x6b, 0x60, 0x71, 0xa1, + 0x59, 0xe4, 0xd3, 0x31, 0x3f, 0x66, 0x97, 0xca, 0x35, 0xeb, 0x9f, 0xe4, 0x5b, 0xff, 0x51, 0xd6, + 0xfa, 0x99, 0xf5, 0x93, 0xf5, 0x4e, 0x40, 0x83, 0x32, 0xd1, 0xe7, 0x21, 0x65, 0xbf, 0xef, 0xb3, + 0x44, 0x90, 0x9f, 0xa7, 0x19, 0x91, 0xfa, 0x67, 0x95, 0x15, 0x32, 0x52, 0x2d, 0x40, 0x5a, 0xb0, + 0xcc, 0x38, 0x8f, 0xb8, 0xb6, 0x82, 0x38, 0x6a, 0x72, 0x38, 0x3c, 0xee, 0x38, 0xe7, 0x72, 0x72, + 0x50, 0xc5, 0x60, 0xaf, 0x42, 0x33, 0x3d, 0x35, 0x89, 0xa3, 0x30, 0x61, 0xf6, 0x2d, 0x68, 0x1c, + 0x85, 0x71, 0x5f, 0x24, 0xda, 0x0e, 0xfb, 0x1f, 0x06, 0x34, 0x53, 0x8a, 0xe2, 0x21, 0x5f, 0x41, + 0x6d, 0x14, 0xe3, 0x34, 0x98, 0xdb, 0x39, 0xf6, 0x8d, 0xcb, 0x67, 0x12, 0xa4, 0x63, 0x9b, 0x55, + 0x67, 0x9d, 0xc2, 0xea, 0x24, 0xc3, 0x94, 0x48, 0xbf, 0x3b, 0x1e, 0xe9, 0xc9, 0xc4, 0x67, 0x22, + 0xfb, 0x17, 0x03, 0xde, 0xa4, 0x4c, 0x8e, 0xc2, 0xa3, 0x4b, 0xb7, 0xc7, 0x76, 0xa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0x28, 0x62, 0x34, 0xf0, 0x8b, + 0x0b, 0x0e, 0x7c, 0xfb, 0x1b, 0xb8, 0x45, 0x99, 0xeb, 0x1d, 0xf8, 0x01, 0xbb, 0x79, 0xae, 0x61, + 0xb7, 0xfa, 0x01, 0x3b, 0x73, 0xc5, 0xd3, 0x61, 0xb7, 0xea, 0x3d, 0xd9, 0x86, 0x65, 0xea, 0x86, + 0x3d, 0xa6, 0x8f, 0x7e, 0x37, 0xe7, 0x68, 0x79, 0x08, 0xf2, 0x52, 0x25, 0x62, 0x3f, 0x84, 0xea, + 0x90, 0x86, 0xb3, 0xe6, 0x71, 0xb7, 0x9b, 0x30, 0x35, 0xb7, 0x8a, 0x54, 0xef, 0x90, 0x7e, 0xcc, + 0xc2, 0x9e, 0x3e, 0xba, 0x48, 0xf5, 0xce, 0x5e, 0x47, 0xb0, 0x91, 0x5a, 0xae, 0x43, 0x43, 0xa0, + 0xb4, 0x87, 0x88, 0xc8, 0x90, 0x0d, 0x26, 0xd7, 0xb6, 0x87, 0x17, 0x95, 0xeb, 0xed, 0xf9, 0xfc, + 0x66, 0x07, 0x4d, 0x28, 0xef, 0xf9, 0x3c, 0xe3, 0x5f, 0xba, 0x25, 0xeb, 0x78, 0x85, 0x75, 0x82, + 0xbe, 0x87, 0xde, 0x0a, 0xc6, 0x43, 0x3d, 0xab, 0x27, 0xa8, 0xf6, 0xa7, 0x2a, 0x8e, 0xf2, 0x14, + 0x6d, 0xcc, 0x06, 0x94, 0x59, 0x28, 0xb8, 0xcf, 0xd2, 0x7b, 0x8e, 0x38, 0x0a, 0xc4, 0x3a, 0x12, + 0xc4, 0xca, 0xfb, 0x94, 0xa6, 0x2c, 0xf6, 0x16, 0xdc, 0x42, 0x42, 0x7e, 0x22, 0x08, 0x94, 0x32, + 0x46, 0xca, 0xb5, 0xbd, 0x0d, 0xab, 0x23, 0x41, 0x7d, 0xf4, 0x3a, 0x94, 0x10, 0x22, 0xeb, 0x41, + 0x3c, 0xed, 0x5c,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11, 0x5a, 0xae, 0x1b, 0x13, 0xf8, + 0x2f, 0xd7, 0x8d, 0x6b, 0x90, 0xef, 0x09, 0x94, 0x10, 0xca, 0x91, 0xbc, 0x91, 0x96, 0xc1, 0x7a, + 0x56, 0x5e, 0xba, 0xc6, 0x30, 0xe0, 0x6f, 0x71, 0xf4, 0xcb, 0xe7, 0x70, 0xfe, 0xd0, 0xcf, 0xfc, + 0x03, 0x65, 0xdd, 0x9d, 0x83, 0x73, 0xa4, 0x5e, 0x3f, 0x25, 0x5b, 0x73, 0xfc, 0x0d, 0x34, 0x5b, + 0xfd, 0xc4, 0x1f, 0x4e, 0x11, 0xd4, 0xb3, 0x37, 0x3a, 0x71, 0x72, 0x44, 0xa7, 0x80, 0x21, 0xab, + 0x3d, 0x37, 0xbf, 0x3e, 0xf0, 0x1b, 0x7c, 0x96, 0x8c, 0xdf, 0xf6, 0x64, 0x33, 0x37, 0x1c, 0x53, + 0x71, 0x85, 0x75, 0x7f, 0x21, 0x19, 0x7d, 0xb8, 0xab, 0xd0, 0x84, 0x46, 0x0c, 0x24, 0xff, 0x72, + 0x1c, 0xa2, 0x0e, 0x6b, 0x4e, 0xbe, 0x96, 0xf1, 0x81, 0x81, 0x75, 0x86, 0x28, 0x32, 0x57, 0x77, + 0x06, 0x5e, 0xe7, 0xd6, 0x59, 0x16, 0x8e, 0xee, 0xd4, 0xbf, 0x7b, 0x79, 0xc7, 0xf8, 0xe7, 0xcb, + 0x3b, 0xc6, 0x7f, 0x5e, 0xde, 0x31, 0x2e, 0x56, 0xe4, 0xbf, 0xfb, 0xf7, 0xff, 0x1f, 0x00, 0x00, + 0xff, 0xff, 0x74, 0x55, 0xcf, 0x2c, 0x2f, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -4589,6 +4599,25 @@ func (m *InitMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.Attrs) > 0 { + for k := range m.Attrs { + v := m.Attrs[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGateway(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintGateway(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintGateway(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + } + } if m.Security != 0 { i = encodeVarintGateway(dAtA, i, uint64(m.Security)) i-- @@ -5677,6 +5706,14 @@ func (m *InitMessage) Size() (n int) { if m.Security != 0 { n += 1 + sovGateway(uint64(m.Security)) } + if len(m.Attrs) > 0 { + for k, v := range m.Attrs { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGateway(uint64(len(k))) + 1 + len(v) + sovGateway(uint64(len(v))) + n += mapEntrySize + 1 + sovGateway(uint64(mapEntrySize)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -10389,6 +10426,133 @@ func (m *InitMessage) Unmarshal(dAtA []byte) error { break } } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGateway + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Attrs == nil { + m.Attrs = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + 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 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGateway + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGateway + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGateway + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthGateway + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGateway(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGateway + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Attrs[mapkey] = mapvalue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGateway(dAtA[iNdEx:]) diff --git a/frontend/gateway/pb/gateway.proto b/frontend/gateway/pb/gateway.proto index 6642f58e2f77..7ababafa6d36 100644 --- a/frontend/gateway/pb/gateway.proto +++ b/frontend/gateway/pb/gateway.proto @@ -230,6 +230,7 @@ message InitMessage{ repeated uint32 Fds = 3; bool Tty = 4; pb.SecurityMode Security = 5; + map Attrs = 6; } message ExitMessage { diff --git a/solver/jobs.go b/solver/jobs.go index f6daac18c3e8..063ebeef1d3c 100644 --- a/solver/jobs.go +++ b/solver/jobs.go @@ -11,6 +11,7 @@ import ( "github.com/moby/buildkit/identity" "github.com/moby/buildkit/session" "github.com/moby/buildkit/solver/errdefs" + "github.com/moby/buildkit/util/bklog" "github.com/moby/buildkit/util/flightcontrol" "github.com/moby/buildkit/util/progress" "github.com/moby/buildkit/util/progress/controller" @@ -193,6 +194,20 @@ func (s *state) Release() { } } +func (s *state) registerDebugHandler(key string, h DebugHandler) { + for j := range s.jobs { + if !j.debug { + continue + } + j.debugHandlersMu.Lock() + if j.debugHandlers == nil { + j.debugHandlers = make(map[string]DebugHandler) + } + j.debugHandlers[key] = h + j.debugHandlersMu.Unlock() + } +} + type subBuilder struct { *state mu sync.Mutex @@ -240,6 +255,10 @@ type Job struct { progressCloser func() SessionID string + + debugHandlers map[string]DebugHandler + debugHandlersMu sync.Mutex + debug bool } type SolverOpt struct { @@ -431,6 +450,14 @@ func (jl *Solver) connectProgressFromState(target, src *state) { } func (jl *Solver) NewJob(id string) (*Job, error) { + return jl.newJob(id, false) +} + +func (jl *Solver) NewDebugJob(id string) (*Job, error) { + return jl.newJob(id, true) +} + +func (jl *Solver) newJob(id string, debug bool) (*Job, error) { jl.mu.Lock() defer jl.mu.Unlock() @@ -449,6 +476,7 @@ func (jl *Solver) NewJob(id string) (*Job, error) { progressCloser: progressCloser, span: span, id: id, + debug: debug, } jl.jobs[id] = j @@ -498,6 +526,10 @@ func (jl *Solver) deleteIfUnreferenced(k digest.Digest, st *state) { } } +func (j *Job) ID() string { + return j.id +} + func (j *Job) Build(ctx context.Context, e Edge) (CachedResult, BuildSources, error) { if span := trace.SpanFromContext(ctx); span.SpanContext().IsValid() { j.span = span @@ -583,6 +615,16 @@ func (j *Job) EachValue(ctx context.Context, key string, fn func(interface{}) er return nil } +func (j *Job) GetDebugHandler(ctx context.Context, id string) (DebugHandler, error) { + j.debugHandlersMu.Lock() + h, ok := j.debugHandlers[id] + j.debugHandlersMu.Unlock() + if !ok || h == nil { + return nil, fmt.Errorf("not found") + } + return h, nil +} + type cacheMapResp struct { *CacheMap complete bool @@ -843,6 +885,14 @@ func (s *sharedOp) Exec(ctx context.Context, inputs []Result) (outputs []Result, notifyCompleted(retErr, false) }() + if debugOp, ok := op.(DebuggableOp); ok { + if handler, err := debugOp.GetDebugHandler(ctx, s.st, inputs); err != nil { + bklog.G(context.TODO()).WithError(err).Debugf("failed to get debug handler of %v", s.st.vtx.Digest()) + } else { + s.st.registerDebugHandler(s.st.vtx.Digest().String(), handler) + } + } + res, err := op.Exec(ctx, s.st, inputs) complete := true if err != nil { diff --git a/solver/llbsolver/ops/exec.go b/solver/llbsolver/ops/exec.go index 51df9ff375c7..4c663a175213 100644 --- a/solver/llbsolver/ops/exec.go +++ b/solver/llbsolver/ops/exec.go @@ -234,15 +234,13 @@ func addDefaultEnvvar(env []string, k, v string) []string { return append(env, k+"="+v) } -func (e *execOp) Exec(ctx context.Context, g session.Group, inputs []solver.Result) (results []solver.Result, err error) { - trace.SpanFromContext(ctx).AddEvent("ExecOp started") - +func (e *execOp) prepare(ctx context.Context, g session.Group, inputs []solver.Result) (_ gateway.PreparedMounts, _ executor.Meta, _ func([]solver.Result, error) error, retErr error) { refs := make([]*worker.WorkerRef, len(inputs)) for i, inp := range inputs { var ok bool refs[i], ok = inp.Sys().(*worker.WorkerRef) if !ok { - return nil, errors.Errorf("invalid reference for exec %T", inp.Sys()) + return gateway.PreparedMounts{}, executor.Meta{}, nil, errors.Errorf("invalid reference for exec %T", inp.Sys()) } } @@ -250,7 +248,7 @@ func (e *execOp) Exec(ctx context.Context, g session.Group, inputs []solver.Resu desc := fmt.Sprintf("mount %s from exec %s", m.Dest, strings.Join(e.op.Meta.Args, " ")) return e.cm.New(ctx, ref, g, cache.WithDescription(desc)) }) - defer func() { + done := func(results []solver.Result, err error) error { if err != nil { execInputs := make([]solver.Result, len(e.op.Mounts)) for i, m := range e.op.Mounts { @@ -288,19 +286,25 @@ func (e *execOp) Exec(ctx context.Context, g session.Group, inputs []solver.Resu o.Ref.Release(context.TODO()) } } + return err + } + defer func() { + if retErr != nil { + retErr = done(nil, retErr) + } }() if err != nil { - return nil, err + return gateway.PreparedMounts{}, executor.Meta{}, nil, err } extraHosts, err := gateway.ParseExtraHosts(e.op.Meta.ExtraHosts) if err != nil { - return nil, err + return gateway.PreparedMounts{}, executor.Meta{}, nil, err } emu, err := getEmulator(ctx, e.platform, e.cm.IdentityMapping()) if err != nil { - return nil, err + return gateway.PreparedMounts{}, executor.Meta{}, nil, err } if emu != nil { e.op.Meta.Args = append([]string{qemuMountName}, e.op.Meta.Args...) @@ -337,10 +341,24 @@ func (e *execOp) Exec(ctx context.Context, g session.Group, inputs []solver.Resu secretEnv, err := e.loadSecretEnv(ctx, g) if err != nil { - return nil, err + return gateway.PreparedMounts{}, executor.Meta{}, nil, err } meta.Env = append(meta.Env, secretEnv...) + return p, meta, done, nil +} + +func (e *execOp) Exec(ctx context.Context, g session.Group, inputs []solver.Result) (results []solver.Result, err error) { + trace.SpanFromContext(ctx).AddEvent("ExecOp started") + + p, meta, done, prepareErr := e.prepare(ctx, g, inputs) + if prepareErr != nil { + return nil, prepareErr + } + defer func() { + err = done(results, err) + }() + stdout, stderr, flush := logs.NewLogStreams(ctx, os.Getenv("BUILDKIT_DEBUG_EXEC_OUTPUT") == "1") defer stdout.Close() defer stderr.Close() @@ -436,3 +454,24 @@ func (e *execOp) loadSecretEnv(ctx context.Context, g session.Group) ([]string, } return out, nil } + +func (e *execOp) GetDebugHandler(ctx context.Context, g session.Group, inputs []solver.Result) (solver.DebugHandler, error) { + return &handler{e, g, inputs}, nil +} + +type handler struct { + e *execOp + g session.Group + inputs []solver.Result +} + +func (h *handler) Exec(ctx context.Context, processInfo func(meta executor.Meta) executor.ProcessInfo) (err error) { + p, meta, done, prepareErr := h.e.prepare(ctx, h.g, h.inputs) + if prepareErr != nil { + return prepareErr + } + defer func() { + err = done(nil, err) + }() + return h.e.exec.Run(ctx, "", p.Root, p.Mounts, processInfo(meta), nil) +} diff --git a/solver/llbsolver/solver.go b/solver/llbsolver/solver.go index b32f76168cf9..c2baeb4b0b92 100644 --- a/solver/llbsolver/solver.go +++ b/solver/llbsolver/solver.go @@ -111,7 +111,18 @@ func (s *Solver) Solve(ctx context.Context, id string, sessionID string, req fro } defer j.Discard() + return s.SolveWithJob(ctx, j, sessionID, req, exp, ent) +} + +func (s *Solver) NewJob(id string, debug bool) (*solver.Job, error) { + if debug { + return s.solver.NewDebugJob(id) + } + return s.solver.NewJob(id) +} +func (s *Solver) SolveWithJob(ctx context.Context, j *solver.Job, sessionID string, req frontend.SolveRequest, exp ExporterRequest, ent []entitlements.Entitlement) (*client.SolveResponse, error) { + id := j.ID() set, err := entitlements.WhiteList(ent, supportedEntitlements(s.entitlements)) if err != nil { return nil, err diff --git a/solver/types.go b/solver/types.go index a20c1020f21e..29c9d61f6518 100644 --- a/solver/types.go +++ b/solver/types.go @@ -5,6 +5,7 @@ import ( "time" "github.com/containerd/containerd/content" + "github.com/moby/buildkit/executor" "github.com/moby/buildkit/session" "github.com/moby/buildkit/solver/pb" "github.com/moby/buildkit/util/compression" @@ -244,3 +245,12 @@ type CacheManager interface { // Save saves a result based on a cache key Save(key *CacheKey, s Result, createdAt time.Time) (*ExportableCacheKey, error) } + +type DebuggableOp interface { + Op + GetDebugHandler(ctx context.Context, g session.Group, inputs []Result) (DebugHandler, error) +} + +type DebugHandler interface { + Exec(ctx context.Context, processInfo func(meta executor.Meta) executor.ProcessInfo) error +} diff --git a/util/progress/progressui/printer.go b/util/progress/progressui/printer.go index 550b8c0b351e..5d6495d1241c 100644 --- a/util/progress/progressui/printer.go +++ b/util/progress/progressui/printer.go @@ -69,7 +69,7 @@ func (p *textMux) printVtx(t *trace, dgst digest.Digest) { if os.Getenv("PROGRESS_NO_TRUNC") == "0" { fmt.Fprintf(p.w, "#%d %s\n", v.index, limitString(v.Name, 72)) } else { - fmt.Fprintf(p.w, "#%d %s\n", v.index, v.Name) + fmt.Fprintf(p.w, "#%d [%s] %s\n", v.index, v.Digest.String(), v.Name) } }