This is an automated email from the ASF dual-hosted git repository.
manirajv06 pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/yunikorn-scheduler-interface.git
The following commit(s) were added to refs/heads/master by this push:
new 579f6db [YUNIKORN-3434] Upgrade protoc in SI Makefile (#168)
579f6db is described below
commit 579f6db851f2cec1777705d1fed57b0e6a5a8d33
Author: andyhuangdev <[email protected]>
AuthorDate: Fri Aug 28 12:22:49 2026 +0530
[YUNIKORN-3434] Upgrade protoc in SI Makefile (#168)
Closes: #168
Signed-off-by: Manikandan R <[email protected]>
---
lib/go/Makefile | 4 +-
lib/go/si/si.pb.go | 2 +-
lib/go/si/si_grpc.pb.go | 221 +++++++++++++-----------------------------------
3 files changed, 64 insertions(+), 163 deletions(-)
diff --git a/lib/go/Makefile b/lib/go/Makefile
index 9f6a203..8a2920e 100644
--- a/lib/go/Makefile
+++ b/lib/go/Makefile
@@ -37,12 +37,12 @@ export GO111MODULE
# Only set PROTOC_VER if it has an empty value.
ifeq (,$(strip $(PROTOC_VER)))
-PROTOC_VER := 23.2
+PROTOC_VER := 36.0
endif
# Only set PROTOC_GEN_GO_GRPC_VER if it has an empty value.
ifeq (,$(strip $(PROTOC_GEN_GO_GRPC_VER)))
-PROTOC_GEN_GO_GRPC_VER := 1.3.0
+PROTOC_GEN_GO_GRPC_VER := 1.6.2
endif
PROTOC_OS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
diff --git a/lib/go/si/si.pb.go b/lib/go/si/si.pb.go
index e34db30..7b31a35 100644
--- a/lib/go/si/si.pb.go
+++ b/lib/go/si/si.pb.go
@@ -17,7 +17,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
-// protoc v4.23.2
+// protoc v7.36.0
// source: yunikorn-scheduler-interface/si.proto
package si
diff --git a/lib/go/si/si_grpc.pb.go b/lib/go/si/si_grpc.pb.go
index 471be99..801d30d 100644
--- a/lib/go/si/si_grpc.pb.go
+++ b/lib/go/si/si_grpc.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.3.0
-// - protoc v4.23.2
+// - protoc-gen-go-grpc v1.6.2
+// - protoc v7.36.0
// source: yunikorn-scheduler-interface/si.proto
package si
@@ -31,8 +31,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
const (
Scheduler_RegisterResourceManager_FullMethodName =
"/si.v1.Scheduler/RegisterResourceManager"
@@ -52,11 +52,11 @@ type SchedulerClient interface {
// updates, etc. And receive updates from scheduler for allocation
changes,
// any required status changes, etc.
// Update allocation request
- UpdateAllocation(ctx context.Context, opts ...grpc.CallOption)
(Scheduler_UpdateAllocationClient, error)
+ UpdateAllocation(ctx context.Context, opts ...grpc.CallOption)
(grpc.BidiStreamingClient[AllocationRequest, AllocationResponse], error)
// Update application request
- UpdateApplication(ctx context.Context, opts ...grpc.CallOption)
(Scheduler_UpdateApplicationClient, error)
+ UpdateApplication(ctx context.Context, opts ...grpc.CallOption)
(grpc.BidiStreamingClient[ApplicationRequest, ApplicationResponse], error)
// Update node info
- UpdateNode(ctx context.Context, opts ...grpc.CallOption)
(Scheduler_UpdateNodeClient, error)
+ UpdateNode(ctx context.Context, opts ...grpc.CallOption)
(grpc.BidiStreamingClient[NodeRequest, NodeResponse], error)
}
type schedulerClient struct {
@@ -68,110 +68,57 @@ func NewSchedulerClient(cc grpc.ClientConnInterface)
SchedulerClient {
}
func (c *schedulerClient) RegisterResourceManager(ctx context.Context, in
*RegisterResourceManagerRequest, opts ...grpc.CallOption)
(*RegisterResourceManagerResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RegisterResourceManagerResponse)
- err := c.cc.Invoke(ctx,
Scheduler_RegisterResourceManager_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx,
Scheduler_RegisterResourceManager_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *schedulerClient) UpdateAllocation(ctx context.Context, opts
...grpc.CallOption) (Scheduler_UpdateAllocationClient, error) {
- stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[0],
Scheduler_UpdateAllocation_FullMethodName, opts...)
+func (c *schedulerClient) UpdateAllocation(ctx context.Context, opts
...grpc.CallOption) (grpc.BidiStreamingClient[AllocationRequest,
AllocationResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[0],
Scheduler_UpdateAllocation_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
- x := &schedulerUpdateAllocationClient{stream}
+ x := &grpc.GenericClientStream[AllocationRequest,
AllocationResponse]{ClientStream: stream}
return x, nil
}
-type Scheduler_UpdateAllocationClient interface {
- Send(*AllocationRequest) error
- Recv() (*AllocationResponse, error)
- grpc.ClientStream
-}
-
-type schedulerUpdateAllocationClient struct {
- grpc.ClientStream
-}
-
-func (x *schedulerUpdateAllocationClient) Send(m *AllocationRequest) error {
- return x.ClientStream.SendMsg(m)
-}
+// This type alias is provided for backwards compatibility with existing code
that references the prior non-generic stream type by name.
+type Scheduler_UpdateAllocationClient =
grpc.BidiStreamingClient[AllocationRequest, AllocationResponse]
-func (x *schedulerUpdateAllocationClient) Recv() (*AllocationResponse, error) {
- m := new(AllocationResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func (c *schedulerClient) UpdateApplication(ctx context.Context, opts
...grpc.CallOption) (Scheduler_UpdateApplicationClient, error) {
- stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[1],
Scheduler_UpdateApplication_FullMethodName, opts...)
+func (c *schedulerClient) UpdateApplication(ctx context.Context, opts
...grpc.CallOption) (grpc.BidiStreamingClient[ApplicationRequest,
ApplicationResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[1],
Scheduler_UpdateApplication_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
- x := &schedulerUpdateApplicationClient{stream}
+ x := &grpc.GenericClientStream[ApplicationRequest,
ApplicationResponse]{ClientStream: stream}
return x, nil
}
-type Scheduler_UpdateApplicationClient interface {
- Send(*ApplicationRequest) error
- Recv() (*ApplicationResponse, error)
- grpc.ClientStream
-}
-
-type schedulerUpdateApplicationClient struct {
- grpc.ClientStream
-}
+// This type alias is provided for backwards compatibility with existing code
that references the prior non-generic stream type by name.
+type Scheduler_UpdateApplicationClient =
grpc.BidiStreamingClient[ApplicationRequest, ApplicationResponse]
-func (x *schedulerUpdateApplicationClient) Send(m *ApplicationRequest) error {
- return x.ClientStream.SendMsg(m)
-}
-
-func (x *schedulerUpdateApplicationClient) Recv() (*ApplicationResponse,
error) {
- m := new(ApplicationResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func (c *schedulerClient) UpdateNode(ctx context.Context, opts
...grpc.CallOption) (Scheduler_UpdateNodeClient, error) {
- stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[2],
Scheduler_UpdateNode_FullMethodName, opts...)
+func (c *schedulerClient) UpdateNode(ctx context.Context, opts
...grpc.CallOption) (grpc.BidiStreamingClient[NodeRequest, NodeResponse],
error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[2],
Scheduler_UpdateNode_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
- x := &schedulerUpdateNodeClient{stream}
+ x := &grpc.GenericClientStream[NodeRequest, NodeResponse]{ClientStream:
stream}
return x, nil
}
-type Scheduler_UpdateNodeClient interface {
- Send(*NodeRequest) error
- Recv() (*NodeResponse, error)
- grpc.ClientStream
-}
-
-type schedulerUpdateNodeClient struct {
- grpc.ClientStream
-}
-
-func (x *schedulerUpdateNodeClient) Send(m *NodeRequest) error {
- return x.ClientStream.SendMsg(m)
-}
-
-func (x *schedulerUpdateNodeClient) Recv() (*NodeResponse, error) {
- m := new(NodeResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
+// This type alias is provided for backwards compatibility with existing code
that references the prior non-generic stream type by name.
+type Scheduler_UpdateNodeClient = grpc.BidiStreamingClient[NodeRequest,
NodeResponse]
// SchedulerServer is the server API for Scheduler service.
// All implementations must embed UnimplementedSchedulerServer
-// for forward compatibility
+// for forward compatibility.
type SchedulerServer interface {
// Register a RM, if it is a reconnect from previous RM the call will
// trigger a cleanup of all in-memory data and resync with RM.
@@ -180,31 +127,35 @@ type SchedulerServer interface {
// updates, etc. And receive updates from scheduler for allocation
changes,
// any required status changes, etc.
// Update allocation request
- UpdateAllocation(Scheduler_UpdateAllocationServer) error
+ UpdateAllocation(grpc.BidiStreamingServer[AllocationRequest,
AllocationResponse]) error
// Update application request
- UpdateApplication(Scheduler_UpdateApplicationServer) error
+ UpdateApplication(grpc.BidiStreamingServer[ApplicationRequest,
ApplicationResponse]) error
// Update node info
- UpdateNode(Scheduler_UpdateNodeServer) error
+ UpdateNode(grpc.BidiStreamingServer[NodeRequest, NodeResponse]) error
mustEmbedUnimplementedSchedulerServer()
}
-// UnimplementedSchedulerServer must be embedded to have forward compatible
implementations.
-type UnimplementedSchedulerServer struct {
-}
+// UnimplementedSchedulerServer must be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedSchedulerServer struct{}
func (UnimplementedSchedulerServer) RegisterResourceManager(context.Context,
*RegisterResourceManagerRequest) (*RegisterResourceManagerResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method
RegisterResourceManager not implemented")
+ return nil, status.Error(codes.Unimplemented, "method
RegisterResourceManager not implemented")
}
-func (UnimplementedSchedulerServer)
UpdateAllocation(Scheduler_UpdateAllocationServer) error {
- return status.Errorf(codes.Unimplemented, "method UpdateAllocation not
implemented")
+func (UnimplementedSchedulerServer)
UpdateAllocation(grpc.BidiStreamingServer[AllocationRequest,
AllocationResponse]) error {
+ return status.Error(codes.Unimplemented, "method UpdateAllocation not
implemented")
}
-func (UnimplementedSchedulerServer)
UpdateApplication(Scheduler_UpdateApplicationServer) error {
- return status.Errorf(codes.Unimplemented, "method UpdateApplication not
implemented")
+func (UnimplementedSchedulerServer)
UpdateApplication(grpc.BidiStreamingServer[ApplicationRequest,
ApplicationResponse]) error {
+ return status.Error(codes.Unimplemented, "method UpdateApplication not
implemented")
}
-func (UnimplementedSchedulerServer) UpdateNode(Scheduler_UpdateNodeServer)
error {
- return status.Errorf(codes.Unimplemented, "method UpdateNode not
implemented")
+func (UnimplementedSchedulerServer)
UpdateNode(grpc.BidiStreamingServer[NodeRequest, NodeResponse]) error {
+ return status.Error(codes.Unimplemented, "method UpdateNode not
implemented")
}
func (UnimplementedSchedulerServer) mustEmbedUnimplementedSchedulerServer() {}
+func (UnimplementedSchedulerServer) testEmbeddedByValue() {}
// UnsafeSchedulerServer may be embedded to opt out of forward compatibility
for this service.
// Use of this interface is not recommended, as added methods to
SchedulerServer will
@@ -214,6 +165,13 @@ type UnsafeSchedulerServer interface {
}
func RegisterSchedulerServer(s grpc.ServiceRegistrar, srv SchedulerServer) {
+ // If the following call panics, it indicates
UnimplementedSchedulerServer 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.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&Scheduler_ServiceDesc, srv)
}
@@ -236,82 +194,25 @@ func _Scheduler_RegisterResourceManager_Handler(srv
interface{}, ctx context.Con
}
func _Scheduler_UpdateAllocation_Handler(srv interface{}, stream
grpc.ServerStream) error {
- return
srv.(SchedulerServer).UpdateAllocation(&schedulerUpdateAllocationServer{stream})
-}
-
-type Scheduler_UpdateAllocationServer interface {
- Send(*AllocationResponse) error
- Recv() (*AllocationRequest, error)
- grpc.ServerStream
-}
-
-type schedulerUpdateAllocationServer struct {
- grpc.ServerStream
-}
-
-func (x *schedulerUpdateAllocationServer) Send(m *AllocationResponse) error {
- return x.ServerStream.SendMsg(m)
+ return
srv.(SchedulerServer).UpdateAllocation(&grpc.GenericServerStream[AllocationRequest,
AllocationResponse]{ServerStream: stream})
}
-func (x *schedulerUpdateAllocationServer) Recv() (*AllocationRequest, error) {
- m := new(AllocationRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
+// This type alias is provided for backwards compatibility with existing code
that references the prior non-generic stream type by name.
+type Scheduler_UpdateAllocationServer =
grpc.BidiStreamingServer[AllocationRequest, AllocationResponse]
func _Scheduler_UpdateApplication_Handler(srv interface{}, stream
grpc.ServerStream) error {
- return
srv.(SchedulerServer).UpdateApplication(&schedulerUpdateApplicationServer{stream})
-}
-
-type Scheduler_UpdateApplicationServer interface {
- Send(*ApplicationResponse) error
- Recv() (*ApplicationRequest, error)
- grpc.ServerStream
-}
-
-type schedulerUpdateApplicationServer struct {
- grpc.ServerStream
+ return
srv.(SchedulerServer).UpdateApplication(&grpc.GenericServerStream[ApplicationRequest,
ApplicationResponse]{ServerStream: stream})
}
-func (x *schedulerUpdateApplicationServer) Send(m *ApplicationResponse) error {
- return x.ServerStream.SendMsg(m)
-}
-
-func (x *schedulerUpdateApplicationServer) Recv() (*ApplicationRequest, error)
{
- m := new(ApplicationRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
+// This type alias is provided for backwards compatibility with existing code
that references the prior non-generic stream type by name.
+type Scheduler_UpdateApplicationServer =
grpc.BidiStreamingServer[ApplicationRequest, ApplicationResponse]
func _Scheduler_UpdateNode_Handler(srv interface{}, stream grpc.ServerStream)
error {
- return
srv.(SchedulerServer).UpdateNode(&schedulerUpdateNodeServer{stream})
-}
-
-type Scheduler_UpdateNodeServer interface {
- Send(*NodeResponse) error
- Recv() (*NodeRequest, error)
- grpc.ServerStream
+ return
srv.(SchedulerServer).UpdateNode(&grpc.GenericServerStream[NodeRequest,
NodeResponse]{ServerStream: stream})
}
-type schedulerUpdateNodeServer struct {
- grpc.ServerStream
-}
-
-func (x *schedulerUpdateNodeServer) Send(m *NodeResponse) error {
- return x.ServerStream.SendMsg(m)
-}
-
-func (x *schedulerUpdateNodeServer) Recv() (*NodeRequest, error) {
- m := new(NodeRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
+// This type alias is provided for backwards compatibility with existing code
that references the prior non-generic stream type by name.
+type Scheduler_UpdateNodeServer = grpc.BidiStreamingServer[NodeRequest,
NodeResponse]
// Scheduler_ServiceDesc is the grpc.ServiceDesc for Scheduler service.
// It's only intended for direct use with grpc.RegisterService,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]