diff --git a/api/stovepipe/proto/stovepipe.proto b/api/stovepipe/proto/stovepipe.proto index 294bbc8f7..4bd02acad 100644 --- a/api/stovepipe/proto/stovepipe.proto +++ b/api/stovepipe/proto/stovepipe.proto @@ -247,6 +247,40 @@ message ListResponse { string next_page_token = 2; } +message GetQueueStatusRequest { + // Required stable repo-and-ref queue name. + string queue = 1; + // Optional immutable commit URI. Empty selects the latest materialized state. + string change_uri = 2; +} + +// QueueEnablement is independent of validation results and execution controls. +enum QueueEnablement { + // Unknown is never an explicit disablement. + QUEUE_ENABLEMENT_UNKNOWN = 0; + QUEUE_ENABLEMENT_ENABLED = 1; + QUEUE_ENABLEMENT_DISABLED = 2; +} + +// QueueEnablementStatus describes applied enablement. +message QueueEnablementStatus { + // Positive enablement sequence, increasing with each state change. + int64 version = 1; + // Applied enablement. Successful lookups never return UNKNOWN. + QueueEnablement state = 2; + // Inclusive first covered commit. Empty only for initial DISABLED version 1. + string effective_from_commit_uri = 3; + // Application timestamp in Unix milliseconds, not source-control commit time. + int64 changed_at_ms = 4; +} + +message GetQueueStatusResponse { + // Queue selected by the request. + string queue = 1; + // Current enablement, or enablement covering change_uri. Always present on success. + QueueEnablementStatus enablement = 2; +} + // Stovepipe provides the Stovepipe API. service Stovepipe { // Ping returns a response indicating the service is alive @@ -264,4 +298,6 @@ service Stovepipe { rpc GetProjectStatusByURI(GetProjectStatusByURIRequest) returns (GetProjectStatusByURIResponse) {} // List returns a queue-scoped page of current request summaries. rpc List(ListRequest) returns (ListResponse) {} + // GetQueueStatus returns current enablement or enablement for a supplied commit. + rpc GetQueueStatus(GetQueueStatusRequest) returns (GetQueueStatusResponse) {} } diff --git a/api/stovepipe/protopb/stovepipe.pb.go b/api/stovepipe/protopb/stovepipe.pb.go index f7faff731..a4777db93 100644 --- a/api/stovepipe/protopb/stovepipe.pb.go +++ b/api/stovepipe/protopb/stovepipe.pb.go @@ -36,6 +36,57 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// QueueEnablement is independent of validation results and execution controls. +type QueueEnablement int32 + +const ( + // Unknown is never an explicit disablement. + QueueEnablement_QUEUE_ENABLEMENT_UNKNOWN QueueEnablement = 0 + QueueEnablement_QUEUE_ENABLEMENT_ENABLED QueueEnablement = 1 + QueueEnablement_QUEUE_ENABLEMENT_DISABLED QueueEnablement = 2 +) + +// Enum value maps for QueueEnablement. +var ( + QueueEnablement_name = map[int32]string{ + 0: "QUEUE_ENABLEMENT_UNKNOWN", + 1: "QUEUE_ENABLEMENT_ENABLED", + 2: "QUEUE_ENABLEMENT_DISABLED", + } + QueueEnablement_value = map[string]int32{ + "QUEUE_ENABLEMENT_UNKNOWN": 0, + "QUEUE_ENABLEMENT_ENABLED": 1, + "QUEUE_ENABLEMENT_DISABLED": 2, + } +) + +func (x QueueEnablement) Enum() *QueueEnablement { + p := new(QueueEnablement) + *p = x + return p +} + +func (x QueueEnablement) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (QueueEnablement) Descriptor() protoreflect.EnumDescriptor { + return file_stovepipe_proto_enumTypes[0].Descriptor() +} + +func (QueueEnablement) Type() protoreflect.EnumType { + return &file_stovepipe_proto_enumTypes[0] +} + +func (x QueueEnablement) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use QueueEnablement.Descriptor instead. +func (QueueEnablement) EnumDescriptor() ([]byte, []int) { + return file_stovepipe_proto_rawDescGZIP(), []int{0} +} + // PingRequest is the request for the Ping method type PingRequest struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -1473,6 +1524,187 @@ func (x *ListResponse) GetNextPageToken() string { return "" } +type GetQueueStatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Required stable repo-and-ref queue name. + Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` + // Optional immutable commit URI. Empty selects the latest materialized state. + ChangeUri string `protobuf:"bytes,2,opt,name=change_uri,json=changeUri,proto3" json:"change_uri,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetQueueStatusRequest) Reset() { + *x = GetQueueStatusRequest{} + mi := &file_stovepipe_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetQueueStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetQueueStatusRequest) ProtoMessage() {} + +func (x *GetQueueStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_stovepipe_proto_msgTypes[18] + 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 GetQueueStatusRequest.ProtoReflect.Descriptor instead. +func (*GetQueueStatusRequest) Descriptor() ([]byte, []int) { + return file_stovepipe_proto_rawDescGZIP(), []int{18} +} + +func (x *GetQueueStatusRequest) GetQueue() string { + if x != nil { + return x.Queue + } + return "" +} + +func (x *GetQueueStatusRequest) GetChangeUri() string { + if x != nil { + return x.ChangeUri + } + return "" +} + +// QueueEnablementStatus describes applied enablement. +type QueueEnablementStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Positive enablement sequence, increasing with each state change. + Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + // Applied enablement. Successful lookups never return UNKNOWN. + State QueueEnablement `protobuf:"varint,2,opt,name=state,proto3,enum=uber.submitqueue.stovepipe.QueueEnablement" json:"state,omitempty"` + // Inclusive first covered commit. Empty only for initial DISABLED version 1. + EffectiveFromCommitUri string `protobuf:"bytes,3,opt,name=effective_from_commit_uri,json=effectiveFromCommitUri,proto3" json:"effective_from_commit_uri,omitempty"` + // Application timestamp in Unix milliseconds, not source-control commit time. + ChangedAtMs int64 `protobuf:"varint,4,opt,name=changed_at_ms,json=changedAtMs,proto3" json:"changed_at_ms,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *QueueEnablementStatus) Reset() { + *x = QueueEnablementStatus{} + mi := &file_stovepipe_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QueueEnablementStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueueEnablementStatus) ProtoMessage() {} + +func (x *QueueEnablementStatus) ProtoReflect() protoreflect.Message { + mi := &file_stovepipe_proto_msgTypes[19] + 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 QueueEnablementStatus.ProtoReflect.Descriptor instead. +func (*QueueEnablementStatus) Descriptor() ([]byte, []int) { + return file_stovepipe_proto_rawDescGZIP(), []int{19} +} + +func (x *QueueEnablementStatus) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *QueueEnablementStatus) GetState() QueueEnablement { + if x != nil { + return x.State + } + return QueueEnablement_QUEUE_ENABLEMENT_UNKNOWN +} + +func (x *QueueEnablementStatus) GetEffectiveFromCommitUri() string { + if x != nil { + return x.EffectiveFromCommitUri + } + return "" +} + +func (x *QueueEnablementStatus) GetChangedAtMs() int64 { + if x != nil { + return x.ChangedAtMs + } + return 0 +} + +type GetQueueStatusResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Queue selected by the request. + Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` + // Current enablement, or enablement covering change_uri. Always present on success. + Enablement *QueueEnablementStatus `protobuf:"bytes,2,opt,name=enablement,proto3" json:"enablement,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetQueueStatusResponse) Reset() { + *x = GetQueueStatusResponse{} + mi := &file_stovepipe_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetQueueStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetQueueStatusResponse) ProtoMessage() {} + +func (x *GetQueueStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_stovepipe_proto_msgTypes[20] + 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 GetQueueStatusResponse.ProtoReflect.Descriptor instead. +func (*GetQueueStatusResponse) Descriptor() ([]byte, []int) { + return file_stovepipe_proto_rawDescGZIP(), []int{20} +} + +func (x *GetQueueStatusResponse) GetQueue() string { + if x != nil { + return x.Queue + } + return "" +} + +func (x *GetQueueStatusResponse) GetEnablement() *QueueEnablementStatus { + if x != nil { + return x.Enablement + } + return nil +} + var File_stovepipe_proto protoreflect.FileDescriptor const file_stovepipe_proto_rawDesc = "" + @@ -1586,7 +1818,25 @@ const file_stovepipe_proto_rawDesc = "" + "\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\xec\x06\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"L\n" + + "\x15GetQueueStatusRequest\x12\x14\n" + + "\x05queue\x18\x01 \x01(\tR\x05queue\x12\x1d\n" + + "\n" + + "change_uri\x18\x02 \x01(\tR\tchangeUri\"\xd3\x01\n" + + "\x15QueueEnablementStatus\x12\x18\n" + + "\aversion\x18\x01 \x01(\x03R\aversion\x12A\n" + + "\x05state\x18\x02 \x01(\x0e2+.uber.submitqueue.stovepipe.QueueEnablementR\x05state\x129\n" + + "\x19effective_from_commit_uri\x18\x03 \x01(\tR\x16effectiveFromCommitUri\x12\"\n" + + "\rchanged_at_ms\x18\x04 \x01(\x03R\vchangedAtMs\"\x81\x01\n" + + "\x16GetQueueStatusResponse\x12\x14\n" + + "\x05queue\x18\x01 \x01(\tR\x05queue\x12Q\n" + + "\n" + + "enablement\x18\x02 \x01(\v21.uber.submitqueue.stovepipe.QueueEnablementStatusR\n" + + "enablement*l\n" + + "\x0fQueueEnablement\x12\x1c\n" + + "\x18QUEUE_ENABLEMENT_UNKNOWN\x10\x00\x12\x1c\n" + + "\x18QUEUE_ENABLEMENT_ENABLED\x10\x01\x12\x1d\n" + + "\x19QUEUE_ENABLEMENT_DISABLED\x10\x022\xe7\a\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" + @@ -1594,7 +1844,8 @@ const file_stovepipe_proto_rawDesc = "" + "\x16GetRequestHistoryByURI\x129.uber.submitqueue.stovepipe.GetRequestHistoryByURIRequest\x1a:.uber.submitqueue.stovepipe.GetRequestHistoryByURIResponse\"\x00\x12\x8b\x01\n" + "\x14GetProjectStatusByID\x127.uber.submitqueue.stovepipe.GetProjectStatusByIDRequest\x1a8.uber.submitqueue.stovepipe.GetProjectStatusByIDResponse\"\x00\x12\x8e\x01\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" + + "\x04List\x12'.uber.submitqueue.stovepipe.ListRequest\x1a(.uber.submitqueue.stovepipe.ListResponse\"\x00\x12y\n" + + "\x0eGetQueueStatus\x121.uber.submitqueue.stovepipe.GetQueueStatusRequest\x1a2.uber.submitqueue.stovepipe.GetQueueStatusResponse\"\x00Be\n" + "\x1ecom.uber.submitqueue.stovepipeB\x0eStovepipeProtoP\x01Z1github.com/uber/submitqueue/api/stovepipe/protopbb\x06proto3" var ( @@ -1609,55 +1860,64 @@ func file_stovepipe_proto_rawDescGZIP() []byte { return file_stovepipe_proto_rawDescData } -var file_stovepipe_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_stovepipe_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_stovepipe_proto_msgTypes = make([]protoimpl.MessageInfo, 21) 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 - (*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 - (*GetProjectStatusByIDRequest)(nil), // 10: uber.submitqueue.stovepipe.GetProjectStatusByIDRequest - (*GetProjectStatusByURIRequest)(nil), // 11: uber.submitqueue.stovepipe.GetProjectStatusByURIRequest - (*ProjectValidation)(nil), // 12: uber.submitqueue.stovepipe.ProjectValidation - (*GetProjectStatusByIDResponse)(nil), // 13: uber.submitqueue.stovepipe.GetProjectStatusByIDResponse - (*GetProjectStatusByURIResponse)(nil), // 14: uber.submitqueue.stovepipe.GetProjectStatusByURIResponse - (*RequestSummary)(nil), // 15: uber.submitqueue.stovepipe.RequestSummary - (*ListRequest)(nil), // 16: uber.submitqueue.stovepipe.ListRequest - (*ListResponse)(nil), // 17: uber.submitqueue.stovepipe.ListResponse + (QueueEnablement)(0), // 0: uber.submitqueue.stovepipe.QueueEnablement + (*PingRequest)(nil), // 1: uber.submitqueue.stovepipe.PingRequest + (*PingResponse)(nil), // 2: uber.submitqueue.stovepipe.PingResponse + (*IngestRequest)(nil), // 3: uber.submitqueue.stovepipe.IngestRequest + (*IngestResponse)(nil), // 4: uber.submitqueue.stovepipe.IngestResponse + (*GetRequestHistoryByIDRequest)(nil), // 5: uber.submitqueue.stovepipe.GetRequestHistoryByIDRequest + (*GetRequestHistoryByURIRequest)(nil), // 6: uber.submitqueue.stovepipe.GetRequestHistoryByURIRequest + (*HistoryEvent)(nil), // 7: uber.submitqueue.stovepipe.HistoryEvent + (*RequestHistory)(nil), // 8: uber.submitqueue.stovepipe.RequestHistory + (*GetRequestHistoryByIDResponse)(nil), // 9: uber.submitqueue.stovepipe.GetRequestHistoryByIDResponse + (*GetRequestHistoryByURIResponse)(nil), // 10: uber.submitqueue.stovepipe.GetRequestHistoryByURIResponse + (*GetProjectStatusByIDRequest)(nil), // 11: uber.submitqueue.stovepipe.GetProjectStatusByIDRequest + (*GetProjectStatusByURIRequest)(nil), // 12: uber.submitqueue.stovepipe.GetProjectStatusByURIRequest + (*ProjectValidation)(nil), // 13: uber.submitqueue.stovepipe.ProjectValidation + (*GetProjectStatusByIDResponse)(nil), // 14: uber.submitqueue.stovepipe.GetProjectStatusByIDResponse + (*GetProjectStatusByURIResponse)(nil), // 15: uber.submitqueue.stovepipe.GetProjectStatusByURIResponse + (*RequestSummary)(nil), // 16: uber.submitqueue.stovepipe.RequestSummary + (*ListRequest)(nil), // 17: uber.submitqueue.stovepipe.ListRequest + (*ListResponse)(nil), // 18: uber.submitqueue.stovepipe.ListResponse + (*GetQueueStatusRequest)(nil), // 19: uber.submitqueue.stovepipe.GetQueueStatusRequest + (*QueueEnablementStatus)(nil), // 20: uber.submitqueue.stovepipe.QueueEnablementStatus + (*GetQueueStatusResponse)(nil), // 21: uber.submitqueue.stovepipe.GetQueueStatusResponse } var file_stovepipe_proto_depIdxs = []int32{ - 6, // 0: uber.submitqueue.stovepipe.RequestHistory.events:type_name -> uber.submitqueue.stovepipe.HistoryEvent - 15, // 1: uber.submitqueue.stovepipe.RequestHistory.request_summary:type_name -> uber.submitqueue.stovepipe.RequestSummary - 6, // 2: uber.submitqueue.stovepipe.GetRequestHistoryByIDResponse.events:type_name -> uber.submitqueue.stovepipe.HistoryEvent - 15, // 3: uber.submitqueue.stovepipe.GetRequestHistoryByIDResponse.request_summary:type_name -> uber.submitqueue.stovepipe.RequestSummary - 7, // 4: uber.submitqueue.stovepipe.GetRequestHistoryByURIResponse.histories:type_name -> uber.submitqueue.stovepipe.RequestHistory - 12, // 5: uber.submitqueue.stovepipe.GetProjectStatusByIDResponse.projects:type_name -> uber.submitqueue.stovepipe.ProjectValidation - 12, // 6: uber.submitqueue.stovepipe.GetProjectStatusByURIResponse.projects:type_name -> uber.submitqueue.stovepipe.ProjectValidation - 15, // 7: uber.submitqueue.stovepipe.ListResponse.requests:type_name -> uber.submitqueue.stovepipe.RequestSummary - 0, // 8: uber.submitqueue.stovepipe.Stovepipe.Ping:input_type -> uber.submitqueue.stovepipe.PingRequest - 2, // 9: uber.submitqueue.stovepipe.Stovepipe.Ingest:input_type -> uber.submitqueue.stovepipe.IngestRequest - 4, // 10: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByID:input_type -> uber.submitqueue.stovepipe.GetRequestHistoryByIDRequest - 5, // 11: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByURI:input_type -> uber.submitqueue.stovepipe.GetRequestHistoryByURIRequest - 10, // 12: uber.submitqueue.stovepipe.Stovepipe.GetProjectStatusByID:input_type -> uber.submitqueue.stovepipe.GetProjectStatusByIDRequest - 11, // 13: uber.submitqueue.stovepipe.Stovepipe.GetProjectStatusByURI:input_type -> uber.submitqueue.stovepipe.GetProjectStatusByURIRequest - 16, // 14: uber.submitqueue.stovepipe.Stovepipe.List:input_type -> uber.submitqueue.stovepipe.ListRequest - 1, // 15: uber.submitqueue.stovepipe.Stovepipe.Ping:output_type -> uber.submitqueue.stovepipe.PingResponse - 3, // 16: uber.submitqueue.stovepipe.Stovepipe.Ingest:output_type -> uber.submitqueue.stovepipe.IngestResponse - 8, // 17: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByID:output_type -> uber.submitqueue.stovepipe.GetRequestHistoryByIDResponse - 9, // 18: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByURI:output_type -> uber.submitqueue.stovepipe.GetRequestHistoryByURIResponse - 13, // 19: uber.submitqueue.stovepipe.Stovepipe.GetProjectStatusByID:output_type -> uber.submitqueue.stovepipe.GetProjectStatusByIDResponse - 14, // 20: uber.submitqueue.stovepipe.Stovepipe.GetProjectStatusByURI:output_type -> uber.submitqueue.stovepipe.GetProjectStatusByURIResponse - 17, // 21: uber.submitqueue.stovepipe.Stovepipe.List:output_type -> uber.submitqueue.stovepipe.ListResponse - 15, // [15:22] is the sub-list for method output_type - 8, // [8:15] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 7, // 0: uber.submitqueue.stovepipe.RequestHistory.events:type_name -> uber.submitqueue.stovepipe.HistoryEvent + 16, // 1: uber.submitqueue.stovepipe.RequestHistory.request_summary:type_name -> uber.submitqueue.stovepipe.RequestSummary + 7, // 2: uber.submitqueue.stovepipe.GetRequestHistoryByIDResponse.events:type_name -> uber.submitqueue.stovepipe.HistoryEvent + 16, // 3: uber.submitqueue.stovepipe.GetRequestHistoryByIDResponse.request_summary:type_name -> uber.submitqueue.stovepipe.RequestSummary + 8, // 4: uber.submitqueue.stovepipe.GetRequestHistoryByURIResponse.histories:type_name -> uber.submitqueue.stovepipe.RequestHistory + 13, // 5: uber.submitqueue.stovepipe.GetProjectStatusByIDResponse.projects:type_name -> uber.submitqueue.stovepipe.ProjectValidation + 13, // 6: uber.submitqueue.stovepipe.GetProjectStatusByURIResponse.projects:type_name -> uber.submitqueue.stovepipe.ProjectValidation + 16, // 7: uber.submitqueue.stovepipe.ListResponse.requests:type_name -> uber.submitqueue.stovepipe.RequestSummary + 0, // 8: uber.submitqueue.stovepipe.QueueEnablementStatus.state:type_name -> uber.submitqueue.stovepipe.QueueEnablement + 20, // 9: uber.submitqueue.stovepipe.GetQueueStatusResponse.enablement:type_name -> uber.submitqueue.stovepipe.QueueEnablementStatus + 1, // 10: uber.submitqueue.stovepipe.Stovepipe.Ping:input_type -> uber.submitqueue.stovepipe.PingRequest + 3, // 11: uber.submitqueue.stovepipe.Stovepipe.Ingest:input_type -> uber.submitqueue.stovepipe.IngestRequest + 5, // 12: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByID:input_type -> uber.submitqueue.stovepipe.GetRequestHistoryByIDRequest + 6, // 13: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByURI:input_type -> uber.submitqueue.stovepipe.GetRequestHistoryByURIRequest + 11, // 14: uber.submitqueue.stovepipe.Stovepipe.GetProjectStatusByID:input_type -> uber.submitqueue.stovepipe.GetProjectStatusByIDRequest + 12, // 15: uber.submitqueue.stovepipe.Stovepipe.GetProjectStatusByURI:input_type -> uber.submitqueue.stovepipe.GetProjectStatusByURIRequest + 17, // 16: uber.submitqueue.stovepipe.Stovepipe.List:input_type -> uber.submitqueue.stovepipe.ListRequest + 19, // 17: uber.submitqueue.stovepipe.Stovepipe.GetQueueStatus:input_type -> uber.submitqueue.stovepipe.GetQueueStatusRequest + 2, // 18: uber.submitqueue.stovepipe.Stovepipe.Ping:output_type -> uber.submitqueue.stovepipe.PingResponse + 4, // 19: uber.submitqueue.stovepipe.Stovepipe.Ingest:output_type -> uber.submitqueue.stovepipe.IngestResponse + 9, // 20: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByID:output_type -> uber.submitqueue.stovepipe.GetRequestHistoryByIDResponse + 10, // 21: uber.submitqueue.stovepipe.Stovepipe.GetRequestHistoryByURI:output_type -> uber.submitqueue.stovepipe.GetRequestHistoryByURIResponse + 14, // 22: uber.submitqueue.stovepipe.Stovepipe.GetProjectStatusByID:output_type -> uber.submitqueue.stovepipe.GetProjectStatusByIDResponse + 15, // 23: uber.submitqueue.stovepipe.Stovepipe.GetProjectStatusByURI:output_type -> uber.submitqueue.stovepipe.GetProjectStatusByURIResponse + 18, // 24: uber.submitqueue.stovepipe.Stovepipe.List:output_type -> uber.submitqueue.stovepipe.ListResponse + 21, // 25: uber.submitqueue.stovepipe.Stovepipe.GetQueueStatus:output_type -> uber.submitqueue.stovepipe.GetQueueStatusResponse + 18, // [18:26] is the sub-list for method output_type + 10, // [10:18] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_stovepipe_proto_init() } @@ -1687,13 +1947,14 @@ func file_stovepipe_proto_init() { 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: 18, + NumEnums: 1, + NumMessages: 21, NumExtensions: 0, NumServices: 1, }, GoTypes: file_stovepipe_proto_goTypes, DependencyIndexes: file_stovepipe_proto_depIdxs, + EnumInfos: file_stovepipe_proto_enumTypes, MessageInfos: file_stovepipe_proto_msgTypes, }.Build() File_stovepipe_proto = out.File diff --git a/api/stovepipe/protopb/stovepipe.pb.yarpc.go b/api/stovepipe/protopb/stovepipe.pb.yarpc.go index 103237c36..b2283430a 100644 --- a/api/stovepipe/protopb/stovepipe.pb.yarpc.go +++ b/api/stovepipe/protopb/stovepipe.pb.yarpc.go @@ -28,6 +28,7 @@ type StovepipeYARPCClient interface { GetProjectStatusByID(context.Context, *GetProjectStatusByIDRequest, ...yarpc.CallOption) (*GetProjectStatusByIDResponse, error) GetProjectStatusByURI(context.Context, *GetProjectStatusByURIRequest, ...yarpc.CallOption) (*GetProjectStatusByURIResponse, error) List(context.Context, *ListRequest, ...yarpc.CallOption) (*ListResponse, error) + GetQueueStatus(context.Context, *GetQueueStatusRequest, ...yarpc.CallOption) (*GetQueueStatusResponse, error) } func newStovepipeYARPCClient(clientConfig transport.ClientConfig, anyResolver v2.AnyResolver, options ...v2.ClientOption) StovepipeYARPCClient { @@ -55,6 +56,7 @@ type StovepipeYARPCServer interface { GetProjectStatusByID(context.Context, *GetProjectStatusByIDRequest) (*GetProjectStatusByIDResponse, error) GetProjectStatusByURI(context.Context, *GetProjectStatusByURIRequest) (*GetProjectStatusByURIResponse, error) List(context.Context, *ListRequest) (*ListResponse, error) + GetQueueStatus(context.Context, *GetQueueStatusRequest) (*GetQueueStatusResponse, error) } type buildStovepipeYARPCProceduresParams struct { @@ -138,6 +140,16 @@ func buildStovepipeYARPCProcedures(params buildStovepipeYARPCProceduresParams) [ }, ), }, + { + MethodName: "GetQueueStatus", + Handler: v2.NewUnaryHandler( + v2.UnaryHandlerParams{ + Handle: handler.GetQueueStatus, + NewRequest: newStovepipeServiceGetQueueStatusYARPCRequest, + AnyResolver: params.AnyResolver, + }, + ), + }, }, OnewayHandlerParams: []v2.BuildProceduresOnewayHandlerParams{}, StreamHandlerParams: []v2.BuildProceduresStreamHandlerParams{}, @@ -334,6 +346,18 @@ func (c *_StovepipeYARPCCaller) List(ctx context.Context, request *ListRequest, return response, err } +func (c *_StovepipeYARPCCaller) GetQueueStatus(ctx context.Context, request *GetQueueStatusRequest, options ...yarpc.CallOption) (*GetQueueStatusResponse, error) { + responseMessage, err := c.streamClient.Call(ctx, "GetQueueStatus", request, newStovepipeServiceGetQueueStatusYARPCResponse, options...) + if responseMessage == nil { + return nil, err + } + response, ok := responseMessage.(*GetQueueStatusResponse) + if !ok { + return nil, v2.CastError(emptyStovepipeServiceGetQueueStatusYARPCResponse, responseMessage) + } + return response, err +} + type _StovepipeYARPCHandler struct { server StovepipeYARPCServer } @@ -450,6 +474,22 @@ func (h *_StovepipeYARPCHandler) List(ctx context.Context, requestMessage proto. return response, err } +func (h *_StovepipeYARPCHandler) GetQueueStatus(ctx context.Context, requestMessage proto.Message) (proto.Message, error) { + var request *GetQueueStatusRequest + var ok bool + if requestMessage != nil { + request, ok = requestMessage.(*GetQueueStatusRequest) + if !ok { + return nil, v2.CastError(emptyStovepipeServiceGetQueueStatusYARPCRequest, requestMessage) + } + } + response, err := h.server.GetQueueStatus(ctx, request) + if response == nil { + return nil, err + } + return response, err +} + func newStovepipeServicePingYARPCRequest() proto.Message { return &PingRequest{} } @@ -506,6 +546,14 @@ func newStovepipeServiceListYARPCResponse() proto.Message { return &ListResponse{} } +func newStovepipeServiceGetQueueStatusYARPCRequest() proto.Message { + return &GetQueueStatusRequest{} +} + +func newStovepipeServiceGetQueueStatusYARPCResponse() proto.Message { + return &GetQueueStatusResponse{} +} + var ( emptyStovepipeServicePingYARPCRequest = &PingRequest{} emptyStovepipeServicePingYARPCResponse = &PingResponse{} @@ -521,83 +569,98 @@ var ( emptyStovepipeServiceGetProjectStatusByURIYARPCResponse = &GetProjectStatusByURIResponse{} emptyStovepipeServiceListYARPCRequest = &ListRequest{} emptyStovepipeServiceListYARPCResponse = &ListResponse{} + emptyStovepipeServiceGetQueueStatusYARPCRequest = &GetQueueStatusRequest{} + emptyStovepipeServiceGetQueueStatusYARPCResponse = &GetQueueStatusResponse{} ) var yarpcFileDescriptorClosurefabdb6b3c0b09022 = [][]byte{ // stovepipe.proto []byte{ - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xda, 0x89, 0x63, 0x3f, 0x3b, 0x4e, 0x3a, 0x09, 0xc1, 0x75, 0x9b, 0x2a, 0x2c, 0x84, - 0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, 0x9c, 0xcd, 0x4d, 0x58, 0xec, 0x8e, 0x86, 0xc8, - 0x45, 0xec, 0xf2, 0x2a, 0xcc, 0xab, 0xa0, 0xb4, 0x17, 0xd1, 0xc1, 0xdc, 0x80, 0x5a, 0x2c, 0xa6, - 0xfd, 0xad, 0x41, 0xde, 0x1b, 0x68, 0xa1, 0xbc, 0x37, 0x30, 0x7b, 0x70, 0x73, 0x17, 0x63, 0x2b, - 0x1d, 0x8f, 0x0b, 0xca, 0x4e, 0xda, 0x27, 0xdd, 0x87, 0x99, 0x76, 0xc9, 0x3a, 0x00, 0x8b, 0x04, - 0x6c, 0x6f, 0xa0, 0x23, 0x2b, 0x6b, 0x4a, 0x77, 0x60, 0xee, 0xc2, 0xfa, 0x0c, 0xa3, 0x07, 0x56, - 0x37, 0xdb, 0xea, 0x32, 0x14, 0x42, 0xe6, 0x69, 0x73, 0xf2, 0xa7, 0xf9, 0xab, 0x01, 0x55, 0xad, - 0xff, 0xd1, 0x31, 0x8e, 0x04, 0xb9, 0x0e, 0x25, 0x94, 0x3f, 0xec, 0x24, 0x88, 0x05, 0x75, 0xee, - 0x0e, 0x24, 0xde, 0x09, 0x76, 0xb6, 0xcf, 0x95, 0x99, 0x82, 0x55, 0x49, 0x68, 0x7b, 0x9c, 0x6c, - 0xc2, 0x62, 0xec, 0x36, 0x17, 0x8e, 0x40, 0x85, 0x79, 0xb9, 0x93, 0xb3, 0xaa, 0x9a, 0xdc, 0x93, - 0x54, 0xb2, 0x06, 0xf3, 0xca, 0x68, 0x84, 0x7a, 0x27, 0x67, 0x45, 0x47, 0xb2, 0x09, 0x35, 0x1a, - 0x0a, 0x97, 0xfa, 0x68, 0x33, 0x74, 0x38, 0x1d, 0xd5, 0xe7, 0x95, 0x0b, 0x8b, 0x9a, 0x6a, 0x29, - 0x62, 0xbb, 0x0a, 0x40, 0x5d, 0x37, 0x64, 0x0c, 0x47, 0x2e, 0x9a, 0xbf, 0x19, 0x50, 0x9b, 0x44, - 0x62, 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, 0xd8, + 0xf8, 0x19, 0x48, 0x53, 0xbe, 0x99, 0x21, 0x47, 0x50, 0x1a, 0xe4, 0x17, 0x72, 0xe7, 0x94, 0x58, + 0x8f, 0x13, 0x76, 0x65, 0xed, 0x2c, 0x2e, 0xf1, 0xd6, 0x35, 0x84, 0x6b, 0x9d, 0xc0, 0x1b, 0xe3, + 0x5a, 0x2b, 0x25, 0x44, 0xb0, 0x43, 0x03, 0x1e, 0xec, 0x18, 0x9f, 0xde, 0xe9, 0xb9, 0x7c, 0x3f, + 0x6a, 0x57, 0x3b, 0x81, 0xb7, 0x2a, 0x1c, 0x57, 0x53, 0x8e, 0xab, 0x4e, 0xe8, 0xae, 0x26, 0xce, + 0xab, 0xf2, 0xcf, 0xad, 0xb0, 0xdd, 0x9e, 0x92, 0x3f, 0xde, 0xf9, 0x33, 0x00, 0x00, 0xff, 0xff, + 0xd1, 0x24, 0x65, 0xea, 0xf8, 0x12, 0x00, 0x00, }, } diff --git a/api/stovepipe/protopb/stovepipe_grpc.pb.go b/api/stovepipe/protopb/stovepipe_grpc.pb.go index 4bd5c6601..64f1af82d 100644 --- a/api/stovepipe/protopb/stovepipe_grpc.pb.go +++ b/api/stovepipe/protopb/stovepipe_grpc.pb.go @@ -41,6 +41,7 @@ const ( Stovepipe_GetProjectStatusByID_FullMethodName = "/uber.submitqueue.stovepipe.Stovepipe/GetProjectStatusByID" Stovepipe_GetProjectStatusByURI_FullMethodName = "/uber.submitqueue.stovepipe.Stovepipe/GetProjectStatusByURI" Stovepipe_List_FullMethodName = "/uber.submitqueue.stovepipe.Stovepipe/List" + Stovepipe_GetQueueStatus_FullMethodName = "/uber.submitqueue.stovepipe.Stovepipe/GetQueueStatus" ) // StovepipeClient is the client API for Stovepipe service. @@ -64,6 +65,8 @@ type StovepipeClient interface { 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) + // GetQueueStatus returns current enablement or enablement for a supplied commit. + GetQueueStatus(ctx context.Context, in *GetQueueStatusRequest, opts ...grpc.CallOption) (*GetQueueStatusResponse, error) } type stovepipeClient struct { @@ -144,6 +147,16 @@ func (c *stovepipeClient) List(ctx context.Context, in *ListRequest, opts ...grp return out, nil } +func (c *stovepipeClient) GetQueueStatus(ctx context.Context, in *GetQueueStatusRequest, opts ...grpc.CallOption) (*GetQueueStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetQueueStatusResponse) + err := c.cc.Invoke(ctx, Stovepipe_GetQueueStatus_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. @@ -165,6 +178,8 @@ type StovepipeServer interface { GetProjectStatusByURI(context.Context, *GetProjectStatusByURIRequest) (*GetProjectStatusByURIResponse, error) // List returns a queue-scoped page of current request summaries. List(context.Context, *ListRequest) (*ListResponse, error) + // GetQueueStatus returns current enablement or enablement for a supplied commit. + GetQueueStatus(context.Context, *GetQueueStatusRequest) (*GetQueueStatusResponse, error) mustEmbedUnimplementedStovepipeServer() } @@ -196,6 +211,9 @@ func (UnimplementedStovepipeServer) GetProjectStatusByURI(context.Context, *GetP func (UnimplementedStovepipeServer) List(context.Context, *ListRequest) (*ListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } +func (UnimplementedStovepipeServer) GetQueueStatus(context.Context, *GetQueueStatusRequest) (*GetQueueStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetQueueStatus not implemented") +} func (UnimplementedStovepipeServer) mustEmbedUnimplementedStovepipeServer() {} func (UnimplementedStovepipeServer) testEmbeddedByValue() {} @@ -343,6 +361,24 @@ func _Stovepipe_List_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +func _Stovepipe_GetQueueStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetQueueStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StovepipeServer).GetQueueStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Stovepipe_GetQueueStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StovepipeServer).GetQueueStatus(ctx, req.(*GetQueueStatusRequest)) + } + 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) @@ -378,6 +414,10 @@ var Stovepipe_ServiceDesc = grpc.ServiceDesc{ MethodName: "List", Handler: _Stovepipe_List_Handler, }, + { + MethodName: "GetQueueStatus", + Handler: _Stovepipe_GetQueueStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "stovepipe.proto", diff --git a/doc/rfc/index.md b/doc/rfc/index.md index 24f07fbc4..667a556d1 100644 --- a/doc/rfc/index.md +++ b/doc/rfc/index.md @@ -39,6 +39,7 @@ Design documents and technical proposals, grouped by scope. Shared/cross-cutting - [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) - Queue-scoped request listing by acceptance time, immutable acceptance time in summaries, cursor pagination, and a portable time-to-request mapping - [Project Status APIs](stovepipe/project-status-api.md) - Queue-scoped current validation lookup by request ID or commit URI, with repository and future project-level results +- [Queue State](stovepipe/queue-state.md) - Internal queue enablement, materialized summary and history, and current or commit-specific status lookup ## Runway diff --git a/doc/rfc/stovepipe/queue-state.md b/doc/rfc/stovepipe/queue-state.md new file mode 100644 index 000000000..3dcf68b08 --- /dev/null +++ b/doc/rfc/stovepipe/queue-state.md @@ -0,0 +1,88 @@ +# Queue enablement and status + +Stovepipe needs to answer two questions: is a queue enabled now, and was it enabled for a particular commit? Each answer includes the commit at which that state took effect. + +## Why we need this + +A client needs to know whether Stovepipe validation is expected for a commit. Today's setting is not enough: a queue can be disabled now even though an earlier commit was covered, or enabled before its first validation finishes. + +The existing information cannot answer this reliably: + +- A configuration flag describes the desired setting, and the current queue row holds the latest applied state. Neither alone retains earlier commit intervals. +- Request history describes validation attempts. Batching leaves intermediate commits without their own requests, so a missing request does not imply disabled. +- Last-green and validation results describe outcomes, rather than whether validation was expected. + +A dedicated lookup needs durable enablement history with commit boundaries, independent of validation work. + +## Enablement and pause + +Enablement defines which commits are covered by Stovepipe. Pause is a temporary operational control over whether a queue accepts or advances work. An enabled queue can be paused and still owe validation results for its covered commits; enabled does not promise that work is progressing or that results are green. + +For example, if a queue is enabled at A and later paused while validating C, the status for C remains enabled from A. Unpausing resumes work without creating a new enablement boundary. Disabling at D instead changes coverage from D onward, while preserving the answers for earlier commits. + +Future pause management should follow the [queue pause RFC](../submitqueue/queue-pause-and-unpause.md), which distinguishes refusing new requests from freezing accepted work. That RFC covers SubmitQueue; Stovepipe's ingestion and processing behavior still needs its own design. + +Pause can use the same internal-state, summary and history pattern described below, with separate operational fields and history events. Pause and unpause must not advance the enablement version or change commit boundaries. Keep pause out of the enablement enum, and expose it as current operational status rather than mixing it into a commit-specific enablement answer. A future administration API can manage both controls independently; this lookup remains read-only. + +## What the endpoint returns + +`GetQueueStatus` takes a queue name and an optional `change_uri`. Omitting the commit selects the latest queue summary; supplying it selects the enablement covering that commit. The response contains an `enablement` object of type `QueueEnablementStatus`: + +| Field | Meaning | +|---|---| +| `state` | `ENABLED` or `DISABLED`. | +| `effective_from_commit_uri` | First covered commit, inclusive. | +| `version` | Sequence number that increases for each enablement change. | +| `changed_at_ms` | Recorded change timestamp in Unix milliseconds, distinct from commit time. | + +The boundary, version and timestamp describe enablement only. Future operational fields, such as pause status, belong beside this object and can change independently. + +See the [proto](../../../api/stovepipe/proto/stovepipe.proto) for the wire contract. + +Suppose commits arrive in order A through G, with enablement changes at A, D and G: + +| Lookup | State | Effective from | +|---|---|---| +| No commit supplied | Enabled | G | +| C | Enabled | A | +| D or F | Disabled | D | +| G | Enabled | G | + +C and F need no validation requests. Their ancestry relative to the boundaries determines the answer. + +Registration starts a queue as disabled version 1, with no boundary; this covers commits before its first enablement. Missing state is an error, not disabled. If changes share a boundary, the highest version wins. Versions order changes; timestamps do not. + +## Internal state, summary and history + +Follow the model used for request summaries and history, while keeping the internal queue authoritative: + +| Record | Purpose | +|---|---| +| Existing `queue` row | Current enablement alongside pipeline coordination fields. | +| `queue_log` | Immutable applied changes, keyed by queue and enablement version. | +| `queue_summary` | Current read view derived from those changes. | + +The queue row and summary each have a storage version for optimistic locking. The API exposes a separate enablement version, which advances only for enabled/disabled changes. Routine pipeline updates create no enablement history entries or gaps. + +The transition controller captures the queue's tip and a timestamp once when preparing a change. Retries keep those values; requesting the existing state is a no-op. Application first finishes recording the previous state, then conditionally updates the queue and records the new state through `queuelog.Materializer.PersistLog`. + +History is written before its summary. If either write fails after the queue update, the queue retains the missing change. Initialization and transition retries repair the read models before another enablement change can replace it. Repeating an identical change is safe, and older changes cannot move the summary backward. Concurrent pipeline updates preserve their coordination fields; competing enablement decisions are rejected as stale. + +## Commit lookup and consistency + +Lookup reads one summary and its matching history entry, and uses that version throughout the call. It never writes or repairs state. “Current” therefore means the latest state in the read models, which may lag the internal queue until a writer retries. + +For a supplied commit, the existing source-control integration verifies that the commit and latest boundary belong to the queue's current lineage. The controller walks changes newest-first and selects the first boundary that is an ancestor of, or equal to, the commit. Before walking backward, it verifies that the commit precedes the boundary; incomparable commits and unsupported history rewrites fail instead of becoming disabled. This resolves intermediate commits without a commit index or local checkout. Current-only lookup needs no source-control call. + +| Failure | RPC error | +|---|---| +| Malformed selector | `INVALID_ARGUMENT` | +| No queue summary | `NOT_FOUND` | +| Unresolved commit or unsupported lineage | `FAILED_PRECONDITION` | +| Missing or inconsistent history | `INTERNAL` | + +Dependency and cancellation errors retain their transport classification. An unresolved commit fails the whole call. + +## Scope + +This stack records enablement and exposes status lookup. It does not enforce ingestion or execution controls. Configuration freshness, administration, pause enforcement and public history access remain separate work. Validation results and last-green stay in their existing APIs. diff --git a/service/stovepipe/server/handler/BUILD.bazel b/service/stovepipe/server/handler/BUILD.bazel index d25dbfbdd..fd1b8a053 100644 --- a/service/stovepipe/server/handler/BUILD.bazel +++ b/service/stovepipe/server/handler/BUILD.bazel @@ -16,6 +16,7 @@ go_test( name = "go_default_test", srcs = [ "list_test.go", + "queue_status_test.go", "server_test.go", ], embed = [":go_default_library"], @@ -27,6 +28,8 @@ go_test( "//stovepipe/extension/storage:go_default_library", "@com_github_stretchr_testify//assert:go_default_library", "@com_github_stretchr_testify//require:go_default_library", + "@org_golang_google_grpc//codes:go_default_library", + "@org_golang_google_grpc//status:go_default_library", "@org_uber_go_mock//gomock:go_default_library", ], ) diff --git a/service/stovepipe/server/handler/queue_status_test.go b/service/stovepipe/server/handler/queue_status_test.go new file mode 100644 index 000000000..48bb10398 --- /dev/null +++ b/service/stovepipe/server/handler/queue_status_test.go @@ -0,0 +1,32 @@ +// Copyright (c) 2026 Uber Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package handler + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + pb "github.com/uber/submitqueue/api/stovepipe/protopb" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func TestQueueStatusContractIsUnimplemented(t *testing.T) { + server := &StovepipeServer{} + response, err := server.GetQueueStatus(context.Background(), &pb.GetQueueStatusRequest{Queue: "repo/main"}) + require.Nil(t, response) + require.Equal(t, codes.Unimplemented, status.Code(err)) +} diff --git a/web/api/src/gen/api/stovepipe/proto/stovepipe_pb.ts b/web/api/src/gen/api/stovepipe/proto/stovepipe_pb.ts index ccb02a335..d67c881e7 100644 --- a/web/api/src/gen/api/stovepipe/proto/stovepipe_pb.ts +++ b/web/api/src/gen/api/stovepipe/proto/stovepipe_pb.ts @@ -16,15 +16,15 @@ // @generated from file api/stovepipe/proto/stovepipe.proto (package uber.submitqueue.stovepipe, syntax proto3) /* eslint-disable */ -import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; import type { Message } from "@bufbuild/protobuf"; /** * Describes the file api/stovepipe/proto/stovepipe.proto. */ export const file_api_stovepipe_proto_stovepipe: GenFile = /*@__PURE__*/ - fileDesc("CiNhcGkvc3RvdmVwaXBlL3Byb3RvL3N0b3ZlcGlwZS5wcm90bxIadWJlci5zdWJtaXRxdWV1ZS5zdG92ZXBpcGUiHgoLUGluZ1JlcXVlc3QSDwoHbWVzc2FnZRgBIAEoCSJaCgxQaW5nUmVzcG9uc2USDwoHbWVzc2FnZRgBIAEoCRIUCgxzZXJ2aWNlX25hbWUYAiABKAkSEQoJdGltZXN0YW1wGAMgASgDEhAKCGhvc3RuYW1lGAQgASgJIh4KDUluZ2VzdFJlcXVlc3QSDQoFcXVldWUYASABKAkiHAoOSW5nZXN0UmVzcG9uc2USCgoCaWQYASABKAkiQQocR2V0UmVxdWVzdEhpc3RvcnlCeUlEUmVxdWVzdBINCgVxdWV1ZRgBIAEoCRISCgpyZXF1ZXN0X2lkGAIgASgJIjsKHUdldFJlcXVlc3RIaXN0b3J5QnlVUklSZXF1ZXN0Eg0KBXF1ZXVlGAEgASgJEgsKA3VyaRgCIAEoCSKGAQoMSGlzd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GUuR2V0UmVxdWVzdEhpc3RvcnlCeVVSSVJlc3BvbnNlIgASiwEKFEdldFByb2plY3RTdGF0dXNCeUlEEjcudWJlci5zdWJtaXRxdWV1ZS5zdG92ZXBpcGUuR2V0UHJvamVjdFN0YXR1c0J5SURSZXF1ZXN0GjgudWJlci5zdWJtaXRxdWV1ZS5zdG92ZXBpcGUuR2V0UHJvamVjdFN0YXR1c0J5SURSZXNwb25zZSIAEo4BChVHZXRQcm9qZWN0U3RhdHVzQnlVUkkSOC51YmVyLnN1Ym1pdHF1ZXVlLnN0b3ZlcGlwZS5HZXRQcm9qZWN0U3RhdHVzQnlVUklSZXF1ZXN0GjkudWJlci5zdWJtaXRxdWV1ZS5zdG92ZXBpcGUuR2V0UHJvamVjdFN0YXR1c0J5VVJJUmVzcG9uc2UiABJbCgRMaXN0EicudWJlci5zdWJtaXRxdWV1ZS5zdG92ZXBpcGUuTGlzdFJlcXVlc3QaKC51YmVyLnN1Ym1pdHF1ZXVlLnN0b3ZlcGlwZS5MaXN0UmVzcG9uc2UiABJ5Cg5HZXRRdWV1ZVN0YXR1cxIxLnViZXIuc3VibWl0cXVldWUuc3RvdmVwaXBlLkdldFF1ZXVlU3RhdHVzUmVxdWVzdBoyLnViZXIuc3VibWl0cXVldWUuc3RvdmVwaXBlLkdldFF1ZXVlU3RhdHVzUmVzcG9uc2UiAEJlCh5jb20udWJlci5zdWJtaXRxdWV1ZS5zdG92ZXBpcGVCDlN0b3ZlcGlwZVByb3RvUAFaMWdpdGh1Yi5jb20vdWJlci9zdWJtaXRxdWV1ZS9hcGkvc3RvdmVwaXBlL3Byb3RvcGJiBnByb3RvMw"); /** * PingRequest is the request for the Ping method @@ -803,6 +803,130 @@ export type ListResponse = Message<"uber.submitqueue.stovepipe.ListResponse"> & export const ListResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_api_stovepipe_proto_stovepipe, 17); +/** + * @generated from message uber.submitqueue.stovepipe.GetQueueStatusRequest + */ +export type GetQueueStatusRequest = Message<"uber.submitqueue.stovepipe.GetQueueStatusRequest"> & { + /** + * Required stable repo-and-ref queue name. + * + * @generated from field: string queue = 1; + */ + queue: string; + + /** + * Optional immutable commit URI. Empty selects the latest materialized state. + * + * @generated from field: string change_uri = 2; + */ + changeUri: string; +}; + +/** + * Describes the message uber.submitqueue.stovepipe.GetQueueStatusRequest. + * Use `create(GetQueueStatusRequestSchema)` to create a new message. + */ +export const GetQueueStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_api_stovepipe_proto_stovepipe, 18); + +/** + * QueueEnablementStatus describes applied enablement. + * + * @generated from message uber.submitqueue.stovepipe.QueueEnablementStatus + */ +export type QueueEnablementStatus = Message<"uber.submitqueue.stovepipe.QueueEnablementStatus"> & { + /** + * Positive enablement sequence, increasing with each state change. + * + * @generated from field: int64 version = 1; + */ + version: bigint; + + /** + * Applied enablement. Successful lookups never return UNKNOWN. + * + * @generated from field: uber.submitqueue.stovepipe.QueueEnablement state = 2; + */ + state: QueueEnablement; + + /** + * Inclusive first covered commit. Empty only for initial DISABLED version 1. + * + * @generated from field: string effective_from_commit_uri = 3; + */ + effectiveFromCommitUri: string; + + /** + * Application timestamp in Unix milliseconds, not source-control commit time. + * + * @generated from field: int64 changed_at_ms = 4; + */ + changedAtMs: bigint; +}; + +/** + * Describes the message uber.submitqueue.stovepipe.QueueEnablementStatus. + * Use `create(QueueEnablementStatusSchema)` to create a new message. + */ +export const QueueEnablementStatusSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_api_stovepipe_proto_stovepipe, 19); + +/** + * @generated from message uber.submitqueue.stovepipe.GetQueueStatusResponse + */ +export type GetQueueStatusResponse = Message<"uber.submitqueue.stovepipe.GetQueueStatusResponse"> & { + /** + * Queue selected by the request. + * + * @generated from field: string queue = 1; + */ + queue: string; + + /** + * Current enablement, or enablement covering change_uri. Always present on success. + * + * @generated from field: uber.submitqueue.stovepipe.QueueEnablementStatus enablement = 2; + */ + enablement?: QueueEnablementStatus | undefined; +}; + +/** + * Describes the message uber.submitqueue.stovepipe.GetQueueStatusResponse. + * Use `create(GetQueueStatusResponseSchema)` to create a new message. + */ +export const GetQueueStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_api_stovepipe_proto_stovepipe, 20); + +/** + * QueueEnablement is independent of validation results and execution controls. + * + * @generated from enum uber.submitqueue.stovepipe.QueueEnablement + */ +export enum QueueEnablement { + /** + * Unknown is never an explicit disablement. + * + * @generated from enum value: QUEUE_ENABLEMENT_UNKNOWN = 0; + */ + UNKNOWN = 0, + + /** + * @generated from enum value: QUEUE_ENABLEMENT_ENABLED = 1; + */ + ENABLED = 1, + + /** + * @generated from enum value: QUEUE_ENABLEMENT_DISABLED = 2; + */ + DISABLED = 2, +} + +/** + * Describes the enum uber.submitqueue.stovepipe.QueueEnablement. + */ +export const QueueEnablementSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_api_stovepipe_proto_stovepipe, 0); + /** * Stovepipe provides the Stovepipe API. * @@ -880,6 +1004,16 @@ export const Stovepipe: GenService<{ input: typeof ListRequestSchema; output: typeof ListResponseSchema; }, + /** + * GetQueueStatus returns current enablement or enablement for a supplied commit. + * + * @generated from rpc uber.submitqueue.stovepipe.Stovepipe.GetQueueStatus + */ + getQueueStatus: { + methodKind: "unary"; + input: typeof GetQueueStatusRequestSchema; + output: typeof GetQueueStatusResponseSchema; + }, }> = /*@__PURE__*/ serviceDesc(file_api_stovepipe_proto_stovepipe, 0);