diff --git a/api/stovepipe/proto/stovepipe.proto b/api/stovepipe/proto/stovepipe.proto index b403ab653..6c6ca2b73 100644 --- a/api/stovepipe/proto/stovepipe.proto +++ b/api/stovepipe/proto/stovepipe.proto @@ -157,6 +157,53 @@ message GetProjectStatusByURIResponse { string next_page_token = 9; } +// RequestSummary contains one request's current materialized lifecycle state. +message RequestSummary { + // Opaque identifier returned from Ingest. + string request_id = 1; + // Queue containing the request. + string queue = 2; + // Exact VCS-agnostic URI of the ingested commit. + string change_uri = 3; + // Selected baseline URI. Empty before selection or for a full build. + string base_uri = 4; + // Stable public lifecycle state; clients tolerate future values. + string request_state = 5; + // Unix millisecond timestamp of the represented state entry. + int64 state_updated_at_ms = 6; + // Original retained accepted-log timestamp in Unix milliseconds; positive when known, zero if unknown. + int64 accepted_at_ms = 7; + // Stable reason for the represented state. Empty when unavailable or inapplicable. + string outcome_reason = 8; +} + +// ListRequest selects a page of retained request summaries for one queue. +message ListRequest { + // Required configured queue. + string queue = 1; + oneof accepted_lower_bound { + // Inclusive Unix millisecond bound; omitted defaults to zero. + int64 accepted_at_or_after_ms = 2; + } + oneof accepted_upper_bound { + // Exclusive Unix millisecond bound; omitted defaults to server now. + int64 accepted_before_ms = 3; + } + // Zero selects 50; nonzero values must be between 1 and 200. + int32 page_size = 4; + // Opaque continuation token bound to the queue and resolved time bounds. + string page_token = 5; +} + +// ListResponse contains a page in acceptance-time order, not a snapshot across pages. +message ListResponse { + // Current summaries ordered by acceptance time descending, then bytewise request ID descending. + // Requests with accepted_at_ms = 0 (unknown) are excluded. + repeated RequestSummary requests = 1; + // Opaque continuation token; empty when no further row was observed. + string next_page_token = 2; +} + // Stovepipe provides the Stovepipe API. service Stovepipe { // Ping returns a response indicating the service is alive @@ -170,4 +217,6 @@ service Stovepipe { rpc GetRequestHistoryByURI(GetRequestHistoryByURIRequest) returns (GetRequestHistoryByURIResponse) {} // GetProjectStatusByURI returns the current validation status for an exact commit URI. rpc GetProjectStatusByURI(GetProjectStatusByURIRequest) returns (GetProjectStatusByURIResponse) {} + // List returns a queue-scoped page of current request summaries. + rpc List(ListRequest) returns (ListResponse) {} } diff --git a/api/stovepipe/protopb/stovepipe.pb.go b/api/stovepipe/protopb/stovepipe.pb.go index da2a7b420..5ff9013ce 100644 --- a/api/stovepipe/protopb/stovepipe.pb.go +++ b/api/stovepipe/protopb/stovepipe.pb.go @@ -932,6 +932,297 @@ type GetProjectStatusByURIResponse_RepositoryBreakageDegree struct { func (*GetProjectStatusByURIResponse_RepositoryBreakageDegree) isGetProjectStatusByURIResponse_RepositoryResult() { } +// RequestSummary contains one request's current materialized lifecycle state. +type RequestSummary struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Opaque identifier returned from Ingest. + RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Queue containing the request. + Queue string `protobuf:"bytes,2,opt,name=queue,proto3" json:"queue,omitempty"` + // Exact VCS-agnostic URI of the ingested commit. + ChangeUri string `protobuf:"bytes,3,opt,name=change_uri,json=changeUri,proto3" json:"change_uri,omitempty"` + // Selected baseline URI. Empty before selection or for a full build. + BaseUri string `protobuf:"bytes,4,opt,name=base_uri,json=baseUri,proto3" json:"base_uri,omitempty"` + // Stable public lifecycle state; clients tolerate future values. + RequestState string `protobuf:"bytes,5,opt,name=request_state,json=requestState,proto3" json:"request_state,omitempty"` + // Unix millisecond timestamp of the represented state entry. + StateUpdatedAtMs int64 `protobuf:"varint,6,opt,name=state_updated_at_ms,json=stateUpdatedAtMs,proto3" json:"state_updated_at_ms,omitempty"` + // Original retained accepted-log timestamp in Unix milliseconds; positive when known, zero if unknown. + AcceptedAtMs int64 `protobuf:"varint,7,opt,name=accepted_at_ms,json=acceptedAtMs,proto3" json:"accepted_at_ms,omitempty"` + // Stable reason for the represented state. Empty when unavailable or inapplicable. + OutcomeReason string `protobuf:"bytes,8,opt,name=outcome_reason,json=outcomeReason,proto3" json:"outcome_reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequestSummary) Reset() { + *x = RequestSummary{} + mi := &file_stovepipe_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestSummary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestSummary) ProtoMessage() {} + +func (x *RequestSummary) ProtoReflect() protoreflect.Message { + mi := &file_stovepipe_proto_msgTypes[13] + 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 RequestSummary.ProtoReflect.Descriptor instead. +func (*RequestSummary) Descriptor() ([]byte, []int) { + return file_stovepipe_proto_rawDescGZIP(), []int{13} +} + +func (x *RequestSummary) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *RequestSummary) GetQueue() string { + if x != nil { + return x.Queue + } + return "" +} + +func (x *RequestSummary) GetChangeUri() string { + if x != nil { + return x.ChangeUri + } + return "" +} + +func (x *RequestSummary) GetBaseUri() string { + if x != nil { + return x.BaseUri + } + return "" +} + +func (x *RequestSummary) GetRequestState() string { + if x != nil { + return x.RequestState + } + return "" +} + +func (x *RequestSummary) GetStateUpdatedAtMs() int64 { + if x != nil { + return x.StateUpdatedAtMs + } + return 0 +} + +func (x *RequestSummary) GetAcceptedAtMs() int64 { + if x != nil { + return x.AcceptedAtMs + } + return 0 +} + +func (x *RequestSummary) GetOutcomeReason() string { + if x != nil { + return x.OutcomeReason + } + return "" +} + +// ListRequest selects a page of retained request summaries for one queue. +type ListRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Required configured queue. + Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` + // Types that are valid to be assigned to AcceptedLowerBound: + // + // *ListRequest_AcceptedAtOrAfterMs + AcceptedLowerBound isListRequest_AcceptedLowerBound `protobuf_oneof:"accepted_lower_bound"` + // Types that are valid to be assigned to AcceptedUpperBound: + // + // *ListRequest_AcceptedBeforeMs + AcceptedUpperBound isListRequest_AcceptedUpperBound `protobuf_oneof:"accepted_upper_bound"` + // Zero selects 50; nonzero values must be between 1 and 200. + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Opaque continuation token bound to the queue and resolved time bounds. + PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRequest) Reset() { + *x = ListRequest{} + mi := &file_stovepipe_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRequest) ProtoMessage() {} + +func (x *ListRequest) ProtoReflect() protoreflect.Message { + mi := &file_stovepipe_proto_msgTypes[14] + 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 ListRequest.ProtoReflect.Descriptor instead. +func (*ListRequest) Descriptor() ([]byte, []int) { + return file_stovepipe_proto_rawDescGZIP(), []int{14} +} + +func (x *ListRequest) GetQueue() string { + if x != nil { + return x.Queue + } + return "" +} + +func (x *ListRequest) GetAcceptedLowerBound() isListRequest_AcceptedLowerBound { + if x != nil { + return x.AcceptedLowerBound + } + return nil +} + +func (x *ListRequest) GetAcceptedAtOrAfterMs() int64 { + if x != nil { + if x, ok := x.AcceptedLowerBound.(*ListRequest_AcceptedAtOrAfterMs); ok { + return x.AcceptedAtOrAfterMs + } + } + return 0 +} + +func (x *ListRequest) GetAcceptedUpperBound() isListRequest_AcceptedUpperBound { + if x != nil { + return x.AcceptedUpperBound + } + return nil +} + +func (x *ListRequest) GetAcceptedBeforeMs() int64 { + if x != nil { + if x, ok := x.AcceptedUpperBound.(*ListRequest_AcceptedBeforeMs); ok { + return x.AcceptedBeforeMs + } + } + return 0 +} + +func (x *ListRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type isListRequest_AcceptedLowerBound interface { + isListRequest_AcceptedLowerBound() +} + +type ListRequest_AcceptedAtOrAfterMs struct { + // Inclusive Unix millisecond bound; omitted defaults to zero. + AcceptedAtOrAfterMs int64 `protobuf:"varint,2,opt,name=accepted_at_or_after_ms,json=acceptedAtOrAfterMs,proto3,oneof"` +} + +func (*ListRequest_AcceptedAtOrAfterMs) isListRequest_AcceptedLowerBound() {} + +type isListRequest_AcceptedUpperBound interface { + isListRequest_AcceptedUpperBound() +} + +type ListRequest_AcceptedBeforeMs struct { + // Exclusive Unix millisecond bound; omitted defaults to server now. + AcceptedBeforeMs int64 `protobuf:"varint,3,opt,name=accepted_before_ms,json=acceptedBeforeMs,proto3,oneof"` +} + +func (*ListRequest_AcceptedBeforeMs) isListRequest_AcceptedUpperBound() {} + +// ListResponse contains a page in acceptance-time order, not a snapshot across pages. +type ListResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Current summaries ordered by acceptance time descending, then bytewise request ID descending. + // Requests with accepted_at_ms = 0 (unknown) are excluded. + Requests []*RequestSummary `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` + // Opaque continuation token; empty when no further row was observed. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListResponse) Reset() { + *x = ListResponse{} + mi := &file_stovepipe_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListResponse) ProtoMessage() {} + +func (x *ListResponse) ProtoReflect() protoreflect.Message { + mi := &file_stovepipe_proto_msgTypes[15] + 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 ListResponse.ProtoReflect.Descriptor instead. +func (*ListResponse) Descriptor() ([]byte, []int) { + return file_stovepipe_proto_rawDescGZIP(), []int{15} +} + +func (x *ListResponse) GetRequests() []*RequestSummary { + if x != nil { + return x.Requests + } + return nil +} + +func (x *ListResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + var File_stovepipe_proto protoreflect.FileDescriptor const file_stovepipe_proto_rawDesc = "" + @@ -997,13 +1288,37 @@ const file_stovepipe_proto_rawDesc = "" + "\x18project_results_complete\x18\a \x01(\bR\x16projectResultsComplete\x12I\n" + "\bprojects\x18\b \x03(\v2-.uber.submitqueue.stovepipe.ProjectValidationR\bprojects\x12&\n" + "\x0fnext_page_token\x18\t \x01(\tR\rnextPageTokenB\x13\n" + - "\x11repository_result2\x81\x05\n" + + "\x11repository_result\"\xa0\x02\n" + + "\x0eRequestSummary\x12\x1d\n" + + "\n" + + "request_id\x18\x01 \x01(\tR\trequestId\x12\x14\n" + + "\x05queue\x18\x02 \x01(\tR\x05queue\x12\x1d\n" + + "\n" + + "change_uri\x18\x03 \x01(\tR\tchangeUri\x12\x19\n" + + "\bbase_uri\x18\x04 \x01(\tR\abaseUri\x12#\n" + + "\rrequest_state\x18\x05 \x01(\tR\frequestState\x12-\n" + + "\x13state_updated_at_ms\x18\x06 \x01(\x03R\x10stateUpdatedAtMs\x12$\n" + + "\x0eaccepted_at_ms\x18\a \x01(\x03R\facceptedAtMs\x12%\n" + + "\x0eoutcome_reason\x18\b \x01(\tR\routcomeReason\"\xf7\x01\n" + + "\vListRequest\x12\x14\n" + + "\x05queue\x18\x01 \x01(\tR\x05queue\x126\n" + + "\x17accepted_at_or_after_ms\x18\x02 \x01(\x03H\x00R\x13acceptedAtOrAfterMs\x12.\n" + + "\x12accepted_before_ms\x18\x03 \x01(\x03H\x01R\x10acceptedBeforeMs\x12\x1b\n" + + "\tpage_size\x18\x04 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x05 \x01(\tR\tpageTokenB\x16\n" + + "\x14accepted_lower_boundB\x16\n" + + "\x14accepted_upper_bound\"~\n" + + "\fListResponse\x12F\n" + + "\brequests\x18\x01 \x03(\v2*.uber.submitqueue.stovepipe.RequestSummaryR\brequests\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken2\xde\x05\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\"\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\"\x00\x12\x8e\x01\n" + - "\x15GetProjectStatusByURI\x128.uber.submitqueue.stovepipe.GetProjectStatusByURIRequest\x1a9.uber.submitqueue.stovepipe.GetProjectStatusByURIResponse\"\x00Be\n" + + "\x15GetProjectStatusByURI\x128.uber.submitqueue.stovepipe.GetProjectStatusByURIRequest\x1a9.uber.submitqueue.stovepipe.GetProjectStatusByURIResponse\"\x00\x12[\n" + + "\x04List\x12'.uber.submitqueue.stovepipe.ListRequest\x1a(.uber.submitqueue.stovepipe.ListResponse\"\x00Be\n" + "\x1ecom.uber.submitqueue.stovepipeB\x0eStovepipeProtoP\x01Z1github.com/uber/submitqueue/api/stovepipe/protopbb\x06proto3" var ( @@ -1018,7 +1333,7 @@ func file_stovepipe_proto_rawDescGZIP() []byte { return file_stovepipe_proto_rawDescData } -var file_stovepipe_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_stovepipe_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_stovepipe_proto_goTypes = []any{ (*PingRequest)(nil), // 0: uber.submitqueue.stovepipe.PingRequest (*PingResponse)(nil), // 1: uber.submitqueue.stovepipe.PingResponse @@ -1033,27 +1348,33 @@ var file_stovepipe_proto_goTypes = []any{ (*GetProjectStatusByURIRequest)(nil), // 10: uber.submitqueue.stovepipe.GetProjectStatusByURIRequest (*ProjectValidation)(nil), // 11: uber.submitqueue.stovepipe.ProjectValidation (*GetProjectStatusByURIResponse)(nil), // 12: uber.submitqueue.stovepipe.GetProjectStatusByURIResponse + (*RequestSummary)(nil), // 13: uber.submitqueue.stovepipe.RequestSummary + (*ListRequest)(nil), // 14: uber.submitqueue.stovepipe.ListRequest + (*ListResponse)(nil), // 15: uber.submitqueue.stovepipe.ListResponse } var file_stovepipe_proto_depIdxs = []int32{ 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 11, // 3: uber.submitqueue.stovepipe.GetProjectStatusByURIResponse.projects:type_name -> uber.submitqueue.stovepipe.ProjectValidation - 0, // 4: uber.submitqueue.stovepipe.Stovepipe.Ping:input_type -> uber.submitqueue.stovepipe.PingRequest - 2, // 5: uber.submitqueue.stovepipe.Stovepipe.Ingest:input_type -> uber.submitqueue.stovepipe.IngestRequest - 4, // 6: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByID:input_type -> uber.submitqueue.stovepipe.GetRequestHistoryByIDRequest - 5, // 7: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByURI:input_type -> uber.submitqueue.stovepipe.GetRequestHistoryByURIRequest - 10, // 8: uber.submitqueue.stovepipe.Stovepipe.GetProjectStatusByURI:input_type -> uber.submitqueue.stovepipe.GetProjectStatusByURIRequest - 1, // 9: uber.submitqueue.stovepipe.Stovepipe.Ping:output_type -> uber.submitqueue.stovepipe.PingResponse - 3, // 10: uber.submitqueue.stovepipe.Stovepipe.Ingest:output_type -> uber.submitqueue.stovepipe.IngestResponse - 8, // 11: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByID:output_type -> uber.submitqueue.stovepipe.GetRequestHistoryByIDResponse - 9, // 12: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByURI:output_type -> uber.submitqueue.stovepipe.GetRequestHistoryByURIResponse - 12, // 13: uber.submitqueue.stovepipe.Stovepipe.GetProjectStatusByURI:output_type -> uber.submitqueue.stovepipe.GetProjectStatusByURIResponse - 9, // [9:14] is the sub-list for method output_type - 4, // [4:9] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 13, // 4: uber.submitqueue.stovepipe.ListResponse.requests:type_name -> uber.submitqueue.stovepipe.RequestSummary + 0, // 5: uber.submitqueue.stovepipe.Stovepipe.Ping:input_type -> uber.submitqueue.stovepipe.PingRequest + 2, // 6: uber.submitqueue.stovepipe.Stovepipe.Ingest:input_type -> uber.submitqueue.stovepipe.IngestRequest + 4, // 7: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByID:input_type -> uber.submitqueue.stovepipe.GetRequestHistoryByIDRequest + 5, // 8: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByURI:input_type -> uber.submitqueue.stovepipe.GetRequestHistoryByURIRequest + 10, // 9: uber.submitqueue.stovepipe.Stovepipe.GetProjectStatusByURI:input_type -> uber.submitqueue.stovepipe.GetProjectStatusByURIRequest + 14, // 10: uber.submitqueue.stovepipe.Stovepipe.List:input_type -> uber.submitqueue.stovepipe.ListRequest + 1, // 11: uber.submitqueue.stovepipe.Stovepipe.Ping:output_type -> uber.submitqueue.stovepipe.PingResponse + 3, // 12: uber.submitqueue.stovepipe.Stovepipe.Ingest:output_type -> uber.submitqueue.stovepipe.IngestResponse + 8, // 13: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByID:output_type -> uber.submitqueue.stovepipe.GetRequestHistoryByIDResponse + 9, // 14: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByURI:output_type -> uber.submitqueue.stovepipe.GetRequestHistoryByURIResponse + 12, // 15: uber.submitqueue.stovepipe.Stovepipe.GetProjectStatusByURI:output_type -> uber.submitqueue.stovepipe.GetProjectStatusByURIResponse + 15, // 16: uber.submitqueue.stovepipe.Stovepipe.List:output_type -> uber.submitqueue.stovepipe.ListResponse + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_stovepipe_proto_init() } @@ -1071,13 +1392,17 @@ func file_stovepipe_proto_init() { file_stovepipe_proto_msgTypes[12].OneofWrappers = []any{ (*GetProjectStatusByURIResponse_RepositoryBreakageDegree)(nil), } + file_stovepipe_proto_msgTypes[14].OneofWrappers = []any{ + (*ListRequest_AcceptedAtOrAfterMs)(nil), + (*ListRequest_AcceptedBeforeMs)(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: 13, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/api/stovepipe/protopb/stovepipe.pb.yarpc.go b/api/stovepipe/protopb/stovepipe.pb.yarpc.go index 6ee99feeb..b55bcac99 100644 --- a/api/stovepipe/protopb/stovepipe.pb.yarpc.go +++ b/api/stovepipe/protopb/stovepipe.pb.yarpc.go @@ -26,6 +26,7 @@ type StovepipeYARPCClient interface { GetRequestHistoryByID(context.Context, *GetRequestHistoryByIDRequest, ...yarpc.CallOption) (*GetRequestHistoryByIDResponse, error) GetRequestHistoryByURI(context.Context, *GetRequestHistoryByURIRequest, ...yarpc.CallOption) (*GetRequestHistoryByURIResponse, error) GetProjectStatusByURI(context.Context, *GetProjectStatusByURIRequest, ...yarpc.CallOption) (*GetProjectStatusByURIResponse, error) + List(context.Context, *ListRequest, ...yarpc.CallOption) (*ListResponse, error) } func newStovepipeYARPCClient(clientConfig transport.ClientConfig, anyResolver v2.AnyResolver, options ...v2.ClientOption) StovepipeYARPCClient { @@ -51,6 +52,7 @@ type StovepipeYARPCServer interface { GetRequestHistoryByID(context.Context, *GetRequestHistoryByIDRequest) (*GetRequestHistoryByIDResponse, error) GetRequestHistoryByURI(context.Context, *GetRequestHistoryByURIRequest) (*GetRequestHistoryByURIResponse, error) GetProjectStatusByURI(context.Context, *GetProjectStatusByURIRequest) (*GetProjectStatusByURIResponse, error) + List(context.Context, *ListRequest) (*ListResponse, error) } type buildStovepipeYARPCProceduresParams struct { @@ -114,6 +116,16 @@ func buildStovepipeYARPCProcedures(params buildStovepipeYARPCProceduresParams) [ }, ), }, + { + MethodName: "List", + Handler: v2.NewUnaryHandler( + v2.UnaryHandlerParams{ + Handle: handler.List, + NewRequest: newStovepipeServiceListYARPCRequest, + AnyResolver: params.AnyResolver, + }, + ), + }, }, OnewayHandlerParams: []v2.BuildProceduresOnewayHandlerParams{}, StreamHandlerParams: []v2.BuildProceduresStreamHandlerParams{}, @@ -286,6 +298,18 @@ func (c *_StovepipeYARPCCaller) GetProjectStatusByURI(ctx context.Context, reque return response, err } +func (c *_StovepipeYARPCCaller) List(ctx context.Context, request *ListRequest, options ...yarpc.CallOption) (*ListResponse, error) { + responseMessage, err := c.streamClient.Call(ctx, "List", request, newStovepipeServiceListYARPCResponse, options...) + if responseMessage == nil { + return nil, err + } + response, ok := responseMessage.(*ListResponse) + if !ok { + return nil, v2.CastError(emptyStovepipeServiceListYARPCResponse, responseMessage) + } + return response, err +} + type _StovepipeYARPCHandler struct { server StovepipeYARPCServer } @@ -370,6 +394,22 @@ func (h *_StovepipeYARPCHandler) GetProjectStatusByURI(ctx context.Context, requ return response, err } +func (h *_StovepipeYARPCHandler) List(ctx context.Context, requestMessage proto.Message) (proto.Message, error) { + var request *ListRequest + var ok bool + if requestMessage != nil { + request, ok = requestMessage.(*ListRequest) + if !ok { + return nil, v2.CastError(emptyStovepipeServiceListYARPCRequest, requestMessage) + } + } + response, err := h.server.List(ctx, request) + if response == nil { + return nil, err + } + return response, err +} + func newStovepipeServicePingYARPCRequest() proto.Message { return &PingRequest{} } @@ -410,6 +450,14 @@ func newStovepipeServiceGetProjectStatusByURIYARPCResponse() proto.Message { return &GetProjectStatusByURIResponse{} } +func newStovepipeServiceListYARPCRequest() proto.Message { + return &ListRequest{} +} + +func newStovepipeServiceListYARPCResponse() proto.Message { + return &ListResponse{} +} + var ( emptyStovepipeServicePingYARPCRequest = &PingRequest{} emptyStovepipeServicePingYARPCResponse = &PingResponse{} @@ -421,66 +469,80 @@ var ( emptyStovepipeServiceGetRequestHistoryByURIYARPCResponse = &GetRequestHistoryByURIResponse{} emptyStovepipeServiceGetProjectStatusByURIYARPCRequest = &GetProjectStatusByURIRequest{} emptyStovepipeServiceGetProjectStatusByURIYARPCResponse = &GetProjectStatusByURIResponse{} + emptyStovepipeServiceListYARPCRequest = &ListRequest{} + emptyStovepipeServiceListYARPCResponse = &ListResponse{} ) var yarpcFileDescriptorClosurefabdb6b3c0b09022 = [][]byte{ // stovepipe.proto []byte{ - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f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0x79, 0xdd, 0xb8, + 0xd3, 0xeb, 0xb1, 0xfd, 0xe9, 0x55, 0x5c, 0xe7, 0x41, 0xba, 0x7c, 0xd7, 0xac, 0x04, 0x69, 0xe9, + 0x85, 0xbd, 0x12, 0xa4, 0xe5, 0x17, 0x9b, 0x5d, 0x52, 0xac, 0x53, 0x3d, 0x50, 0xcc, 0xba, 0xdc, + 0x78, 0x28, 0x66, 0x5d, 0xbe, 0x9d, 0xec, 0x52, 0x0f, 0xe1, 0xb6, 0xcf, 0x82, 0x02, 0x87, 0x5e, + 0x33, 0xe3, 0xff, 0xb1, 0xfa, 0xad, 0x38, 0xb6, 0x7e, 0xf8, 0x70, 0x42, 0xe5, 0x69, 0x3c, 0xea, + 0xfa, 0x2c, 0x38, 0x54, 0x8e, 0x87, 0x39, 0xc7, 0x43, 0x2f, 0xa2, 0x87, 0x99, 0xf3, 0xa1, 0xfe, + 0x13, 0x89, 0x46, 0xa3, 0xaa, 0xfe, 0xf8, 0xe8, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xd3, + 0x4f, 0x39, 0xa5, 0x0c, 0x00, 0x00, }, } diff --git a/api/stovepipe/protopb/stovepipe_grpc.pb.go b/api/stovepipe/protopb/stovepipe_grpc.pb.go index 1ceefa4c2..b766f9290 100644 --- a/api/stovepipe/protopb/stovepipe_grpc.pb.go +++ b/api/stovepipe/protopb/stovepipe_grpc.pb.go @@ -39,6 +39,7 @@ const ( Stovepipe_GetRequestHistoryByID_FullMethodName = "/uber.submitqueue.stovepipe.Stovepipe/GetRequestHistoryByID" Stovepipe_GetRequestHistoryByURI_FullMethodName = "/uber.submitqueue.stovepipe.Stovepipe/GetRequestHistoryByURI" Stovepipe_GetProjectStatusByURI_FullMethodName = "/uber.submitqueue.stovepipe.Stovepipe/GetProjectStatusByURI" + Stovepipe_List_FullMethodName = "/uber.submitqueue.stovepipe.Stovepipe/List" ) // StovepipeClient is the client API for Stovepipe service. @@ -58,6 +59,8 @@ type StovepipeClient interface { GetRequestHistoryByURI(ctx context.Context, in *GetRequestHistoryByURIRequest, opts ...grpc.CallOption) (*GetRequestHistoryByURIResponse, error) // GetProjectStatusByURI returns the current validation status for an exact commit URI. GetProjectStatusByURI(ctx context.Context, in *GetProjectStatusByURIRequest, opts ...grpc.CallOption) (*GetProjectStatusByURIResponse, error) + // List returns a queue-scoped page of current request summaries. + List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) } type stovepipeClient struct { @@ -118,6 +121,16 @@ func (c *stovepipeClient) GetProjectStatusByURI(ctx context.Context, in *GetProj return out, nil } +func (c *stovepipeClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListResponse) + err := c.cc.Invoke(ctx, Stovepipe_List_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. @@ -135,6 +148,8 @@ type StovepipeServer interface { GetRequestHistoryByURI(context.Context, *GetRequestHistoryByURIRequest) (*GetRequestHistoryByURIResponse, error) // GetProjectStatusByURI returns the current validation status for an exact commit URI. GetProjectStatusByURI(context.Context, *GetProjectStatusByURIRequest) (*GetProjectStatusByURIResponse, error) + // List returns a queue-scoped page of current request summaries. + List(context.Context, *ListRequest) (*ListResponse, error) mustEmbedUnimplementedStovepipeServer() } @@ -160,6 +175,9 @@ func (UnimplementedStovepipeServer) GetRequestHistoryByURI(context.Context, *Get func (UnimplementedStovepipeServer) GetProjectStatusByURI(context.Context, *GetProjectStatusByURIRequest) (*GetProjectStatusByURIResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetProjectStatusByURI not implemented") } +func (UnimplementedStovepipeServer) List(context.Context, *ListRequest) (*ListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} func (UnimplementedStovepipeServer) mustEmbedUnimplementedStovepipeServer() {} func (UnimplementedStovepipeServer) testEmbeddedByValue() {} @@ -271,6 +289,24 @@ func _Stovepipe_GetProjectStatusByURI_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _Stovepipe_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StovepipeServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Stovepipe_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StovepipeServer).List(ctx, req.(*ListRequest)) + } + 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) @@ -298,6 +334,10 @@ var Stovepipe_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetProjectStatusByURI", Handler: _Stovepipe_GetProjectStatusByURI_Handler, }, + { + MethodName: "List", + Handler: _Stovepipe_List_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "stovepipe.proto", diff --git a/doc/rfc/index.md b/doc/rfc/index.md index d36971904..4122aff77 100644 --- a/doc/rfc/index.md +++ b/doc/rfc/index.md @@ -34,6 +34,7 @@ Design documents and technical proposals, grouped by scope. Shared/cross-cutting - [Record stage](stovepipe/steps/record.md) - Immutable validation facts keyed by `(queue, uri, project)`, monotonic last-green bookmark advancement and ref promotion, and the repository hook event. The analyze-stage handoff in that doc is design only - [Request Log](stovepipe/request-log.md) - Append-only request lifecycle log, durable source context, idempotent storage, and reliable write and repair paths - [Request History API](stovepipe/request-history-api.md) - Queue-scoped request-ID and URI lookup, public projection, materialization decision, ordering, and retention +- [List API](stovepipe/list-api.md) - Proposed request-ID and acceptance-time listing, immutable acceptance time in summaries, cursor pagination, and a portable time-to-request mapping - [GetProjectStatusByURI API](stovepipe/get-project-status-by-uri-api.md) - Queue-scoped current validation lookup for a commit, with repository and future project-level results ## Runway diff --git a/doc/rfc/stovepipe/list-api.md b/doc/rfc/stovepipe/list-api.md new file mode 100644 index 000000000..ef83d1a0d --- /dev/null +++ b/doc/rfc/stovepipe/list-api.md @@ -0,0 +1,60 @@ +# Stovepipe List API + +The [protobuf contract](../../../api/stovepipe/proto/stovepipe.proto) is included for review; controller and storage implementation are deferred. + +## Proposal + +`List(ListRequest) -> ListResponse` returns current request summaries for one queue, newest acceptance time first. This is a request listing, not scheduler position or historical state. + +## Contract + +| Request field | Type | Meaning | +| --- | --- | --- | +| `queue` | string | Required configured queue. | +| `accepted_at_or_after_ms` | optional int64 | Inclusive lower acceptance-time bound. | +| `accepted_before_ms` | optional int64 | Exclusive upper acceptance-time bound. | +| `page_size` | int32 | Default 50; maximum 200. Zero means default. | +| `page_token` | string | Empty for the first page; otherwise an opaque continuation. | + +The response contains only `requests` and `next_page_token`. No matches returns an empty page; an empty continuation means no further row was observed. + +Continuations repeat the same queue. Time bounds may be omitted or must match the token; page size may change. Tokens preserve the query bounds and continue exclusively after the last returned ordering key. Invalid inputs and mismatched tokens fail the request. Every page follows the service's queue-access policy. + +## Ordering and Time Defaults + +Order is descending `(accepted_at_ms, request_id)`, with bytewise descending request IDs only to break timestamp ties. Only requests with `accepted_at_ms > 0` are included; `0` means unknown. Numeric request-ID ordering is not offered. + +All timestamps are Unix milliseconds. Time selection is `lower <= accepted_at_ms < upper`. Omitted lower defaults to `0`; omitted upper defaults to server `now`, sampled once on the first page and retained in the token. Require `0 <= lower < upper`; explicit future bounds are allowed. There is no mandatory window, implicit 24-hour cutoff, or maximum window width. + +Returned state is current, not state as of the upper bound. Pagination is not a snapshot: concurrent materialization may affect membership and state. + +## Request Summary + +This is the wire representation of the existing domain `RequestSummary`, not another stored projection. The status RPC remains unchanged; it can later add this message as a nested field while retaining its existing flat fields for compatibility. Nested messages have independent field numbers. Summary `state_updated_at_ms` is lifecycle-only, unlike status `updated_at_ms`, which also includes validation results. + +| Field | Type | Meaning | +| --- | --- | --- | +| `request_id` | string | Opaque request ID. | +| `queue` | string | Owning queue. | +| `change_uri` | string | Exact ingested URI. | +| `base_uri` | string | Selected baseline; empty before selection or for a full build. | +| `request_state` | string | Current lifecycle state: `accepted`, `processing`, `superseded`, `succeeded`, `failed`, or `cancelled`. | +| `state_updated_at_ms` | int64 | Timestamp of the represented state entry. | +| `accepted_at_ms` | int64 | Timestamp of the original retained accepted entry; `0` means unknown, otherwise positive and immutable. | +| `outcome_reason` | string | Reason for the represented state; empty when unavailable or inapplicable. | + +The domain already defines a typed [RequestState](../../../stovepipe/entity/request.go). The wire field remains a string to match existing status/history APIs. States and reasons use the existing [public vocabulary](request-log.md#outcome-reasons); clients tolerate future values. Duplicate Ingest calls resolving to the same request produce one row. + +## Data and Storage Work Required + +The first six fields already exist in [RequestSummary](../../../stovepipe/entity/request_summary.go). Acceptance time and outcome reason already exist in retained logs but must be added to the summary. Acceptance time is acceptance-log time, not first RPC receipt time. No new producer signal or per-queue counter is needed. + +Listing uses an immutable mapping keyed by `(queue, accepted_at_ms, request_id)` for known positive acceptance times, then point-reads the corresponding summaries. This adds one small record per request and bounded extra reads, not another mutable status projection. Existing summary keys and public request IDs remain unchanged; no numeric-key migration is needed. + +The mapping follows the repository's [storage contract](../../../submitqueue/extension/storage/README.md#key-value-contract): a needed alternate lookup is an explicit primary-key mapping, not a SQL secondary-index requirement. Maintain it idempotently after summary persistence and before dependent publication, using existing retries rather than cross-entity transactions. + +## Coverage and Scope + +Older requests with `accepted_at_ms = 0` or without a time mapping do not appear in List until repaired or backfilled. Compatible writers materialize both for newly accepted requests. Automatic historical backfill is not part of this proposal; incomplete older-history coverage is an accepted limitation. + +V1 has no fixed retention duration or automatic pruning. State/verdict filters, recently-updated order, totals, scheduler position, and snapshot exports are deferred. Validation details and histories remain separate APIs.