From 9d86a837d768f89e447bbc26529ab0fe9fa37ec0 Mon Sep 17 00:00:00 2001 From: mnoah1 Date: Mon, 31 Aug 2026 16:17:30 +0000 Subject: [PATCH] feat(stovepipe): add request history protobuf contract --- api/stovepipe/proto/stovepipe.proto | 61 +++ api/stovepipe/protopb/stovepipe.pb.go | 467 +++++++++++++++++++- api/stovepipe/protopb/stovepipe.pb.yarpc.go | 167 ++++++- api/stovepipe/protopb/stovepipe_grpc.pb.go | 84 +++- 4 files changed, 736 insertions(+), 43 deletions(-) diff --git a/api/stovepipe/proto/stovepipe.proto b/api/stovepipe/proto/stovepipe.proto index a00decc9c..ef2571e35 100644 --- a/api/stovepipe/proto/stovepipe.proto +++ b/api/stovepipe/proto/stovepipe.proto @@ -54,6 +54,63 @@ message IngestResponse { string id = 1; } +// GetRequestHistoryByIDRequest selects one request history by the ID returned from Ingest. +message GetRequestHistoryByIDRequest { + // Logical queue containing the request. + string queue = 1; + // Globally unique request identifier returned from Ingest. + string request_id = 2; +} + +// GetRequestHistoryByURIRequest selects retained request histories for an exact commit URI. +message GetRequestHistoryByURIRequest { + // Logical queue containing the request. + string queue = 1; + // Exact VCS-agnostic commit URI whose request histories are selected. + string uri = 2; +} + +// HistoryEvent is one retained request state or lifecycle event. +message HistoryEvent { + // Opaque stable identity of this logical occurrence within the request. + string event_id = 1; + // Occurrence time in Unix milliseconds. + int64 timestamp_ms = 2; + // Exactly one occurrence kind is populated. + oneof occurrence { + // Durable request state reached by the request. + string request_state = 3; + // Event that occurred without changing the request state. + string event = 4; + } + // Newer request that caused a superseded state. Empty when not applicable. + string superseded_by_request_id = 5; + // Build associated with the occurrence. Empty when no build applies. + string build_id = 6; + // Stable domain reason for a terminal request outcome. Empty otherwise. + string outcome_reason = 7; +} + +// RequestHistory identifies one request and contains its ordered events. +message RequestHistory { + // Globally unique request identifier. + string request_id = 1; + // Events ordered by occurrence time and stable event identity. + repeated HistoryEvent events = 2; +} + +// GetRequestHistoryByIDResponse contains all retained events for one request. +message GetRequestHistoryByIDResponse { + // Events ordered by occurrence time and stable event identity. + repeated HistoryEvent events = 1; +} + +// GetRequestHistoryByURIResponse contains all retained request histories for an exact URI. +message GetRequestHistoryByURIResponse { + // Histories ordered by numeric request-ID counter, then request ID. + repeated RequestHistory histories = 1; +} + // Stovepipe provides the Stovepipe API. service Stovepipe { // Ping returns a response indicating the service is alive @@ -61,4 +118,8 @@ service Stovepipe { // Ingest admits a queue's newly observed commit into the validation pipeline and returns // the minted request ID. The caller hands off asynchronously; validation happens later. rpc Ingest(IngestRequest) returns (IngestResponse) {} + // GetRequestHistoryByID returns retained history for one request ID. + rpc GetRequestHistoryByID(GetRequestHistoryByIDRequest) returns (GetRequestHistoryByIDResponse) {} + // GetRequestHistoryByURI returns retained histories for an exact commit URI. + rpc GetRequestHistoryByURI(GetRequestHistoryByURIRequest) returns (GetRequestHistoryByURIResponse) {} } diff --git a/api/stovepipe/protopb/stovepipe.pb.go b/api/stovepipe/protopb/stovepipe.pb.go index 25c1a6821..ef4c02ad8 100644 --- a/api/stovepipe/protopb/stovepipe.pb.go +++ b/api/stovepipe/protopb/stovepipe.pb.go @@ -250,6 +250,395 @@ func (x *IngestResponse) GetId() string { return "" } +// GetRequestHistoryByIDRequest selects one request history by the ID returned from Ingest. +type GetRequestHistoryByIDRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Logical queue containing the request. + Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` + // Globally unique request identifier returned from Ingest. + RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRequestHistoryByIDRequest) Reset() { + *x = GetRequestHistoryByIDRequest{} + mi := &file_stovepipe_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRequestHistoryByIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRequestHistoryByIDRequest) ProtoMessage() {} + +func (x *GetRequestHistoryByIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_stovepipe_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRequestHistoryByIDRequest.ProtoReflect.Descriptor instead. +func (*GetRequestHistoryByIDRequest) Descriptor() ([]byte, []int) { + return file_stovepipe_proto_rawDescGZIP(), []int{4} +} + +func (x *GetRequestHistoryByIDRequest) GetQueue() string { + if x != nil { + return x.Queue + } + return "" +} + +func (x *GetRequestHistoryByIDRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// GetRequestHistoryByURIRequest selects retained request histories for an exact commit URI. +type GetRequestHistoryByURIRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Logical queue containing the request. + Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` + // Exact VCS-agnostic commit URI whose request histories are selected. + Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRequestHistoryByURIRequest) Reset() { + *x = GetRequestHistoryByURIRequest{} + mi := &file_stovepipe_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRequestHistoryByURIRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRequestHistoryByURIRequest) ProtoMessage() {} + +func (x *GetRequestHistoryByURIRequest) ProtoReflect() protoreflect.Message { + mi := &file_stovepipe_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRequestHistoryByURIRequest.ProtoReflect.Descriptor instead. +func (*GetRequestHistoryByURIRequest) Descriptor() ([]byte, []int) { + return file_stovepipe_proto_rawDescGZIP(), []int{5} +} + +func (x *GetRequestHistoryByURIRequest) GetQueue() string { + if x != nil { + return x.Queue + } + return "" +} + +func (x *GetRequestHistoryByURIRequest) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +// HistoryEvent is one retained request state or lifecycle event. +type HistoryEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Opaque stable identity of this logical occurrence within the request. + EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` + // Occurrence time in Unix milliseconds. + TimestampMs int64 `protobuf:"varint,2,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"` + // Exactly one occurrence kind is populated. + // + // Types that are valid to be assigned to Occurrence: + // + // *HistoryEvent_RequestState + // *HistoryEvent_Event + Occurrence isHistoryEvent_Occurrence `protobuf_oneof:"occurrence"` + // Newer request that caused a superseded state. Empty when not applicable. + SupersededByRequestId string `protobuf:"bytes,5,opt,name=superseded_by_request_id,json=supersededByRequestId,proto3" json:"superseded_by_request_id,omitempty"` + // Build associated with the occurrence. Empty when no build applies. + BuildId string `protobuf:"bytes,6,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` + // Stable domain reason for a terminal request outcome. Empty otherwise. + OutcomeReason string `protobuf:"bytes,7,opt,name=outcome_reason,json=outcomeReason,proto3" json:"outcome_reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HistoryEvent) Reset() { + *x = HistoryEvent{} + mi := &file_stovepipe_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HistoryEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HistoryEvent) ProtoMessage() {} + +func (x *HistoryEvent) ProtoReflect() protoreflect.Message { + mi := &file_stovepipe_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HistoryEvent.ProtoReflect.Descriptor instead. +func (*HistoryEvent) Descriptor() ([]byte, []int) { + return file_stovepipe_proto_rawDescGZIP(), []int{6} +} + +func (x *HistoryEvent) GetEventId() string { + if x != nil { + return x.EventId + } + return "" +} + +func (x *HistoryEvent) GetTimestampMs() int64 { + if x != nil { + return x.TimestampMs + } + return 0 +} + +func (x *HistoryEvent) GetOccurrence() isHistoryEvent_Occurrence { + if x != nil { + return x.Occurrence + } + return nil +} + +func (x *HistoryEvent) GetRequestState() string { + if x != nil { + if x, ok := x.Occurrence.(*HistoryEvent_RequestState); ok { + return x.RequestState + } + } + return "" +} + +func (x *HistoryEvent) GetEvent() string { + if x != nil { + if x, ok := x.Occurrence.(*HistoryEvent_Event); ok { + return x.Event + } + } + return "" +} + +func (x *HistoryEvent) GetSupersededByRequestId() string { + if x != nil { + return x.SupersededByRequestId + } + return "" +} + +func (x *HistoryEvent) GetBuildId() string { + if x != nil { + return x.BuildId + } + return "" +} + +func (x *HistoryEvent) GetOutcomeReason() string { + if x != nil { + return x.OutcomeReason + } + return "" +} + +type isHistoryEvent_Occurrence interface { + isHistoryEvent_Occurrence() +} + +type HistoryEvent_RequestState struct { + // Durable request state reached by the request. + RequestState string `protobuf:"bytes,3,opt,name=request_state,json=requestState,proto3,oneof"` +} + +type HistoryEvent_Event struct { + // Event that occurred without changing the request state. + Event string `protobuf:"bytes,4,opt,name=event,proto3,oneof"` +} + +func (*HistoryEvent_RequestState) isHistoryEvent_Occurrence() {} + +func (*HistoryEvent_Event) isHistoryEvent_Occurrence() {} + +// RequestHistory identifies one request and contains its ordered events. +type RequestHistory struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Globally unique request identifier. + RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Events ordered by occurrence time and stable event identity. + Events []*HistoryEvent `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequestHistory) Reset() { + *x = RequestHistory{} + mi := &file_stovepipe_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestHistory) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestHistory) ProtoMessage() {} + +func (x *RequestHistory) ProtoReflect() protoreflect.Message { + mi := &file_stovepipe_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestHistory.ProtoReflect.Descriptor instead. +func (*RequestHistory) Descriptor() ([]byte, []int) { + return file_stovepipe_proto_rawDescGZIP(), []int{7} +} + +func (x *RequestHistory) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *RequestHistory) GetEvents() []*HistoryEvent { + if x != nil { + return x.Events + } + return nil +} + +// GetRequestHistoryByIDResponse contains all retained events for one request. +type GetRequestHistoryByIDResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Events ordered by occurrence time and stable event identity. + Events []*HistoryEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRequestHistoryByIDResponse) Reset() { + *x = GetRequestHistoryByIDResponse{} + mi := &file_stovepipe_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRequestHistoryByIDResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRequestHistoryByIDResponse) ProtoMessage() {} + +func (x *GetRequestHistoryByIDResponse) ProtoReflect() protoreflect.Message { + mi := &file_stovepipe_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRequestHistoryByIDResponse.ProtoReflect.Descriptor instead. +func (*GetRequestHistoryByIDResponse) Descriptor() ([]byte, []int) { + return file_stovepipe_proto_rawDescGZIP(), []int{8} +} + +func (x *GetRequestHistoryByIDResponse) GetEvents() []*HistoryEvent { + if x != nil { + return x.Events + } + return nil +} + +// GetRequestHistoryByURIResponse contains all retained request histories for an exact URI. +type GetRequestHistoryByURIResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Histories ordered by numeric request-ID counter, then request ID. + Histories []*RequestHistory `protobuf:"bytes,1,rep,name=histories,proto3" json:"histories,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRequestHistoryByURIResponse) Reset() { + *x = GetRequestHistoryByURIResponse{} + mi := &file_stovepipe_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRequestHistoryByURIResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRequestHistoryByURIResponse) ProtoMessage() {} + +func (x *GetRequestHistoryByURIResponse) ProtoReflect() protoreflect.Message { + mi := &file_stovepipe_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRequestHistoryByURIResponse.ProtoReflect.Descriptor instead. +func (*GetRequestHistoryByURIResponse) Descriptor() ([]byte, []int) { + return file_stovepipe_proto_rawDescGZIP(), []int{9} +} + +func (x *GetRequestHistoryByURIResponse) GetHistories() []*RequestHistory { + if x != nil { + return x.Histories + } + return nil +} + var File_stovepipe_proto protoreflect.FileDescriptor const file_stovepipe_proto_rawDesc = "" + @@ -265,10 +654,37 @@ const file_stovepipe_proto_rawDesc = "" + "\rIngestRequest\x12\x14\n" + "\x05queue\x18\x01 \x01(\tR\x05queue\" \n" + "\x0eIngestResponse\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id2\xcb\x01\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"S\n" + + "\x1cGetRequestHistoryByIDRequest\x12\x14\n" + + "\x05queue\x18\x01 \x01(\tR\x05queue\x12\x1d\n" + + "\n" + + "request_id\x18\x02 \x01(\tR\trequestId\"G\n" + + "\x1dGetRequestHistoryByURIRequest\x12\x14\n" + + "\x05queue\x18\x01 \x01(\tR\x05queue\x12\x10\n" + + "\x03uri\x18\x02 \x01(\tR\x03uri\"\x94\x02\n" + + "\fHistoryEvent\x12\x19\n" + + "\bevent_id\x18\x01 \x01(\tR\aeventId\x12!\n" + + "\ftimestamp_ms\x18\x02 \x01(\x03R\vtimestampMs\x12%\n" + + "\rrequest_state\x18\x03 \x01(\tH\x00R\frequestState\x12\x16\n" + + "\x05event\x18\x04 \x01(\tH\x00R\x05event\x127\n" + + "\x18superseded_by_request_id\x18\x05 \x01(\tR\x15supersededByRequestId\x12\x19\n" + + "\bbuild_id\x18\x06 \x01(\tR\abuildId\x12%\n" + + "\x0eoutcome_reason\x18\a \x01(\tR\routcomeReasonB\f\n" + + "\n" + + "occurrence\"q\n" + + "\x0eRequestHistory\x12\x1d\n" + + "\n" + + "request_id\x18\x01 \x01(\tR\trequestId\x12@\n" + + "\x06events\x18\x02 \x03(\v2(.uber.submitqueue.stovepipe.HistoryEventR\x06events\"a\n" + + "\x1dGetRequestHistoryByIDResponse\x12@\n" + + "\x06events\x18\x01 \x03(\v2(.uber.submitqueue.stovepipe.HistoryEventR\x06events\"j\n" + + "\x1eGetRequestHistoryByURIResponse\x12H\n" + + "\thistories\x18\x01 \x03(\v2*.uber.submitqueue.stovepipe.RequestHistoryR\thistories2\xf0\x03\n" + "\tStovepipe\x12[\n" + "\x04Ping\x12'.uber.submitqueue.stovepipe.PingRequest\x1a(.uber.submitqueue.stovepipe.PingResponse\"\x00\x12a\n" + - "\x06Ingest\x12).uber.submitqueue.stovepipe.IngestRequest\x1a*.uber.submitqueue.stovepipe.IngestResponse\"\x00Be\n" + + "\x06Ingest\x12).uber.submitqueue.stovepipe.IngestRequest\x1a*.uber.submitqueue.stovepipe.IngestResponse\"\x00\x12\x8e\x01\n" + + "\x15GetRequestHistoryByID\x128.uber.submitqueue.stovepipe.GetRequestHistoryByIDRequest\x1a9.uber.submitqueue.stovepipe.GetRequestHistoryByIDResponse\"\x00\x12\x91\x01\n" + + "\x16GetRequestHistoryByURI\x129.uber.submitqueue.stovepipe.GetRequestHistoryByURIRequest\x1a:.uber.submitqueue.stovepipe.GetRequestHistoryByURIResponse\"\x00Be\n" + "\x1ecom.uber.submitqueue.stovepipeB\x0eStovepipeProtoP\x01Z1github.com/uber/submitqueue/api/stovepipe/protopbb\x06proto3" var ( @@ -283,23 +699,36 @@ func file_stovepipe_proto_rawDescGZIP() []byte { return file_stovepipe_proto_rawDescData } -var file_stovepipe_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_stovepipe_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_stovepipe_proto_goTypes = []any{ - (*PingRequest)(nil), // 0: uber.submitqueue.stovepipe.PingRequest - (*PingResponse)(nil), // 1: uber.submitqueue.stovepipe.PingResponse - (*IngestRequest)(nil), // 2: uber.submitqueue.stovepipe.IngestRequest - (*IngestResponse)(nil), // 3: uber.submitqueue.stovepipe.IngestResponse + (*PingRequest)(nil), // 0: uber.submitqueue.stovepipe.PingRequest + (*PingResponse)(nil), // 1: uber.submitqueue.stovepipe.PingResponse + (*IngestRequest)(nil), // 2: uber.submitqueue.stovepipe.IngestRequest + (*IngestResponse)(nil), // 3: uber.submitqueue.stovepipe.IngestResponse + (*GetRequestHistoryByIDRequest)(nil), // 4: uber.submitqueue.stovepipe.GetRequestHistoryByIDRequest + (*GetRequestHistoryByURIRequest)(nil), // 5: uber.submitqueue.stovepipe.GetRequestHistoryByURIRequest + (*HistoryEvent)(nil), // 6: uber.submitqueue.stovepipe.HistoryEvent + (*RequestHistory)(nil), // 7: uber.submitqueue.stovepipe.RequestHistory + (*GetRequestHistoryByIDResponse)(nil), // 8: uber.submitqueue.stovepipe.GetRequestHistoryByIDResponse + (*GetRequestHistoryByURIResponse)(nil), // 9: uber.submitqueue.stovepipe.GetRequestHistoryByURIResponse } var file_stovepipe_proto_depIdxs = []int32{ - 0, // 0: uber.submitqueue.stovepipe.Stovepipe.Ping:input_type -> uber.submitqueue.stovepipe.PingRequest - 2, // 1: uber.submitqueue.stovepipe.Stovepipe.Ingest:input_type -> uber.submitqueue.stovepipe.IngestRequest - 1, // 2: uber.submitqueue.stovepipe.Stovepipe.Ping:output_type -> uber.submitqueue.stovepipe.PingResponse - 3, // 3: uber.submitqueue.stovepipe.Stovepipe.Ingest:output_type -> uber.submitqueue.stovepipe.IngestResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 6, // 0: uber.submitqueue.stovepipe.RequestHistory.events:type_name -> uber.submitqueue.stovepipe.HistoryEvent + 6, // 1: uber.submitqueue.stovepipe.GetRequestHistoryByIDResponse.events:type_name -> uber.submitqueue.stovepipe.HistoryEvent + 7, // 2: uber.submitqueue.stovepipe.GetRequestHistoryByURIResponse.histories:type_name -> uber.submitqueue.stovepipe.RequestHistory + 0, // 3: uber.submitqueue.stovepipe.Stovepipe.Ping:input_type -> uber.submitqueue.stovepipe.PingRequest + 2, // 4: uber.submitqueue.stovepipe.Stovepipe.Ingest:input_type -> uber.submitqueue.stovepipe.IngestRequest + 4, // 5: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByID:input_type -> uber.submitqueue.stovepipe.GetRequestHistoryByIDRequest + 5, // 6: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByURI:input_type -> uber.submitqueue.stovepipe.GetRequestHistoryByURIRequest + 1, // 7: uber.submitqueue.stovepipe.Stovepipe.Ping:output_type -> uber.submitqueue.stovepipe.PingResponse + 3, // 8: uber.submitqueue.stovepipe.Stovepipe.Ingest:output_type -> uber.submitqueue.stovepipe.IngestResponse + 8, // 9: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByID:output_type -> uber.submitqueue.stovepipe.GetRequestHistoryByIDResponse + 9, // 10: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByURI:output_type -> uber.submitqueue.stovepipe.GetRequestHistoryByURIResponse + 7, // [7:11] is the sub-list for method output_type + 3, // [3:7] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_stovepipe_proto_init() } @@ -307,13 +736,17 @@ func file_stovepipe_proto_init() { if File_stovepipe_proto != nil { return } + file_stovepipe_proto_msgTypes[6].OneofWrappers = []any{ + (*HistoryEvent_RequestState)(nil), + (*HistoryEvent_Event)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_stovepipe_proto_rawDesc), len(file_stovepipe_proto_rawDesc)), NumEnums: 0, - NumMessages: 4, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/api/stovepipe/protopb/stovepipe.pb.yarpc.go b/api/stovepipe/protopb/stovepipe.pb.yarpc.go index ad6fe9eb5..21d15d13d 100644 --- a/api/stovepipe/protopb/stovepipe.pb.yarpc.go +++ b/api/stovepipe/protopb/stovepipe.pb.yarpc.go @@ -23,6 +23,8 @@ var _ = ioutil.NopCloser type StovepipeYARPCClient interface { Ping(context.Context, *PingRequest, ...yarpc.CallOption) (*PingResponse, error) Ingest(context.Context, *IngestRequest, ...yarpc.CallOption) (*IngestResponse, error) + GetRequestHistoryByID(context.Context, *GetRequestHistoryByIDRequest, ...yarpc.CallOption) (*GetRequestHistoryByIDResponse, error) + GetRequestHistoryByURI(context.Context, *GetRequestHistoryByURIRequest, ...yarpc.CallOption) (*GetRequestHistoryByURIResponse, error) } func newStovepipeYARPCClient(clientConfig transport.ClientConfig, anyResolver v2.AnyResolver, options ...v2.ClientOption) StovepipeYARPCClient { @@ -45,6 +47,8 @@ func NewStovepipeYARPCClient(clientConfig transport.ClientConfig, options ...v2. type StovepipeYARPCServer interface { Ping(context.Context, *PingRequest) (*PingResponse, error) Ingest(context.Context, *IngestRequest) (*IngestResponse, error) + GetRequestHistoryByID(context.Context, *GetRequestHistoryByIDRequest) (*GetRequestHistoryByIDResponse, error) + GetRequestHistoryByURI(context.Context, *GetRequestHistoryByURIRequest) (*GetRequestHistoryByURIResponse, error) } type buildStovepipeYARPCProceduresParams struct { @@ -78,6 +82,26 @@ func buildStovepipeYARPCProcedures(params buildStovepipeYARPCProceduresParams) [ }, ), }, + { + MethodName: "GetRequestHistoryByID", + Handler: v2.NewUnaryHandler( + v2.UnaryHandlerParams{ + Handle: handler.GetRequestHistoryByID, + NewRequest: newStovepipeServiceGetRequestHistoryByIDYARPCRequest, + AnyResolver: params.AnyResolver, + }, + ), + }, + { + MethodName: "GetRequestHistoryByURI", + Handler: v2.NewUnaryHandler( + v2.UnaryHandlerParams{ + Handle: handler.GetRequestHistoryByURI, + NewRequest: newStovepipeServiceGetRequestHistoryByURIYARPCRequest, + AnyResolver: params.AnyResolver, + }, + ), + }, }, OnewayHandlerParams: []v2.BuildProceduresOnewayHandlerParams{}, StreamHandlerParams: []v2.BuildProceduresStreamHandlerParams{}, @@ -214,6 +238,30 @@ func (c *_StovepipeYARPCCaller) Ingest(ctx context.Context, request *IngestReque return response, err } +func (c *_StovepipeYARPCCaller) GetRequestHistoryByID(ctx context.Context, request *GetRequestHistoryByIDRequest, options ...yarpc.CallOption) (*GetRequestHistoryByIDResponse, error) { + responseMessage, err := c.streamClient.Call(ctx, "GetRequestHistoryByID", request, newStovepipeServiceGetRequestHistoryByIDYARPCResponse, options...) + if responseMessage == nil { + return nil, err + } + response, ok := responseMessage.(*GetRequestHistoryByIDResponse) + if !ok { + return nil, v2.CastError(emptyStovepipeServiceGetRequestHistoryByIDYARPCResponse, responseMessage) + } + return response, err +} + +func (c *_StovepipeYARPCCaller) GetRequestHistoryByURI(ctx context.Context, request *GetRequestHistoryByURIRequest, options ...yarpc.CallOption) (*GetRequestHistoryByURIResponse, error) { + responseMessage, err := c.streamClient.Call(ctx, "GetRequestHistoryByURI", request, newStovepipeServiceGetRequestHistoryByURIYARPCResponse, options...) + if responseMessage == nil { + return nil, err + } + response, ok := responseMessage.(*GetRequestHistoryByURIResponse) + if !ok { + return nil, v2.CastError(emptyStovepipeServiceGetRequestHistoryByURIYARPCResponse, responseMessage) + } + return response, err +} + type _StovepipeYARPCHandler struct { server StovepipeYARPCServer } @@ -250,6 +298,38 @@ func (h *_StovepipeYARPCHandler) Ingest(ctx context.Context, requestMessage prot return response, err } +func (h *_StovepipeYARPCHandler) GetRequestHistoryByID(ctx context.Context, requestMessage proto.Message) (proto.Message, error) { + var request *GetRequestHistoryByIDRequest + var ok bool + if requestMessage != nil { + request, ok = requestMessage.(*GetRequestHistoryByIDRequest) + if !ok { + return nil, v2.CastError(emptyStovepipeServiceGetRequestHistoryByIDYARPCRequest, requestMessage) + } + } + response, err := h.server.GetRequestHistoryByID(ctx, request) + if response == nil { + return nil, err + } + return response, err +} + +func (h *_StovepipeYARPCHandler) GetRequestHistoryByURI(ctx context.Context, requestMessage proto.Message) (proto.Message, error) { + var request *GetRequestHistoryByURIRequest + var ok bool + if requestMessage != nil { + request, ok = requestMessage.(*GetRequestHistoryByURIRequest) + if !ok { + return nil, v2.CastError(emptyStovepipeServiceGetRequestHistoryByURIYARPCRequest, requestMessage) + } + } + response, err := h.server.GetRequestHistoryByURI(ctx, request) + if response == nil { + return nil, err + } + return response, err +} + func newStovepipeServicePingYARPCRequest() proto.Message { return &PingRequest{} } @@ -266,36 +346,75 @@ func newStovepipeServiceIngestYARPCResponse() proto.Message { return &IngestResponse{} } +func newStovepipeServiceGetRequestHistoryByIDYARPCRequest() proto.Message { + return &GetRequestHistoryByIDRequest{} +} + +func newStovepipeServiceGetRequestHistoryByIDYARPCResponse() proto.Message { + return &GetRequestHistoryByIDResponse{} +} + +func newStovepipeServiceGetRequestHistoryByURIYARPCRequest() proto.Message { + return &GetRequestHistoryByURIRequest{} +} + +func newStovepipeServiceGetRequestHistoryByURIYARPCResponse() proto.Message { + return &GetRequestHistoryByURIResponse{} +} + var ( - emptyStovepipeServicePingYARPCRequest = &PingRequest{} - emptyStovepipeServicePingYARPCResponse = &PingResponse{} - emptyStovepipeServiceIngestYARPCRequest = &IngestRequest{} - emptyStovepipeServiceIngestYARPCResponse = &IngestResponse{} + emptyStovepipeServicePingYARPCRequest = &PingRequest{} + emptyStovepipeServicePingYARPCResponse = &PingResponse{} + emptyStovepipeServiceIngestYARPCRequest = &IngestRequest{} + emptyStovepipeServiceIngestYARPCResponse = &IngestResponse{} + emptyStovepipeServiceGetRequestHistoryByIDYARPCRequest = &GetRequestHistoryByIDRequest{} + emptyStovepipeServiceGetRequestHistoryByIDYARPCResponse = &GetRequestHistoryByIDResponse{} + emptyStovepipeServiceGetRequestHistoryByURIYARPCRequest = &GetRequestHistoryByURIRequest{} + emptyStovepipeServiceGetRequestHistoryByURIYARPCResponse = &GetRequestHistoryByURIResponse{} ) var yarpcFileDescriptorClosurefabdb6b3c0b09022 = [][]byte{ // stovepipe.proto []byte{ - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4f, 0x4e, 0xf3, 0x30, - 0x10, 0xc5, 0x3f, 0xb7, 0xfd, 0x0a, 0x9d, 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1, 0x6e, 0x44, 0x3d, - 0xb1, 0x7e, 0xf8, 0x24, 0x30, 0x7a, 0x69, 0xf7, 0x40, 0xdf, 0x60, 0x50, 0xa5, 0xa3, 0x73, 0x76, - 0x78, 0x59, 0x6c, 0x6f, 0x53, 0xe1, 0xe2, 0x77, 0x61, 0x3d, 0x38, 0xfa, 0x47, 0x39, 0x0c, 0x6b, - 0x33, 0xf4, 0xf6, 0x18, 0xf5, 0x23, 0x57, 0x78, 0xf7, 0x17, 0x69, 0x3b, 0x62, 0x89, 0x70, 0x95, - 0x29, 0x79, 0x04, 0x59, 0x4e, 0xbb, 0xb0, 0xab, 0xea, 0x2a, 0x56, 0xe4, 0xf5, 0x3e, 0x17, 0x76, - 0xe3, 0x52, 0x96, 0x29, 0x19, 0x57, 0x60, 0xbc, 0x07, 0xc6, 0x5c, 0x8b, 0xb8, 0x83, 0x63, 0x7f, - 0x48, 0x3a, 0x4d, 0x87, 0xfe, 0xf1, 0xf8, 0x15, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x6e, 0x43, 0xbc, - 0x64, 0x02, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4f, 0x6f, 0xd3, 0x4e, + 0x10, 0xad, 0xe3, 0x36, 0xad, 0x27, 0x69, 0x7e, 0x3f, 0xad, 0x68, 0x65, 0xac, 0xb6, 0x2a, 0x96, + 0xaa, 0x86, 0x1e, 0x1c, 0x51, 0x0e, 0xfc, 0x39, 0xa1, 0x08, 0xd4, 0xf8, 0x00, 0xaa, 0x5c, 0x71, + 0x81, 0x83, 0xe5, 0x3f, 0xa3, 0x74, 0x11, 0xf6, 0xba, 0xde, 0x75, 0xa5, 0x7c, 0x00, 0xae, 0x48, + 0x48, 0x7c, 0x50, 0x3e, 0x02, 0xf2, 0x7a, 0xed, 0x24, 0x55, 0x62, 0x20, 0x37, 0xcf, 0xf8, 0xbd, + 0x37, 0x6f, 0x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, + 0x8b, 0x35, 0x2f, 0xa1, 0x6d, 0x58, 0xe2, 0x0b, 0x9c, 0xac, 0xbb, 0x35, 0xaa, 0xc6, 0x04, 0x8c, + 0x5b, 0x99, 0xa7, 0x58, 0x97, 0xb9, 0x68, 0x2b, 0xb3, 0xac, 0xe5, 0xcd, 0xc9, 0x97, 0xbf, 0x74, + 0x30, 0x6e, 0x6a, 0x1c, 0xf9, 0x0c, 0xdb, 0xe5, 0x52, 0x93, 0xf3, 0x36, 0xb1, 0x85, 0x0f, 0x84, + 0x35, 0xfc, 0x33, 0xb0, 0xb2, 0x6c, 0x6f, 0x91, 0x00, 0xba, 0xd5, 0x0e, 0x92, 0xa7, 0x6d, 0xac, + 0xa5, 0x75, 0xb6, 0x2e, 0xfe, 0x06, 0xda, 0x94, 0xf8, 0xae, 0xc1, 0xc1, 0xca, 0xe9, 0x90, 0x97, + 0x6d, 0x3a, 0x6d, 0x8b, 0x6f, 0xbd, 0xda, 0x80, 0xd9, 0x18, 0xfa, 0xa1, 0xc1, 0xe1, 0xea, 0x59, + 0x92, 0x7f, 0xd5, 0x9d, 0x7f, 0x35, 0xac, 0xd7, 0x9b, 0x50, 0x6b, 0x4f, 0x63, 0x84, 0x93, 0x88, + 0x25, 0x2d, 0x12, 0xe3, 0x41, 0x73, 0x23, 0xae, 0xcb, 0x3f, 0xc6, 0xb5, 0xf6, 0xe9, 0xd9, 0x94, + 0x8a, 0xdb, 0x22, 0x74, 0x22, 0x96, 0x8c, 0x4a, 0xe2, 0x68, 0x81, 0x38, 0x0a, 0x32, 0x3a, 0x6a, + 0xc8, 0x23, 0xf9, 0x93, 0xc9, 0xc2, 0xb0, 0x2b, 0x1f, 0x9e, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, + 0x91, 0x90, 0xfc, 0xc7, 0x80, 0x06, 0x00, 0x00, }, } diff --git a/api/stovepipe/protopb/stovepipe_grpc.pb.go b/api/stovepipe/protopb/stovepipe_grpc.pb.go index ec4f58a47..3387135f6 100644 --- a/api/stovepipe/protopb/stovepipe_grpc.pb.go +++ b/api/stovepipe/protopb/stovepipe_grpc.pb.go @@ -34,8 +34,10 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - Stovepipe_Ping_FullMethodName = "/uber.submitqueue.stovepipe.Stovepipe/Ping" - Stovepipe_Ingest_FullMethodName = "/uber.submitqueue.stovepipe.Stovepipe/Ingest" + Stovepipe_Ping_FullMethodName = "/uber.submitqueue.stovepipe.Stovepipe/Ping" + Stovepipe_Ingest_FullMethodName = "/uber.submitqueue.stovepipe.Stovepipe/Ingest" + Stovepipe_GetRequestHistoryByID_FullMethodName = "/uber.submitqueue.stovepipe.Stovepipe/GetRequestHistoryByID" + Stovepipe_GetRequestHistoryByURI_FullMethodName = "/uber.submitqueue.stovepipe.Stovepipe/GetRequestHistoryByURI" ) // StovepipeClient is the client API for Stovepipe service. @@ -49,6 +51,10 @@ type StovepipeClient interface { // Ingest admits a queue's newly observed commit into the validation pipeline and returns // the minted request ID. The caller hands off asynchronously; validation happens later. Ingest(ctx context.Context, in *IngestRequest, opts ...grpc.CallOption) (*IngestResponse, error) + // GetRequestHistoryByID returns retained history for one request ID. + GetRequestHistoryByID(ctx context.Context, in *GetRequestHistoryByIDRequest, opts ...grpc.CallOption) (*GetRequestHistoryByIDResponse, error) + // GetRequestHistoryByURI returns retained histories for an exact commit URI. + GetRequestHistoryByURI(ctx context.Context, in *GetRequestHistoryByURIRequest, opts ...grpc.CallOption) (*GetRequestHistoryByURIResponse, error) } type stovepipeClient struct { @@ -79,6 +85,26 @@ func (c *stovepipeClient) Ingest(ctx context.Context, in *IngestRequest, opts .. return out, nil } +func (c *stovepipeClient) GetRequestHistoryByID(ctx context.Context, in *GetRequestHistoryByIDRequest, opts ...grpc.CallOption) (*GetRequestHistoryByIDResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetRequestHistoryByIDResponse) + err := c.cc.Invoke(ctx, Stovepipe_GetRequestHistoryByID_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *stovepipeClient) GetRequestHistoryByURI(ctx context.Context, in *GetRequestHistoryByURIRequest, opts ...grpc.CallOption) (*GetRequestHistoryByURIResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetRequestHistoryByURIResponse) + err := c.cc.Invoke(ctx, Stovepipe_GetRequestHistoryByURI_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // StovepipeServer is the server API for Stovepipe service. // All implementations must embed UnimplementedStovepipeServer // for forward compatibility. @@ -90,6 +116,10 @@ type StovepipeServer interface { // Ingest admits a queue's newly observed commit into the validation pipeline and returns // the minted request ID. The caller hands off asynchronously; validation happens later. Ingest(context.Context, *IngestRequest) (*IngestResponse, error) + // GetRequestHistoryByID returns retained history for one request ID. + GetRequestHistoryByID(context.Context, *GetRequestHistoryByIDRequest) (*GetRequestHistoryByIDResponse, error) + // GetRequestHistoryByURI returns retained histories for an exact commit URI. + GetRequestHistoryByURI(context.Context, *GetRequestHistoryByURIRequest) (*GetRequestHistoryByURIResponse, error) mustEmbedUnimplementedStovepipeServer() } @@ -106,6 +136,12 @@ func (UnimplementedStovepipeServer) Ping(context.Context, *PingRequest) (*PingRe func (UnimplementedStovepipeServer) Ingest(context.Context, *IngestRequest) (*IngestResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Ingest not implemented") } +func (UnimplementedStovepipeServer) GetRequestHistoryByID(context.Context, *GetRequestHistoryByIDRequest) (*GetRequestHistoryByIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRequestHistoryByID not implemented") +} +func (UnimplementedStovepipeServer) GetRequestHistoryByURI(context.Context, *GetRequestHistoryByURIRequest) (*GetRequestHistoryByURIResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRequestHistoryByURI not implemented") +} func (UnimplementedStovepipeServer) mustEmbedUnimplementedStovepipeServer() {} func (UnimplementedStovepipeServer) testEmbeddedByValue() {} @@ -163,6 +199,42 @@ func _Stovepipe_Ingest_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Stovepipe_GetRequestHistoryByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRequestHistoryByIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StovepipeServer).GetRequestHistoryByID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Stovepipe_GetRequestHistoryByID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StovepipeServer).GetRequestHistoryByID(ctx, req.(*GetRequestHistoryByIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Stovepipe_GetRequestHistoryByURI_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRequestHistoryByURIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StovepipeServer).GetRequestHistoryByURI(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Stovepipe_GetRequestHistoryByURI_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StovepipeServer).GetRequestHistoryByURI(ctx, req.(*GetRequestHistoryByURIRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Stovepipe_ServiceDesc is the grpc.ServiceDesc for Stovepipe service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -178,6 +250,14 @@ var Stovepipe_ServiceDesc = grpc.ServiceDesc{ MethodName: "Ingest", Handler: _Stovepipe_Ingest_Handler, }, + { + MethodName: "GetRequestHistoryByID", + Handler: _Stovepipe_GetRequestHistoryByID_Handler, + }, + { + MethodName: "GetRequestHistoryByURI", + Handler: _Stovepipe_GetRequestHistoryByURI_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "stovepipe.proto",