From 808e5617b526030214212b381534a60a110820f3 Mon Sep 17 00:00:00 2001 From: sergeyb Date: Wed, 11 Feb 2026 18:45:40 +0000 Subject: [PATCH] [feat] Proto API for Gateway service --- gateway/controller/BUILD.bazel | 4 +- gateway/controller/land.go | 54 +++ gateway/controller/land_test.go | 34 ++ gateway/proto/gateway.proto | 68 ++++ gateway/protopb/gateway.pb.go | 390 ++++++++++++++++++- gateway/protopb/gateway.pb.yarpc.go | 99 ++++- gateway/protopb/gateway_grpc.pb.go | 50 ++- orchestrator/protopb/orchestrator.pb.go | 4 +- orchestrator/protopb/orchestrator_grpc.pb.go | 8 +- speculator/protopb/speculator.pb.go | 4 +- speculator/protopb/speculator_grpc.pb.go | 8 +- 11 files changed, 672 insertions(+), 51 deletions(-) create mode 100644 gateway/controller/land.go create mode 100644 gateway/controller/land_test.go diff --git a/gateway/controller/BUILD.bazel b/gateway/controller/BUILD.bazel index c1b6a0b2..80fe6899 100644 --- a/gateway/controller/BUILD.bazel +++ b/gateway/controller/BUILD.bazel @@ -2,7 +2,7 @@ load("@rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "controller", - srcs = ["ping.go"], + srcs = ["ping.go", "land.go"], importpath = "github.com/uber/submitqueue/gateway/controller", visibility = ["//visibility:public"], deps = [ @@ -14,7 +14,7 @@ go_library( go_test( name = "controller_test", - srcs = ["ping_test.go"], + srcs = ["ping_test.go", "land_test.go"], embed = [":controller"], deps = ["//gateway/protopb"], ) diff --git a/gateway/controller/land.go b/gateway/controller/land.go new file mode 100644 index 00000000..e9f090bd --- /dev/null +++ b/gateway/controller/land.go @@ -0,0 +1,54 @@ +package controller + +import ( + "context" + "fmt" + "time" + + "github.com/uber-go/tally/v4" + pb "github.com/uber/submitqueue/gateway/protopb" + "go.uber.org/zap" +) + +// LandController handles land business logic for the gateway +type LandController struct { + logger *zap.Logger + metricsScope tally.Scope +} + +// NewLandController creates a new instance of the gateway land controller +func NewLandController(logger *zap.Logger, scope tally.Scope) *LandController { + if logger == nil { + logger = zap.NewNop() + } + if scope == nil { + scope = tally.NoopScope + } + + return &LandController{ + logger: logger, + metricsScope: scope, + } +} + +// Land handles the land request and returns a response +func (c *LandController) Land(ctx context.Context, req *pb.LandRequest) (*pb.LandResponse, error) { + start := time.Now() + defer func() { + c.metricsScope.Timer("land_request_latency").Record(time.Since(start)) + }() + + c.metricsScope.Counter("land_request_count").Inc(1) + + // TODO: Implement proper SQID generation and send the request to the appropriate queue. So far unix time to make it sequential. + sqid := fmt.Sprintf("%d", time.Now().Unix()) + + c.logger.Debug("land request received", + zap.String("queue", req.Queue), + zap.String("sqid", sqid), + ) + + return &pb.LandResponse{ + Sqid: sqid, + }, nil +} diff --git a/gateway/controller/land_test.go b/gateway/controller/land_test.go new file mode 100644 index 00000000..efb5f13c --- /dev/null +++ b/gateway/controller/land_test.go @@ -0,0 +1,34 @@ +package controller + +import ( + "context" + "testing" + + pb "github.com/uber/submitqueue/gateway/protopb" +) + +func TestNewLandController(t *testing.T) { + controller := NewLandController(nil, nil) + if controller == nil { + t.Fatal("NewLandController() returned nil") + } +} + +func TestLand_ReturnsSqid(t *testing.T) { + controller := NewLandController(nil, nil) + ctx := context.Background() + + req := &pb.LandRequest{ + Queue: "test-queue", + Change: &pb.Change{Source: "github", Ids: []string{"123"}}, + } + resp, err := controller.Land(ctx, req) + + if err != nil { + t.Fatalf("Land() returned error: %v", err) + } + + if resp.Sqid == "" { + t.Fatal("Expected sqid to be set, got empty string") + } +} diff --git a/gateway/proto/gateway.proto b/gateway/proto/gateway.proto index 5088e722..1c04bc83 100644 --- a/gateway/proto/gateway.proto +++ b/gateway/proto/gateway.proto @@ -7,6 +7,10 @@ option java_multiple_files = true; option java_outer_classname = "GatewayProto"; option java_package = "com.uber.devexp.submitqueue.gateway"; +// *************** +// API domain definitions. +// *************** + // PingRequest is the request for the Ping method message PingRequest { // Optional message to include in the ping @@ -25,8 +29,72 @@ message PingResponse { string hostname = 4; } +// Strategy defines the possible source control integration methods +enum Strategy { + // Default strategy (let server decide based on configuration) + STRATEGY_DEFAULT = 0; + // Rebase commits onto target branch before landing + STRATEGY_REBASE = 1; + // Same as REBASE but squash commits into a single commit before rebase + STRATEGY_SQUASH_REBASE = 2; + // Merge commits into the target branch by creating a separate merge commit, preserving the commit history along with hashes + STRATEGY_MERGE = 3; +} + +// Change represents a set of related code changes identified by one or more IDs from a particular code change provider, like Github Pull Requests. +message Change { + // The code change provider (e.g., "github", "gerrit", "phabricator"). + string source = 1; + // List of change IDs, in a format specific to the code change provider, that should be landed together. SubmitQueue guarantees that the changes are landed in the order of the list, + // and no other changes are landed in between. SubmitQueue does not guarantee that each change is individually valid, but produces a special validity + // marker on such changes. The user is responsible to include all changes in a change stack in the order of the list, starting from the earlist change. + repeated string ids = 2; +} + +// LandRequest defines a request to land (merge into target branch of the source control repository) a set of code changes. +message LandRequest { + // Name of the queue processing the land request. The queue should be defined in the configuration, otherwise an error is returned. + string queue = 1; + // Change (such as a pull request) to land into the target branch. Target branch is defined by the queue configuration. + Change change = 2; + // Source control integration strategy to use for this land operation. If not specified, the default queue strategy is used. + Strategy strategy = 4; +} + +// LandResponse defines the response to a land request. +message LandResponse { + // Globally unique identifier for the land request. Used to track the land request lifecycle. + string sqid = 1; +} + +// *************** +// Error messages, returned as `google.rpc.Status` messages. +// *************** + +// Generic error with metadata. Each custom error type should extend this message. +message Error { + // Free text error message describing the error. + string message = 1; +} + +// UnrecognizedQueueError is returned when a queue name is not recognized. Typically this indicates a typo in the queue name or server misconfiguration. +message UnrecognizedQueueError { + // Free text error message describing the error. + Error error = 1; + // Name of the queue that was not recognized. + string queue = 2; +} + +// *************** +// Service definitions. +// *************** + // SubmitQueueGateway provides the gateway API service SubmitQueueGateway { // Ping returns a response indicating the service is alive rpc Ping(PingRequest) returns (PingResponse) {} + + // Land lands a set of code changes into a target branch, performing the necessary validations across all other changes in the queue. + // The processing is asynchronous and returns a LandResponse immediately. The land request is processed in the background. + rpc Land(LandRequest) returns (LandResponse) {} } diff --git a/gateway/protopb/gateway.pb.go b/gateway/protopb/gateway.pb.go index 08c4db59..95aaefb2 100644 --- a/gateway/protopb/gateway.pb.go +++ b/gateway/protopb/gateway.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.10 -// protoc v5.29.3 +// protoc-gen-go v1.36.11 +// protoc v3.21.12 // source: gateway.proto package protopb @@ -21,6 +21,63 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Strategy defines the possible source control integration methods +type Strategy int32 + +const ( + // Default strategy (let server decide based on configuration) + Strategy_STRATEGY_DEFAULT Strategy = 0 + // Rebase commits onto target branch before landing + Strategy_STRATEGY_REBASE Strategy = 1 + // Same as REBASE but squash commits into a single commit before rebase + Strategy_STRATEGY_SQUASH_REBASE Strategy = 2 + // Merge commits into the target branch by creating a separate merge commit, preserving the commit history along with hashes + Strategy_STRATEGY_MERGE Strategy = 3 +) + +// Enum value maps for Strategy. +var ( + Strategy_name = map[int32]string{ + 0: "STRATEGY_DEFAULT", + 1: "STRATEGY_REBASE", + 2: "STRATEGY_SQUASH_REBASE", + 3: "STRATEGY_MERGE", + } + Strategy_value = map[string]int32{ + "STRATEGY_DEFAULT": 0, + "STRATEGY_REBASE": 1, + "STRATEGY_SQUASH_REBASE": 2, + "STRATEGY_MERGE": 3, + } +) + +func (x Strategy) Enum() *Strategy { + p := new(Strategy) + *p = x + return p +} + +func (x Strategy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Strategy) Descriptor() protoreflect.EnumDescriptor { + return file_gateway_proto_enumTypes[0].Descriptor() +} + +func (Strategy) Type() protoreflect.EnumType { + return &file_gateway_proto_enumTypes[0] +} + +func (x Strategy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Strategy.Descriptor instead. +func (Strategy) EnumDescriptor() ([]byte, []int) { + return file_gateway_proto_rawDescGZIP(), []int{0} +} + // PingRequest is the request for the Ping method type PingRequest struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -140,6 +197,274 @@ func (x *PingResponse) GetHostname() string { return "" } +// Change represents a set of related code changes identified by one or more IDs from a particular code change provider, like Github Pull Requests. +type Change struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The code change provider (e.g., "github", "gerrit", "phabricator"). + Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + // List of change IDs, in a format specific to the code change provider, that should be landed together. SubmitQueue guarantees that the changes are landed in the order of the list, + // and no other changes are landed in between. SubmitQueue does not guarantee that each change is individually valid, but produces a special validity + // marker on such changes. The user is responsible to include all changes in a change stack in the order of the list, starting from the earlist change. + Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Change) Reset() { + *x = Change{} + mi := &file_gateway_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Change) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Change) ProtoMessage() {} + +func (x *Change) ProtoReflect() protoreflect.Message { + mi := &file_gateway_proto_msgTypes[2] + 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 Change.ProtoReflect.Descriptor instead. +func (*Change) Descriptor() ([]byte, []int) { + return file_gateway_proto_rawDescGZIP(), []int{2} +} + +func (x *Change) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *Change) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +// LandRequest defines a request to land (merge into target branch of the source control repository) a set of code changes. +type LandRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Name of the queue processing the land request. The queue should be defined in the configuration, otherwise an error is returned. + Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` + // Change (such as a pull request) to land into the target branch. Target branch is defined by the queue configuration. + Change *Change `protobuf:"bytes,2,opt,name=change,proto3" json:"change,omitempty"` + // Source control integration strategy to use for this land operation. If not specified, the default queue strategy is used. + Strategy Strategy `protobuf:"varint,4,opt,name=strategy,proto3,enum=uber.devexp.submitqueue.gateway.Strategy" json:"strategy,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LandRequest) Reset() { + *x = LandRequest{} + mi := &file_gateway_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LandRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LandRequest) ProtoMessage() {} + +func (x *LandRequest) ProtoReflect() protoreflect.Message { + mi := &file_gateway_proto_msgTypes[3] + 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 LandRequest.ProtoReflect.Descriptor instead. +func (*LandRequest) Descriptor() ([]byte, []int) { + return file_gateway_proto_rawDescGZIP(), []int{3} +} + +func (x *LandRequest) GetQueue() string { + if x != nil { + return x.Queue + } + return "" +} + +func (x *LandRequest) GetChange() *Change { + if x != nil { + return x.Change + } + return nil +} + +func (x *LandRequest) GetStrategy() Strategy { + if x != nil { + return x.Strategy + } + return Strategy_STRATEGY_DEFAULT +} + +// LandResponse defines the response to a land request. +type LandResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Globally unique identifier for the land request. Used to track the land request lifecycle. + Sqid string `protobuf:"bytes,1,opt,name=sqid,proto3" json:"sqid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LandResponse) Reset() { + *x = LandResponse{} + mi := &file_gateway_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LandResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LandResponse) ProtoMessage() {} + +func (x *LandResponse) ProtoReflect() protoreflect.Message { + mi := &file_gateway_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 LandResponse.ProtoReflect.Descriptor instead. +func (*LandResponse) Descriptor() ([]byte, []int) { + return file_gateway_proto_rawDescGZIP(), []int{4} +} + +func (x *LandResponse) GetSqid() string { + if x != nil { + return x.Sqid + } + return "" +} + +// Generic error with metadata. Each custom error type should extend this message. +type Error struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Free text error message describing the error. + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Error) Reset() { + *x = Error{} + mi := &file_gateway_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Error) ProtoMessage() {} + +func (x *Error) ProtoReflect() protoreflect.Message { + mi := &file_gateway_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 Error.ProtoReflect.Descriptor instead. +func (*Error) Descriptor() ([]byte, []int) { + return file_gateway_proto_rawDescGZIP(), []int{5} +} + +func (x *Error) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// UnrecognizedQueueError is returned when a queue name is not recognized. Typically this indicates a typo in the queue name or server misconfiguration. +type UnrecognizedQueueError struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Free text error message describing the error. + Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + // Name of the queue that was not recognized. + Queue string `protobuf:"bytes,2,opt,name=queue,proto3" json:"queue,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnrecognizedQueueError) Reset() { + *x = UnrecognizedQueueError{} + mi := &file_gateway_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnrecognizedQueueError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnrecognizedQueueError) ProtoMessage() {} + +func (x *UnrecognizedQueueError) ProtoReflect() protoreflect.Message { + mi := &file_gateway_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 UnrecognizedQueueError.ProtoReflect.Descriptor instead. +func (*UnrecognizedQueueError) Descriptor() ([]byte, []int) { + return file_gateway_proto_rawDescGZIP(), []int{6} +} + +func (x *UnrecognizedQueueError) GetError() *Error { + if x != nil { + return x.Error + } + return nil +} + +func (x *UnrecognizedQueueError) GetQueue() string { + if x != nil { + return x.Queue + } + return "" +} + var File_gateway_proto protoreflect.FileDescriptor const file_gateway_proto_rawDesc = "" + @@ -151,9 +476,29 @@ const file_gateway_proto_rawDesc = "" + "\amessage\x18\x01 \x01(\tR\amessage\x12!\n" + "\fservice_name\x18\x02 \x01(\tR\vserviceName\x12\x1c\n" + "\ttimestamp\x18\x03 \x01(\x03R\ttimestamp\x12\x1a\n" + - "\bhostname\x18\x04 \x01(\tR\bhostname2{\n" + + "\bhostname\x18\x04 \x01(\tR\bhostname\"2\n" + + "\x06Change\x12\x16\n" + + "\x06source\x18\x01 \x01(\tR\x06source\x12\x10\n" + + "\x03ids\x18\x02 \x03(\tR\x03ids\"\xab\x01\n" + + "\vLandRequest\x12\x14\n" + + "\x05queue\x18\x01 \x01(\tR\x05queue\x12?\n" + + "\x06change\x18\x02 \x01(\v2'.uber.devexp.submitqueue.gateway.ChangeR\x06change\x12E\n" + + "\bstrategy\x18\x04 \x01(\x0e2).uber.devexp.submitqueue.gateway.StrategyR\bstrategy\"\"\n" + + "\fLandResponse\x12\x12\n" + + "\x04sqid\x18\x01 \x01(\tR\x04sqid\"!\n" + + "\x05Error\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\"l\n" + + "\x16UnrecognizedQueueError\x12<\n" + + "\x05error\x18\x01 \x01(\v2&.uber.devexp.submitqueue.gateway.ErrorR\x05error\x12\x14\n" + + "\x05queue\x18\x02 \x01(\tR\x05queue*e\n" + + "\bStrategy\x12\x14\n" + + "\x10STRATEGY_DEFAULT\x10\x00\x12\x13\n" + + "\x0fSTRATEGY_REBASE\x10\x01\x12\x1a\n" + + "\x16STRATEGY_SQUASH_REBASE\x10\x02\x12\x12\n" + + "\x0eSTRATEGY_MERGE\x10\x032\xe2\x01\n" + "\x12SubmitQueueGateway\x12e\n" + - "\x04Ping\x12,.uber.devexp.submitqueue.gateway.PingRequest\x1a-.uber.devexp.submitqueue.gateway.PingResponse\"\x00Bb\n" + + "\x04Ping\x12,.uber.devexp.submitqueue.gateway.PingRequest\x1a-.uber.devexp.submitqueue.gateway.PingResponse\"\x00\x12e\n" + + "\x04Land\x12,.uber.devexp.submitqueue.gateway.LandRequest\x1a-.uber.devexp.submitqueue.gateway.LandResponse\"\x00Bb\n" + "#com.uber.devexp.submitqueue.gatewayB\fGatewayProtoP\x01Z+github.com/uber/submitqueue/gateway/protopbb\x06proto3" var ( @@ -168,19 +513,31 @@ func file_gateway_proto_rawDescGZIP() []byte { return file_gateway_proto_rawDescData } -var file_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_gateway_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_gateway_proto_goTypes = []any{ - (*PingRequest)(nil), // 0: uber.devexp.submitqueue.gateway.PingRequest - (*PingResponse)(nil), // 1: uber.devexp.submitqueue.gateway.PingResponse + (Strategy)(0), // 0: uber.devexp.submitqueue.gateway.Strategy + (*PingRequest)(nil), // 1: uber.devexp.submitqueue.gateway.PingRequest + (*PingResponse)(nil), // 2: uber.devexp.submitqueue.gateway.PingResponse + (*Change)(nil), // 3: uber.devexp.submitqueue.gateway.Change + (*LandRequest)(nil), // 4: uber.devexp.submitqueue.gateway.LandRequest + (*LandResponse)(nil), // 5: uber.devexp.submitqueue.gateway.LandResponse + (*Error)(nil), // 6: uber.devexp.submitqueue.gateway.Error + (*UnrecognizedQueueError)(nil), // 7: uber.devexp.submitqueue.gateway.UnrecognizedQueueError } var file_gateway_proto_depIdxs = []int32{ - 0, // 0: uber.devexp.submitqueue.gateway.SubmitQueueGateway.Ping:input_type -> uber.devexp.submitqueue.gateway.PingRequest - 1, // 1: uber.devexp.submitqueue.gateway.SubmitQueueGateway.Ping:output_type -> uber.devexp.submitqueue.gateway.PingResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] 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 + 3, // 0: uber.devexp.submitqueue.gateway.LandRequest.change:type_name -> uber.devexp.submitqueue.gateway.Change + 0, // 1: uber.devexp.submitqueue.gateway.LandRequest.strategy:type_name -> uber.devexp.submitqueue.gateway.Strategy + 6, // 2: uber.devexp.submitqueue.gateway.UnrecognizedQueueError.error:type_name -> uber.devexp.submitqueue.gateway.Error + 1, // 3: uber.devexp.submitqueue.gateway.SubmitQueueGateway.Ping:input_type -> uber.devexp.submitqueue.gateway.PingRequest + 4, // 4: uber.devexp.submitqueue.gateway.SubmitQueueGateway.Land:input_type -> uber.devexp.submitqueue.gateway.LandRequest + 2, // 5: uber.devexp.submitqueue.gateway.SubmitQueueGateway.Ping:output_type -> uber.devexp.submitqueue.gateway.PingResponse + 5, // 6: uber.devexp.submitqueue.gateway.SubmitQueueGateway.Land:output_type -> uber.devexp.submitqueue.gateway.LandResponse + 5, // [5:7] is the sub-list for method output_type + 3, // [3:5] 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_gateway_proto_init() } @@ -193,13 +550,14 @@ func file_gateway_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_gateway_proto_rawDesc), len(file_gateway_proto_rawDesc)), - NumEnums: 0, - NumMessages: 2, + NumEnums: 1, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, GoTypes: file_gateway_proto_goTypes, DependencyIndexes: file_gateway_proto_depIdxs, + EnumInfos: file_gateway_proto_enumTypes, MessageInfos: file_gateway_proto_msgTypes, }.Build() File_gateway_proto = out.File diff --git a/gateway/protopb/gateway.pb.yarpc.go b/gateway/protopb/gateway.pb.yarpc.go index 002dd349..1ca1e537 100644 --- a/gateway/protopb/gateway.pb.yarpc.go +++ b/gateway/protopb/gateway.pb.yarpc.go @@ -23,6 +23,7 @@ var _ = ioutil.NopCloser // SubmitQueueGatewayYARPCClient is the YARPC client-side interface for the SubmitQueueGateway service. type SubmitQueueGatewayYARPCClient interface { Ping(context.Context, *PingRequest, ...yarpc.CallOption) (*PingResponse, error) + Land(context.Context, *LandRequest, ...yarpc.CallOption) (*LandResponse, error) } func newSubmitQueueGatewayYARPCClient(clientConfig transport.ClientConfig, anyResolver jsonpb.AnyResolver, options ...protobuf.ClientOption) SubmitQueueGatewayYARPCClient { @@ -44,6 +45,7 @@ func NewSubmitQueueGatewayYARPCClient(clientConfig transport.ClientConfig, optio // SubmitQueueGatewayYARPCServer is the YARPC server-side interface for the SubmitQueueGateway service. type SubmitQueueGatewayYARPCServer interface { Ping(context.Context, *PingRequest) (*PingResponse, error) + Land(context.Context, *LandRequest) (*LandResponse, error) } type buildSubmitQueueGatewayYARPCProceduresParams struct { @@ -67,6 +69,16 @@ func buildSubmitQueueGatewayYARPCProcedures(params buildSubmitQueueGatewayYARPCP }, ), }, + { + MethodName: "Land", + Handler: protobuf.NewUnaryHandler( + protobuf.UnaryHandlerParams{ + Handle: handler.Land, + NewRequest: newSubmitQueueGatewayServiceLandYARPCRequest, + AnyResolver: params.AnyResolver, + }, + ), + }, }, OnewayHandlerParams: []protobuf.BuildProceduresOnewayHandlerParams{}, StreamHandlerParams: []protobuf.BuildProceduresStreamHandlerParams{}, @@ -197,6 +209,18 @@ func (c *_SubmitQueueGatewayYARPCCaller) Ping(ctx context.Context, request *Ping return response, err } +func (c *_SubmitQueueGatewayYARPCCaller) Land(ctx context.Context, request *LandRequest, options ...yarpc.CallOption) (*LandResponse, error) { + responseMessage, err := c.streamClient.Call(ctx, "Land", request, newSubmitQueueGatewayServiceLandYARPCResponse, options...) + if responseMessage == nil { + return nil, err + } + response, ok := responseMessage.(*LandResponse) + if !ok { + return nil, protobuf.CastError(emptySubmitQueueGatewayServiceLandYARPCResponse, responseMessage) + } + return response, err +} + type _SubmitQueueGatewayYARPCHandler struct { server SubmitQueueGatewayYARPCServer } @@ -217,6 +241,22 @@ func (h *_SubmitQueueGatewayYARPCHandler) Ping(ctx context.Context, requestMessa return response, err } +func (h *_SubmitQueueGatewayYARPCHandler) Land(ctx context.Context, requestMessage proto.Message) (proto.Message, error) { + var request *LandRequest + var ok bool + if requestMessage != nil { + request, ok = requestMessage.(*LandRequest) + if !ok { + return nil, protobuf.CastError(emptySubmitQueueGatewayServiceLandYARPCRequest, requestMessage) + } + } + response, err := h.server.Land(ctx, request) + if response == nil { + return nil, err + } + return response, err +} + func newSubmitQueueGatewayServicePingYARPCRequest() proto.Message { return &PingRequest{} } @@ -225,31 +265,56 @@ func newSubmitQueueGatewayServicePingYARPCResponse() proto.Message { return &PingResponse{} } +func newSubmitQueueGatewayServiceLandYARPCRequest() proto.Message { + return &LandRequest{} +} + +func newSubmitQueueGatewayServiceLandYARPCResponse() proto.Message { + return &LandResponse{} +} + var ( emptySubmitQueueGatewayServicePingYARPCRequest = &PingRequest{} emptySubmitQueueGatewayServicePingYARPCResponse = &PingResponse{} + emptySubmitQueueGatewayServiceLandYARPCRequest = &LandRequest{} + emptySubmitQueueGatewayServiceLandYARPCResponse = &LandResponse{} ) var yarpcFileDescriptorClosuref1a937782ebbded5 = [][]byte{ // gateway.proto []byte{ - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xb1, 0x4e, 0xc3, 0x30, - 0x10, 0x86, 0x31, 0xad, 0x80, 0x5e, 0xc3, 0xe2, 0x29, 0xaa, 0x90, 0x28, 0x61, 0xa0, 0x12, 0xe0, - 0x48, 0xf0, 0x06, 0x5d, 0xd8, 0x50, 0x08, 0x1b, 0x0b, 0xb2, 0xc3, 0x29, 0xf5, 0xe0, 0xd8, 0xcd, - 0xd9, 0x05, 0xc4, 0xcc, 0x7b, 0xa3, 0x38, 0x01, 0xba, 0xa0, 0xb2, 0xf9, 0xce, 0xff, 0x27, 0xdd, - 0xa7, 0x1f, 0x8e, 0x6b, 0xe9, 0xf1, 0x55, 0xbe, 0x0b, 0xd7, 0x5a, 0x6f, 0xf9, 0x69, 0x50, 0xd8, - 0x8a, 0x17, 0xdc, 0xe0, 0x9b, 0x13, 0x14, 0x94, 0xd1, 0x7e, 0x1d, 0x30, 0xa0, 0x18, 0x62, 0xd9, - 0x05, 0x4c, 0x0b, 0xdd, 0xd4, 0x25, 0xae, 0x03, 0x92, 0xe7, 0x29, 0x1c, 0x1a, 0x24, 0x92, 0x35, - 0xa6, 0x6c, 0xce, 0x16, 0x93, 0xf2, 0x7b, 0xcc, 0x3e, 0x19, 0x24, 0x7d, 0x92, 0x9c, 0x6d, 0x08, - 0xff, 0x8e, 0xf2, 0x33, 0x48, 0x08, 0xdb, 0x8d, 0xae, 0xf0, 0xb9, 0x91, 0x06, 0xd3, 0xfd, 0xf8, - 0x3d, 0x1d, 0x76, 0xf7, 0xd2, 0x20, 0x3f, 0x81, 0x89, 0xd7, 0x06, 0xc9, 0x4b, 0xe3, 0xd2, 0xd1, - 0x9c, 0x2d, 0x46, 0xe5, 0xef, 0x82, 0xcf, 0xe0, 0x68, 0x65, 0xc9, 0x47, 0x78, 0x1c, 0xe1, 0x9f, - 0xf9, 0xe6, 0x03, 0xf8, 0x63, 0xf4, 0x78, 0xe8, 0x3c, 0xee, 0x7a, 0x0d, 0x8e, 0x30, 0xee, 0x8e, - 0xe3, 0x57, 0x62, 0x87, 0xb0, 0xd8, 0xb2, 0x9d, 0x5d, 0xff, 0x33, 0xdd, 0x1b, 0x67, 0x7b, 0x4b, - 0x05, 0xe7, 0x95, 0x35, 0xbb, 0xa8, 0x65, 0x32, 0x9c, 0x55, 0x74, 0x1d, 0x14, 0xec, 0xe9, 0xb2, - 0xd6, 0x7e, 0x15, 0x94, 0xa8, 0xac, 0xc9, 0x3b, 0x36, 0xdf, 0x82, 0xf2, 0x01, 0xca, 0x63, 0x61, - 0x4e, 0xa9, 0x83, 0xf8, 0xb8, 0xfd, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x91, 0x32, 0x51, 0xa7, 0xca, - 0x01, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4b, 0x6f, 0xd3, 0x40, + 0x10, 0xc7, 0xeb, 0xbc, 0x48, 0x26, 0xa1, 0x44, 0x4b, 0x15, 0x59, 0x11, 0x12, 0xa9, 0x91, 0x68, + 0x78, 0x39, 0x92, 0xb9, 0x22, 0xa1, 0x04, 0x4c, 0x38, 0x14, 0x94, 0xae, 0x93, 0x03, 0x5c, 0x2a, + 0x3f, 0x46, 0x8e, 0x25, 0xfc, 0x88, 0x77, 0x5d, 0x28, 0x77, 0x3e, 0x0d, 0xdf, 0x8a, 0x4f, 0x82, + 0xbc, 0x5e, 0xbb, 0xbe, 0x80, 0x73, 0x9b, 0x99, 0x9d, 0xdf, 0xce, 0x7f, 0x66, 0xd6, 0x86, 0xfb, + 0xbe, 0xcd, 0xf1, 0xbb, 0x7d, 0xab, 0x27, 0x69, 0xcc, 0x63, 0xf2, 0x38, 0x73, 0x30, 0xd5, 0x3d, + 0xbc, 0xc1, 0x1f, 0x89, 0xce, 0x32, 0x27, 0x0c, 0xf8, 0x21, 0xc3, 0x0c, 0x75, 0x99, 0xa6, 0x5d, + 0xc0, 0x70, 0x13, 0x44, 0x3e, 0xc5, 0x43, 0x86, 0x8c, 0x13, 0x15, 0xee, 0x85, 0xc8, 0x98, 0xed, + 0xa3, 0xaa, 0xcc, 0x94, 0xf9, 0x80, 0x96, 0xae, 0xf6, 0x4b, 0x81, 0x51, 0x91, 0xc9, 0x92, 0x38, + 0x62, 0xf8, 0xef, 0x54, 0x72, 0x0e, 0x23, 0x86, 0xe9, 0x4d, 0xe0, 0xe2, 0x75, 0x64, 0x87, 0xa8, + 0xb6, 0xc4, 0xf1, 0x50, 0xc6, 0x3e, 0xdb, 0x21, 0x92, 0x47, 0x30, 0xe0, 0x41, 0x88, 0x8c, 0xdb, + 0x61, 0xa2, 0xb6, 0x67, 0xca, 0xbc, 0x4d, 0xef, 0x02, 0x64, 0x0a, 0xfd, 0x7d, 0xcc, 0xb8, 0x80, + 0x3b, 0x02, 0xae, 0x7c, 0xcd, 0x80, 0xde, 0xbb, 0xbd, 0x1d, 0xf9, 0x48, 0x26, 0xd0, 0x63, 0x71, + 0x96, 0xba, 0x65, 0x7d, 0xe9, 0x91, 0x31, 0xb4, 0x03, 0x8f, 0xa9, 0xad, 0x59, 0x7b, 0x3e, 0xa0, + 0xb9, 0xa9, 0xfd, 0x56, 0x60, 0x78, 0x69, 0x47, 0x5e, 0xd9, 0xe5, 0x19, 0x74, 0xc5, 0x14, 0x24, + 0x58, 0x38, 0xe4, 0x2d, 0xf4, 0x5c, 0x71, 0xb3, 0x10, 0x3c, 0x34, 0x2e, 0xf4, 0x86, 0xe1, 0xe9, + 0x85, 0x10, 0x2a, 0x31, 0x62, 0x42, 0x9f, 0xf1, 0xd4, 0xe6, 0xe8, 0xdf, 0x0a, 0xd9, 0xa7, 0xc6, + 0xb3, 0xc6, 0x2b, 0x2c, 0x09, 0xd0, 0x0a, 0xd5, 0x34, 0x18, 0x15, 0x62, 0xe5, 0xa0, 0x09, 0x74, + 0xd8, 0x21, 0xf0, 0xa4, 0x58, 0x61, 0x6b, 0xe7, 0xd0, 0x35, 0xd3, 0x34, 0x4e, 0xff, 0xb3, 0xb0, + 0x6f, 0x30, 0xd9, 0x45, 0x29, 0xba, 0xb1, 0x1f, 0x05, 0x3f, 0xd1, 0xbb, 0xca, 0xcb, 0x16, 0xcc, + 0x1b, 0xe8, 0x62, 0x6e, 0x08, 0x62, 0x68, 0x3c, 0x6d, 0x14, 0x29, 0x30, 0x5a, 0x40, 0x77, 0xc3, + 0x6b, 0xd5, 0x86, 0xf7, 0x1c, 0xa1, 0x5f, 0xb6, 0x42, 0xce, 0x60, 0x6c, 0x6d, 0xe9, 0x72, 0x6b, + 0xae, 0xbf, 0x5c, 0xbf, 0x37, 0x3f, 0x2c, 0x77, 0x97, 0xdb, 0xf1, 0x09, 0x79, 0x08, 0x0f, 0xaa, + 0x28, 0x35, 0x57, 0x4b, 0xcb, 0x1c, 0x2b, 0x64, 0x0a, 0x93, 0x2a, 0x68, 0x5d, 0xed, 0x96, 0xd6, + 0xc7, 0xf2, 0xac, 0x45, 0x08, 0x9c, 0x56, 0x67, 0x9f, 0x4c, 0xba, 0x36, 0xc7, 0x6d, 0xe3, 0x8f, + 0x02, 0xc4, 0x12, 0x0a, 0x45, 0x3f, 0xeb, 0x42, 0x20, 0x41, 0xe8, 0xe4, 0x6f, 0x93, 0xbc, 0x6c, + 0x6c, 0xa5, 0xf6, 0xd8, 0xa7, 0xaf, 0x8e, 0xcc, 0x2e, 0xf6, 0xa0, 0x9d, 0xe4, 0x65, 0xf2, 0xcd, + 0x1c, 0x51, 0xa6, 0xf6, 0xda, 0x8e, 0x28, 0x53, 0x5f, 0xb7, 0x76, 0xb2, 0x72, 0xe0, 0x89, 0x1b, + 0x87, 0x4d, 0xd4, 0x6a, 0x24, 0xbb, 0xdf, 0xe4, 0x5f, 0xfa, 0x46, 0xf9, 0xfa, 0xc2, 0x0f, 0xf8, + 0x3e, 0x73, 0x74, 0x37, 0x0e, 0x17, 0x39, 0xbb, 0xa8, 0x41, 0x0b, 0x09, 0x2d, 0xc4, 0x6f, 0x21, + 0x71, 0x9c, 0x9e, 0x30, 0x5e, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x34, 0x94, 0xc4, 0x30, + 0x04, 0x00, 0x00, }, } diff --git a/gateway/protopb/gateway_grpc.pb.go b/gateway/protopb/gateway_grpc.pb.go index 74293266..04820f4d 100644 --- a/gateway/protopb/gateway_grpc.pb.go +++ b/gateway/protopb/gateway_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.3 +// - protoc-gen-go-grpc v1.6.1 +// - protoc v3.21.12 // source: gateway.proto package protopb @@ -20,6 +20,7 @@ const _ = grpc.SupportPackageIsVersion9 const ( SubmitQueueGateway_Ping_FullMethodName = "/uber.devexp.submitqueue.gateway.SubmitQueueGateway/Ping" + SubmitQueueGateway_Land_FullMethodName = "/uber.devexp.submitqueue.gateway.SubmitQueueGateway/Land" ) // SubmitQueueGatewayClient is the client API for SubmitQueueGateway service. @@ -30,6 +31,9 @@ const ( type SubmitQueueGatewayClient interface { // Ping returns a response indicating the service is alive Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) + // Land lands a set of code changes into a target branch, performing the necessary validations across all other changes in the queue. + // The processing is asynchronous and returns a LandResponse immediately. The land request is processed in the background. + Land(ctx context.Context, in *LandRequest, opts ...grpc.CallOption) (*LandResponse, error) } type submitQueueGatewayClient struct { @@ -50,6 +54,16 @@ func (c *submitQueueGatewayClient) Ping(ctx context.Context, in *PingRequest, op return out, nil } +func (c *submitQueueGatewayClient) Land(ctx context.Context, in *LandRequest, opts ...grpc.CallOption) (*LandResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LandResponse) + err := c.cc.Invoke(ctx, SubmitQueueGateway_Land_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // SubmitQueueGatewayServer is the server API for SubmitQueueGateway service. // All implementations must embed UnimplementedSubmitQueueGatewayServer // for forward compatibility. @@ -58,6 +72,9 @@ func (c *submitQueueGatewayClient) Ping(ctx context.Context, in *PingRequest, op type SubmitQueueGatewayServer interface { // Ping returns a response indicating the service is alive Ping(context.Context, *PingRequest) (*PingResponse, error) + // Land lands a set of code changes into a target branch, performing the necessary validations across all other changes in the queue. + // The processing is asynchronous and returns a LandResponse immediately. The land request is processed in the background. + Land(context.Context, *LandRequest) (*LandResponse, error) mustEmbedUnimplementedSubmitQueueGatewayServer() } @@ -69,7 +86,10 @@ type SubmitQueueGatewayServer interface { type UnimplementedSubmitQueueGatewayServer struct{} func (UnimplementedSubmitQueueGatewayServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") + return nil, status.Error(codes.Unimplemented, "method Ping not implemented") +} +func (UnimplementedSubmitQueueGatewayServer) Land(context.Context, *LandRequest) (*LandResponse, error) { + return nil, status.Error(codes.Unimplemented, "method Land not implemented") } func (UnimplementedSubmitQueueGatewayServer) mustEmbedUnimplementedSubmitQueueGatewayServer() {} func (UnimplementedSubmitQueueGatewayServer) testEmbeddedByValue() {} @@ -82,7 +102,7 @@ type UnsafeSubmitQueueGatewayServer interface { } func RegisterSubmitQueueGatewayServer(s grpc.ServiceRegistrar, srv SubmitQueueGatewayServer) { - // If the following call pancis, it indicates UnimplementedSubmitQueueGatewayServer was + // If the following call panics, it indicates UnimplementedSubmitQueueGatewayServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. @@ -110,6 +130,24 @@ func _SubmitQueueGateway_Ping_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _SubmitQueueGateway_Land_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LandRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubmitQueueGatewayServer).Land(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubmitQueueGateway_Land_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubmitQueueGatewayServer).Land(ctx, req.(*LandRequest)) + } + return interceptor(ctx, in, info, handler) +} + // SubmitQueueGateway_ServiceDesc is the grpc.ServiceDesc for SubmitQueueGateway service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -121,6 +159,10 @@ var SubmitQueueGateway_ServiceDesc = grpc.ServiceDesc{ MethodName: "Ping", Handler: _SubmitQueueGateway_Ping_Handler, }, + { + MethodName: "Land", + Handler: _SubmitQueueGateway_Land_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "gateway.proto", diff --git a/orchestrator/protopb/orchestrator.pb.go b/orchestrator/protopb/orchestrator.pb.go index 8d95c07c..35e0b0e9 100644 --- a/orchestrator/protopb/orchestrator.pb.go +++ b/orchestrator/protopb/orchestrator.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.10 -// protoc v5.29.3 +// protoc-gen-go v1.36.11 +// protoc v3.21.12 // source: orchestrator.proto package protopb diff --git a/orchestrator/protopb/orchestrator_grpc.pb.go b/orchestrator/protopb/orchestrator_grpc.pb.go index af424e1e..9597e2cf 100644 --- a/orchestrator/protopb/orchestrator_grpc.pb.go +++ b/orchestrator/protopb/orchestrator_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.3 +// - protoc-gen-go-grpc v1.6.1 +// - protoc v3.21.12 // source: orchestrator.proto package protopb @@ -69,7 +69,7 @@ type SubmitQueueOrchestratorServer interface { type UnimplementedSubmitQueueOrchestratorServer struct{} func (UnimplementedSubmitQueueOrchestratorServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") + return nil, status.Error(codes.Unimplemented, "method Ping not implemented") } func (UnimplementedSubmitQueueOrchestratorServer) mustEmbedUnimplementedSubmitQueueOrchestratorServer() { } @@ -83,7 +83,7 @@ type UnsafeSubmitQueueOrchestratorServer interface { } func RegisterSubmitQueueOrchestratorServer(s grpc.ServiceRegistrar, srv SubmitQueueOrchestratorServer) { - // If the following call pancis, it indicates UnimplementedSubmitQueueOrchestratorServer was + // If the following call panics, it indicates UnimplementedSubmitQueueOrchestratorServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. diff --git a/speculator/protopb/speculator.pb.go b/speculator/protopb/speculator.pb.go index 6be0c329..479fb8fd 100644 --- a/speculator/protopb/speculator.pb.go +++ b/speculator/protopb/speculator.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.10 -// protoc v5.29.3 +// protoc-gen-go v1.36.11 +// protoc v3.21.12 // source: speculator.proto package protopb diff --git a/speculator/protopb/speculator_grpc.pb.go b/speculator/protopb/speculator_grpc.pb.go index 0713e3da..4cca0f63 100644 --- a/speculator/protopb/speculator_grpc.pb.go +++ b/speculator/protopb/speculator_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.3 +// - protoc-gen-go-grpc v1.6.1 +// - protoc v3.21.12 // source: speculator.proto package protopb @@ -69,7 +69,7 @@ type SubmitQueueSpeculatorServer interface { type UnimplementedSubmitQueueSpeculatorServer struct{} func (UnimplementedSubmitQueueSpeculatorServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") + return nil, status.Error(codes.Unimplemented, "method Ping not implemented") } func (UnimplementedSubmitQueueSpeculatorServer) mustEmbedUnimplementedSubmitQueueSpeculatorServer() {} func (UnimplementedSubmitQueueSpeculatorServer) testEmbeddedByValue() {} @@ -82,7 +82,7 @@ type UnsafeSubmitQueueSpeculatorServer interface { } func RegisterSubmitQueueSpeculatorServer(s grpc.ServiceRegistrar, srv SubmitQueueSpeculatorServer) { - // If the following call pancis, it indicates UnimplementedSubmitQueueSpeculatorServer was + // If the following call panics, it indicates UnimplementedSubmitQueueSpeculatorServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O.