chore(engine): send structured errors over the wire (#20211)

Signed-off-by: Robert Fratto <robertfratto@gmail.com>
pull/19939/head^2
Robert Fratto 4 weeks ago committed by GitHub
parent 87f3b590d5
commit 1272bbb384
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 521
      pkg/engine/internal/proto/wirepb/wirepb.pb.go
  2. 12
      pkg/engine/internal/proto/wirepb/wirepb.proto
  3. 34
      pkg/engine/internal/scheduler/wire/codec.go
  4. 3
      pkg/engine/internal/scheduler/wire/codec_test.go
  5. 37
      pkg/engine/internal/scheduler/wire/error.go
  6. 54
      pkg/engine/internal/scheduler/wire/error_test.go
  7. 2
      pkg/engine/internal/scheduler/wire/frame.go
  8. 17
      pkg/engine/internal/scheduler/wire/peer.go
  9. 18
      pkg/engine/internal/worker/worker.go

@ -260,7 +260,7 @@ func (m *AckFrame) GetId() uint64 {
type NackFrame struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
Error *Error `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
}
func (m *NackFrame) Reset() { *m = NackFrame{} }
@ -302,10 +302,63 @@ func (m *NackFrame) GetId() uint64 {
return 0
}
func (m *NackFrame) GetError() string {
func (m *NackFrame) GetError() *Error {
if m != nil {
return m.Error
}
return nil
}
type Error struct {
// The HTTP status code of the error.
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
// A message describing the error.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (m *Error) Reset() { *m = Error{} }
func (*Error) ProtoMessage() {}
func (*Error) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{3}
}
func (m *Error) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Error.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 *Error) XXX_Merge(src proto.Message) {
xxx_messageInfo_Error.Merge(m, src)
}
func (m *Error) XXX_Size() int {
return m.Size()
}
func (m *Error) XXX_DiscardUnknown() {
xxx_messageInfo_Error.DiscardUnknown(m)
}
var xxx_messageInfo_Error proto.InternalMessageInfo
func (m *Error) GetCode() int32 {
if m != nil {
return m.Code
}
return 0
}
func (m *Error) GetMessage() string {
if m != nil {
return m.Message
}
return ""
}
@ -316,7 +369,7 @@ type DiscardFrame struct {
func (m *DiscardFrame) Reset() { *m = DiscardFrame{} }
func (*DiscardFrame) ProtoMessage() {}
func (*DiscardFrame) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{3}
return fileDescriptor_9956cb67d4b0d2a4, []int{4}
}
func (m *DiscardFrame) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -370,7 +423,7 @@ type MessageFrame struct {
func (m *MessageFrame) Reset() { *m = MessageFrame{} }
func (*MessageFrame) ProtoMessage() {}
func (*MessageFrame) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{4}
return fileDescriptor_9956cb67d4b0d2a4, []int{5}
}
func (m *MessageFrame) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -551,7 +604,7 @@ type WorkerHelloMessage struct {
func (m *WorkerHelloMessage) Reset() { *m = WorkerHelloMessage{} }
func (*WorkerHelloMessage) ProtoMessage() {}
func (*WorkerHelloMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{5}
return fileDescriptor_9956cb67d4b0d2a4, []int{6}
}
func (m *WorkerHelloMessage) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -604,7 +657,7 @@ type WorkerReadyMessage struct {
func (m *WorkerReadyMessage) Reset() { *m = WorkerReadyMessage{} }
func (*WorkerReadyMessage) ProtoMessage() {}
func (*WorkerReadyMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{6}
return fileDescriptor_9956cb67d4b0d2a4, []int{7}
}
func (m *WorkerReadyMessage) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -648,7 +701,7 @@ type TaskAssignMessage struct {
func (m *TaskAssignMessage) Reset() { *m = TaskAssignMessage{} }
func (*TaskAssignMessage) ProtoMessage() {}
func (*TaskAssignMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{7}
return fileDescriptor_9956cb67d4b0d2a4, []int{8}
}
func (m *TaskAssignMessage) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -707,7 +760,7 @@ type TaskCancelMessage struct {
func (m *TaskCancelMessage) Reset() { *m = TaskCancelMessage{} }
func (*TaskCancelMessage) ProtoMessage() {}
func (*TaskCancelMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{8}
return fileDescriptor_9956cb67d4b0d2a4, []int{9}
}
func (m *TaskCancelMessage) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -747,7 +800,7 @@ type TaskFlagMessage struct {
func (m *TaskFlagMessage) Reset() { *m = TaskFlagMessage{} }
func (*TaskFlagMessage) ProtoMessage() {}
func (*TaskFlagMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{9}
return fileDescriptor_9956cb67d4b0d2a4, []int{10}
}
func (m *TaskFlagMessage) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -793,7 +846,7 @@ type TaskStatusMessage struct {
func (m *TaskStatusMessage) Reset() { *m = TaskStatusMessage{} }
func (*TaskStatusMessage) ProtoMessage() {}
func (*TaskStatusMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{10}
return fileDescriptor_9956cb67d4b0d2a4, []int{11}
}
func (m *TaskStatusMessage) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -840,7 +893,7 @@ type StreamBindMessage struct {
func (m *StreamBindMessage) Reset() { *m = StreamBindMessage{} }
func (*StreamBindMessage) ProtoMessage() {}
func (*StreamBindMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{11}
return fileDescriptor_9956cb67d4b0d2a4, []int{12}
}
func (m *StreamBindMessage) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -890,7 +943,7 @@ type StreamDataMessage struct {
func (m *StreamDataMessage) Reset() { *m = StreamDataMessage{} }
func (*StreamDataMessage) ProtoMessage() {}
func (*StreamDataMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{12}
return fileDescriptor_9956cb67d4b0d2a4, []int{13}
}
func (m *StreamDataMessage) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -935,7 +988,7 @@ type StreamStatusMessage struct {
func (m *StreamStatusMessage) Reset() { *m = StreamStatusMessage{} }
func (*StreamStatusMessage) ProtoMessage() {}
func (*StreamStatusMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{13}
return fileDescriptor_9956cb67d4b0d2a4, []int{14}
}
func (m *StreamStatusMessage) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -994,7 +1047,7 @@ type Task struct {
func (m *Task) Reset() { *m = Task{} }
func (*Task) ProtoMessage() {}
func (*Task) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{14}
return fileDescriptor_9956cb67d4b0d2a4, []int{15}
}
func (m *Task) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -1066,7 +1119,7 @@ type StreamList struct {
func (m *StreamList) Reset() { *m = StreamList{} }
func (*StreamList) ProtoMessage() {}
func (*StreamList) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{15}
return fileDescriptor_9956cb67d4b0d2a4, []int{16}
}
func (m *StreamList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -1111,7 +1164,7 @@ type Stream struct {
func (m *Stream) Reset() { *m = Stream{} }
func (*Stream) ProtoMessage() {}
func (*Stream) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{16}
return fileDescriptor_9956cb67d4b0d2a4, []int{17}
}
func (m *Stream) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -1161,7 +1214,7 @@ type TaskStatus struct {
func (m *TaskStatus) Reset() { *m = TaskStatus{} }
func (*TaskStatus) ProtoMessage() {}
func (*TaskStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{17}
return fileDescriptor_9956cb67d4b0d2a4, []int{18}
}
func (m *TaskStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -1226,7 +1279,7 @@ type ContributingTimeRange struct {
func (m *ContributingTimeRange) Reset() { *m = ContributingTimeRange{} }
func (*ContributingTimeRange) ProtoMessage() {}
func (*ContributingTimeRange) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{18}
return fileDescriptor_9956cb67d4b0d2a4, []int{19}
}
func (m *ContributingTimeRange) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -1276,7 +1329,7 @@ type TaskError struct {
func (m *TaskError) Reset() { *m = TaskError{} }
func (*TaskError) ProtoMessage() {}
func (*TaskError) Descriptor() ([]byte, []int) {
return fileDescriptor_9956cb67d4b0d2a4, []int{19}
return fileDescriptor_9956cb67d4b0d2a4, []int{20}
}
func (m *TaskError) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -1318,6 +1371,7 @@ func init() {
proto.RegisterType((*Frame)(nil), "loki.wire.Frame")
proto.RegisterType((*AckFrame)(nil), "loki.wire.AckFrame")
proto.RegisterType((*NackFrame)(nil), "loki.wire.NackFrame")
proto.RegisterType((*Error)(nil), "loki.wire.Error")
proto.RegisterType((*DiscardFrame)(nil), "loki.wire.DiscardFrame")
proto.RegisterType((*MessageFrame)(nil), "loki.wire.MessageFrame")
proto.RegisterType((*WorkerHelloMessage)(nil), "loki.wire.WorkerHelloMessage")
@ -1345,96 +1399,98 @@ func init() {
}
var fileDescriptor_9956cb67d4b0d2a4 = []byte{
// 1414 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x6c, 0x1b, 0x45,
0x17, 0xf7, 0x3a, 0x76, 0x62, 0xbf, 0xb8, 0xad, 0x33, 0x4d, 0x5a, 0xcb, 0xdf, 0xf7, 0x6d, 0xa2,
0xfd, 0x90, 0x28, 0x69, 0x6b, 0xb7, 0x8d, 0x40, 0x14, 0xa4, 0x22, 0x3b, 0x76, 0x48, 0x54, 0xd7,
0x09, 0x6b, 0x97, 0x22, 0x2e, 0xd6, 0x78, 0x77, 0xb2, 0x59, 0x79, 0xbd, 0x6b, 0x76, 0xc6, 0x69,
0x23, 0x71, 0xe0, 0xc0, 0x81, 0x63, 0x0f, 0x48, 0x48, 0xdc, 0x91, 0x7a, 0xe1, 0x8a, 0xc4, 0x91,
0x5b, 0x4f, 0xa8, 0xc7, 0x8a, 0x43, 0xa1, 0xe9, 0x85, 0x63, 0x2f, 0xdc, 0xd1, 0xcc, 0xfe, 0xf1,
0x7a, 0xd7, 0x29, 0x12, 0x42, 0x29, 0x97, 0x76, 0xe7, 0xf7, 0x7e, 0xef, 0x37, 0x6f, 0xde, 0xbc,
0x79, 0x33, 0x0e, 0x5c, 0x1d, 0x0d, 0x8c, 0x2a, 0xb1, 0x0d, 0xd3, 0x26, 0x55, 0xd3, 0x66, 0xc4,
0xb5, 0xb1, 0x55, 0x1d, 0xb9, 0x0e, 0x73, 0xaa, 0xf7, 0x4d, 0x97, 0x8c, 0xfa, 0xfe, 0x7f, 0x15,
0x81, 0xa1, 0xbc, 0xe5, 0x0c, 0xcc, 0x0a, 0x87, 0xca, 0xd7, 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x5b, 0x8f, 0x08, 0xd0, 0x10, 0x8c,
0x08, 0xe8, 0x98, 0xe1, 0x52, 0xee, 0x04, 0x81, 0x06, 0x66, 0x38, 0x21, 0xc0, 0x41, 0xd4, 0x84,
0x33, 0xbe, 0x80, 0xbf, 0x88, 0xbc, 0x90, 0x90, 0x13, 0x12, 0xf1, 0x65, 0x14, 0x68, 0x04, 0x0e,
0xcb, 0xbc, 0x02, 0x28, 0xb9, 0xe7, 0xa8, 0x04, 0x0b, 0xec, 0x80, 0xd7, 0x19, 0xf5, 0x2b, 0x30,
0x18, 0x2a, 0xcb, 0x01, 0x3f, 0x5a, 0x67, 0xca, 0xd7, 0x69, 0x58, 0x4a, 0xec, 0x3b, 0xfa, 0x3f,
0x64, 0x78, 0xea, 0xfc, 0x56, 0x70, 0x2e, 0x96, 0x66, 0x55, 0x18, 0x51, 0x67, 0x6a, 0x3d, 0x84,
0x96, 0xd2, 0x6b, 0x73, 0x97, 0x16, 0x6f, 0x54, 0x5e, 0x55, 0x51, 0x91, 0x15, 0x12, 0xda, 0xb4,
0x99, 0x7b, 0x14, 0x5d, 0x1d, 0xa1, 0xe8, 0x0a, 0xe4, 0x86, 0x84, 0x61, 0x91, 0xe2, 0x39, 0xa1,
0x57, 0xac, 0x84, 0x9d, 0x74, 0x9b, 0x60, 0x9d, 0xb8, 0x6a, 0xc8, 0x28, 0xdf, 0x83, 0xa5, 0x84,
0x20, 0x2a, 0xc2, 0xdc, 0x80, 0x1c, 0x89, 0xd8, 0xf3, 0x2a, 0xff, 0x44, 0x57, 0x20, 0x7b, 0x88,
0xad, 0x31, 0x11, 0x47, 0xef, 0xec, 0x8d, 0x0b, 0x33, 0x33, 0x4e, 0x54, 0x8f, 0xf4, 0x5e, 0xfa,
0x5d, 0x49, 0xf9, 0x52, 0xf2, 0xd2, 0x32, 0x55, 0xcd, 0xc8, 0x09, 0x4f, 0x36, 0xef, 0x48, 0xa2,
0x87, 0x0a, 0xa5, 0xc3, 0xeb, 0x95, 0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x13, 0x67, 0x1d,
0x8b, 0xf0, 0x2f, 0x19, 0x72, 0xe2, 0x0c, 0x63, 0x51, 0x56, 0x21, 0x77, 0xd7, 0x71, 0xfb, 0xc4,
0xed, 0xba, 0x04, 0x1b, 0x07, 0xc1, 0x22, 0xbc, 0x26, 0x04, 0x7b, 0x87, 0x9b, 0x35, 0x66, 0x0d,
0x94, 0xb6, 0x12, 0xda, 0xc2, 0xdd, 0x29, 0x2a, 0x68, 0xec, 0x91, 0xc1, 0xc0, 0x29, 0xc0, 0x31,
0x1a, 0x5b, 0xcc, 0x1a, 0xd3, 0xe0, 0x28, 0xfa, 0x10, 0x16, 0x28, 0xf6, 0xfa, 0x5d, 0xec, 0x79,
0x96, 0x69, 0x07, 0x39, 0x7b, 0x55, 0x90, 0xe8, 0x60, 0xaf, 0x5f, 0xe1, 0xc6, 0xa9, 0x02, 0xd0,
0x10, 0x0c, 0x05, 0x74, 0x6c, 0xeb, 0x64, 0x10, 0x2c, 0x74, 0x54, 0x60, 0x83, 0x1b, 0x23, 0x02,
0x3e, 0x88, 0xae, 0x43, 0x96, 0x0b, 0xec, 0x0e, 0xb0, 0x59, 0x48, 0x73, 0xf7, 0x62, 0xc4, 0x7d,
0x73, 0x80, 0xcd, 0xa9, 0x73, 0x86, 0x06, 0x50, 0x38, 0xb6, 0x47, 0x31, 0x1d, 0x7b, 0x85, 0xb9,
0x99, 0x63, 0xb7, 0xb9, 0x31, 0x32, 0xb6, 0x0f, 0x32, 0x01, 0x8f, 0xba, 0x04, 0x0f, 0xbb, 0x3d,
0xcb, 0x36, 0x0a, 0xf3, 0x31, 0x81, 0x36, 0xb7, 0x56, 0x2d, 0xdb, 0x10, 0x04, 0xbc, 0x10, 0x14,
0x04, 0x0c, 0x4c, 0x71, 0x21, 0x73, 0x8c, 0x40, 0x0d, 0x53, 0x1c, 0x13, 0x60, 0x20, 0xaa, 0xc3,
0xa9, 0x40, 0x20, 0x98, 0x44, 0x96, 0x4b, 0x28, 0x31, 0x89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0xdc, 0x8a, 0x05,
0xbf, 0x0c, 0x8b, 0x47, 0x2d, 0xb5, 0x66, 0x3d, 0x2f, 0xc5, 0xe0, 0xed, 0x9d, 0x7a, 0x2b, 0x9f,
0x8c, 0xe9, 0x54, 0x9b, 0xdb, 0x1b, 0x37, 0xeb, 0xb5, 0x7c, 0x0a, 0x9d, 0x87, 0xb3, 0x47, 0x2c,
0x1b, 0xcd, 0xed, 0x36, 0x8b, 0xbd, 0xfa, 0xc5, 0xa3, 0xa7, 0x4a, 0xe2, 0xf1, 0x53, 0x25, 0xf1,
0xfc, 0xa9, 0x22, 0x7d, 0x75, 0xa8, 0x48, 0x0f, 0x0e, 0x15, 0xe9, 0xe1, 0xa1, 0x22, 0x3d, 0x3a,
0x54, 0xa4, 0x3f, 0x0e, 0x15, 0xe9, 0xcf, 0x43, 0x25, 0xf1, 0xfc, 0x50, 0x91, 0xee, 0x3f, 0x53,
0x12, 0x8f, 0x9e, 0x29, 0x89, 0xc7, 0xcf, 0x94, 0xc4, 0xe7, 0x1f, 0xfc, 0xab, 0x0d, 0xe6, 0xff,
0xec, 0xd0, 0x9b, 0xe3, 0x6f, 0xeb, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xfd, 0x59, 0x2d,
0xa8, 0x10, 0x00, 0x00,
}
func (x TaskState) String() string {
@ -1623,7 +1679,34 @@ func (this *NackFrame) Equal(that interface{}) bool {
if this.Id != that1.Id {
return false
}
if this.Error != that1.Error {
if !this.Error.Equal(that1.Error) {
return false
}
return true
}
func (this *Error) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Error)
if !ok {
that2, ok := that.(Error)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Code != that1.Code {
return false
}
if this.Message != that1.Message {
return false
}
return true
@ -2395,7 +2478,20 @@ func (this *NackFrame) GoString() string {
s := make([]string, 0, 6)
s = append(s, "&wirepb.NackFrame{")
s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n")
s = append(s, "Error: "+fmt.Sprintf("%#v", this.Error)+",\n")
if this.Error != nil {
s = append(s, "Error: "+fmt.Sprintf("%#v", this.Error)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *Error) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 6)
s = append(s, "&wirepb.Error{")
s = append(s, "Code: "+fmt.Sprintf("%#v", this.Code)+",\n")
s = append(s, "Message: "+fmt.Sprintf("%#v", this.Message)+",\n")
s = append(s, "}")
return strings.Join(s, "")
}
@ -2878,12 +2974,17 @@ func (m *NackFrame) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if len(m.Error) > 0 {
i -= len(m.Error)
copy(dAtA[i:], m.Error)
i = encodeVarintWirepb(dAtA, i, uint64(len(m.Error)))
if m.Error != nil {
{
size, err := m.Error.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintWirepb(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
dAtA[i] = 0x1a
}
if m.Id != 0 {
i = encodeVarintWirepb(dAtA, i, uint64(m.Id))
@ -2893,6 +2994,41 @@ func (m *NackFrame) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *Error) 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 *Error) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Error) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Message) > 0 {
i -= len(m.Message)
copy(dAtA[i:], m.Message)
i = encodeVarintWirepb(dAtA, i, uint64(len(m.Message)))
i--
dAtA[i] = 0x12
}
if m.Code != 0 {
i = encodeVarintWirepb(dAtA, i, uint64(m.Code))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *DiscardFrame) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@ -3774,12 +3910,12 @@ func (m *ContributingTimeRange) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i--
dAtA[i] = 0x10
}
n30, err30 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):])
if err30 != nil {
return 0, err30
n31, err31 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):])
if err31 != nil {
return 0, err31
}
i -= n30
i = encodeVarintWirepb(dAtA, i, uint64(n30))
i -= n31
i = encodeVarintWirepb(dAtA, i, uint64(n31))
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
@ -3907,7 +4043,23 @@ func (m *NackFrame) Size() (n int) {
if m.Id != 0 {
n += 1 + sovWirepb(uint64(m.Id))
}
l = len(m.Error)
if m.Error != nil {
l = m.Error.Size()
n += 1 + l + sovWirepb(uint64(l))
}
return n
}
func (m *Error) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Code != 0 {
n += 1 + sovWirepb(uint64(m.Code))
}
l = len(m.Message)
if l > 0 {
n += 1 + l + sovWirepb(uint64(l))
}
@ -4381,7 +4533,18 @@ func (this *NackFrame) String() string {
}
s := strings.Join([]string{`&NackFrame{`,
`Id:` + fmt.Sprintf("%v", this.Id) + `,`,
`Error:` + fmt.Sprintf("%v", this.Error) + `,`,
`Error:` + strings.Replace(this.Error.String(), "Error", "Error", 1) + `,`,
`}`,
}, "")
return s
}
func (this *Error) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Error{`,
`Code:` + fmt.Sprintf("%v", this.Code) + `,`,
`Message:` + fmt.Sprintf("%v", this.Message) + `,`,
`}`,
}, "")
return s
@ -5024,10 +5187,118 @@ func (m *NackFrame) Unmarshal(dAtA []byte) error {
break
}
}
case 2:
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowWirepb
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthWirepb
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthWirepb
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Error == nil {
m.Error = &Error{}
}
if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipWirepb(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthWirepb
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthWirepb
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Error) 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 ErrIntOverflowWirepb
}
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: Error: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
}
m.Code = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowWirepb
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Code |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
@ -5054,7 +5325,7 @@ func (m *NackFrame) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Error = string(dAtA[iNdEx:postIndex])
m.Message = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex

@ -26,8 +26,18 @@ message AckFrame {
}
message NackFrame {
reserved 2; // Previously error message, now used in 3.
uint64 id = 1;
string error = 2;
Error error = 3;
}
message Error {
// The HTTP status code of the error.
int32 code = 1;
// A message describing the error.
string message = 2;
}
message DiscardFrame {

@ -131,13 +131,9 @@ func (c *protobufCodec) frameFromPbFrame(f *wirepb.Frame) (Frame, error) {
return AckFrame{ID: k.Ack.Id}, nil
case *wirepb.Frame_Nack:
var err error
if k.Nack.Error != "" {
err = errors.New(k.Nack.Error)
}
return NackFrame{
ID: k.Nack.Id,
Error: err,
Error: c.errorFromPb(k.Nack.Error),
}, nil
case *wirepb.Frame_Discard:
@ -158,6 +154,17 @@ func (c *protobufCodec) frameFromPbFrame(f *wirepb.Frame) (Frame, error) {
}
}
func (c *protobufCodec) errorFromPb(errPb *wirepb.Error) *Error {
if errPb == nil {
return nil
}
return &Error{
Code: errPb.Code,
Message: errPb.Message,
}
}
func (c *protobufCodec) messageFromPbMessage(mf *wirepb.MessageFrame) (Message, error) {
if mf == nil {
return nil, errors.New("nil message frame")
@ -410,14 +417,10 @@ func (c *protobufCodec) frameToPbFrame(from Frame) (*wirepb.Frame, error) {
}
case NackFrame:
var errStr string
if v.Error != nil {
errStr = v.Error.Error()
}
f.Kind = &wirepb.Frame_Nack{
Nack: &wirepb.NackFrame{
Id: v.ID,
Error: errStr,
Error: c.errorToPb(v.Error),
},
}
@ -441,6 +444,17 @@ func (c *protobufCodec) frameToPbFrame(from Frame) (*wirepb.Frame, error) {
return f, nil
}
func (c *protobufCodec) errorToPb(e *Error) *wirepb.Error {
if e == nil {
return nil
}
return &wirepb.Error{
Code: e.Code,
Message: e.Message,
}
}
func (c *protobufCodec) messageToPbMessage(from Message) (*wirepb.MessageFrame, error) {
if from == nil {
return nil, errors.New("nil message")

@ -3,6 +3,7 @@ package wire
import (
"errors"
"net"
"net/http"
"net/netip"
"testing"
"time"
@ -31,7 +32,7 @@ func TestProtobufCodec_Frames(t *testing.T) {
"NackFrame with error": {
frame: NackFrame{
ID: 44,
Error: errors.New("test error"),
Error: Errorf(http.StatusInternalServerError, "test error"),
},
},
"DiscardFrame": {

@ -0,0 +1,37 @@
package wire
import (
"fmt"
)
// Error represents an error received in response to a message.
type Error struct {
// Code is an HTTP status code representing the kind of error received.
Code int32
// Message is a human-readable description of the error.
Message string
}
var _ error = (*Error)(nil)
// Errorf creates a new Error with the given code and formatted message.
func Errorf(code int32, format string, args ...interface{}) *Error {
return &Error{
Code: code,
Message: fmt.Sprintf(format, args...),
}
}
// Is returns true if the target is identical to the error, providing
// functionality for [errors.Is].
func (e *Error) Is(target error) bool {
other, ok := target.(*Error)
if !ok {
return false
}
return other.Code == e.Code && other.Message == e.Message
}
// Error returns the message of the error.
func (e *Error) Error() string { return e.Message }

@ -0,0 +1,54 @@
package wire
import (
"errors"
"fmt"
"testing"
"github.com/stretchr/testify/require"
)
func TestError_Is(t *testing.T) {
tt := []struct {
name string
left error
right error
expect bool
}{
{
name: "same code and message",
left: Errorf(100, "hello, world"),
right: Errorf(100, "hello, world"),
expect: true,
},
{
// NOTE(rfratto): errors.Is will only unwrap the left-hand side of
// the operation.
name: "same code and message (wrapped)",
left: fmt.Errorf("wrapped: %w", Errorf(100, "hello, world")),
right: Errorf(100, "hello, world"),
expect: true,
},
{
name: "different code, same message",
left: Errorf(100, "hello, world"),
right: Errorf(200, "hello, world"),
expect: false,
},
{
name: "different code, different message",
left: Errorf(100, "hello, world"),
right: Errorf(200, "goodbye, world"),
expect: false,
},
}
for _, tc := range tt {
t.Run(tc.name, func(t *testing.T) {
require.Equal(t, tc.expect, errors.Is(tc.left, tc.right), "expected errors.Is to return %t", tc.expect)
})
}
}

@ -72,7 +72,7 @@ type NackFrame struct {
ID uint64
// Error is the error that occurred.
Error error
Error *Error
}
// FrameKind returns [FrameKindNack].

@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"net"
"net/http"
"reflect"
"sync"
@ -186,7 +187,7 @@ func (p *Peer) notifyError(frame Frame, err error) {
// processMessage handles a message received from the peer.
func (p *Peer) processMessage(ctx context.Context, id uint64, message Message) {
if p.Handler == nil {
_ = p.enqueueFrame(ctx, NackFrame{ID: id, Error: errors.New("not implemented")})
_ = p.enqueueFrame(ctx, NackFrame{ID: id, Error: Errorf(http.StatusNotImplemented, "not implemented")})
return
}
@ -196,7 +197,19 @@ func (p *Peer) processMessage(ctx context.Context, id uint64, message Message) {
_ = p.enqueueFrame(ctx, AckFrame{ID: id})
default:
// TODO(rfratto): What should we do if this fails? Logs? Metrics?
_ = p.enqueueFrame(ctx, NackFrame{ID: id, Error: err})
_ = p.enqueueFrame(ctx, NackFrame{ID: id, Error: convertError(err)})
}
}
func convertError(err error) *Error {
var wireError *Error
if errors.As(err, &wireError) {
return wireError
}
return &Error{
Code: http.StatusInternalServerError,
Message: err.Error(),
}
}

@ -7,6 +7,7 @@ import (
"errors"
"fmt"
"net"
"net/http"
"reflect"
"runtime"
"sync"
@ -302,11 +303,24 @@ func (w *Worker) handleSchedulerConn(ctx context.Context, logger log.Logger, con
}
}
handleAssignment := func(peer *wire.Peer, msg wire.TaskAssignMessage) error {
popRequest := func() (readyRequest, error) {
reqsMut.Lock()
defer reqsMut.Unlock()
if len(readyReqs) == 0 {
return readyRequest{}, wire.Errorf(http.StatusTooManyRequests, "no threads available")
}
req := readyReqs[0]
readyReqs = readyReqs[1:]
reqsMut.Unlock()
return req, nil
}
handleAssignment := func(peer *wire.Peer, msg wire.TaskAssignMessage) error {
req, err := popRequest()
if err != nil {
return err
}
job, err := w.newJob(req.Context, peer, logger, msg)
if err != nil {

Loading…
Cancel
Save