Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(grpc): update grpc definition following updates on orchestrator side #991

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions backend/orchestrator/common_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions backend/orchestrator/common_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings


GRPC_GENERATED_VERSION = '1.66.1'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True

if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ f' but the generated code in common_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)
26 changes: 18 additions & 8 deletions backend/orchestrator/computeplan_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

129 changes: 105 additions & 24 deletions backend/orchestrator/computeplan_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings

from . import computeplan_pb2 as computeplan__pb2

GRPC_GENERATED_VERSION = '1.66.1'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True

if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ f' but the generated code in computeplan_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)


class ComputePlanServiceStub(object):
"""Missing associated documentation comment in .proto file."""
Expand All @@ -18,32 +38,32 @@ def __init__(self, channel):
'/orchestrator.ComputePlanService/RegisterPlan',
request_serializer=computeplan__pb2.NewComputePlan.SerializeToString,
response_deserializer=computeplan__pb2.ComputePlan.FromString,
)
_registered_method=True)
self.GetPlan = channel.unary_unary(
'/orchestrator.ComputePlanService/GetPlan',
request_serializer=computeplan__pb2.GetComputePlanParam.SerializeToString,
response_deserializer=computeplan__pb2.ComputePlan.FromString,
)
_registered_method=True)
self.ApplyPlanAction = channel.unary_unary(
'/orchestrator.ComputePlanService/ApplyPlanAction',
request_serializer=computeplan__pb2.ApplyPlanActionParam.SerializeToString,
response_deserializer=computeplan__pb2.ApplyPlanActionResponse.FromString,
)
_registered_method=True)
self.QueryPlans = channel.unary_unary(
'/orchestrator.ComputePlanService/QueryPlans',
request_serializer=computeplan__pb2.QueryPlansParam.SerializeToString,
response_deserializer=computeplan__pb2.QueryPlansResponse.FromString,
)
_registered_method=True)
self.UpdatePlan = channel.unary_unary(
'/orchestrator.ComputePlanService/UpdatePlan',
request_serializer=computeplan__pb2.UpdateComputePlanParam.SerializeToString,
response_deserializer=computeplan__pb2.UpdateComputePlanResponse.FromString,
)
_registered_method=True)
self.IsPlanRunning = channel.unary_unary(
'/orchestrator.ComputePlanService/IsPlanRunning',
request_serializer=computeplan__pb2.IsPlanRunningParam.SerializeToString,
response_deserializer=computeplan__pb2.IsPlanRunningResponse.FromString,
)
_registered_method=True)


class ComputePlanServiceServicer(object):
Expand Down Expand Up @@ -122,6 +142,7 @@ def add_ComputePlanServiceServicer_to_server(servicer, server):
generic_handler = grpc.method_handlers_generic_handler(
'orchestrator.ComputePlanService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('orchestrator.ComputePlanService', rpc_method_handlers)


# This class is part of an EXPERIMENTAL API.
Expand All @@ -139,11 +160,21 @@ def RegisterPlan(request,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/orchestrator.ComputePlanService/RegisterPlan',
return grpc.experimental.unary_unary(
request,
target,
'/orchestrator.ComputePlanService/RegisterPlan',
computeplan__pb2.NewComputePlan.SerializeToString,
computeplan__pb2.ComputePlan.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)

@staticmethod
def GetPlan(request,
Expand All @@ -156,11 +187,21 @@ def GetPlan(request,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/orchestrator.ComputePlanService/GetPlan',
return grpc.experimental.unary_unary(
request,
target,
'/orchestrator.ComputePlanService/GetPlan',
computeplan__pb2.GetComputePlanParam.SerializeToString,
computeplan__pb2.ComputePlan.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)

@staticmethod
def ApplyPlanAction(request,
Expand All @@ -173,11 +214,21 @@ def ApplyPlanAction(request,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/orchestrator.ComputePlanService/ApplyPlanAction',
return grpc.experimental.unary_unary(
request,
target,
'/orchestrator.ComputePlanService/ApplyPlanAction',
computeplan__pb2.ApplyPlanActionParam.SerializeToString,
computeplan__pb2.ApplyPlanActionResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)

@staticmethod
def QueryPlans(request,
Expand All @@ -190,11 +241,21 @@ def QueryPlans(request,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/orchestrator.ComputePlanService/QueryPlans',
return grpc.experimental.unary_unary(
request,
target,
'/orchestrator.ComputePlanService/QueryPlans',
computeplan__pb2.QueryPlansParam.SerializeToString,
computeplan__pb2.QueryPlansResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)

@staticmethod
def UpdatePlan(request,
Expand All @@ -207,11 +268,21 @@ def UpdatePlan(request,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/orchestrator.ComputePlanService/UpdatePlan',
return grpc.experimental.unary_unary(
request,
target,
'/orchestrator.ComputePlanService/UpdatePlan',
computeplan__pb2.UpdateComputePlanParam.SerializeToString,
computeplan__pb2.UpdateComputePlanResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)

@staticmethod
def IsPlanRunning(request,
Expand All @@ -224,8 +295,18 @@ def IsPlanRunning(request,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/orchestrator.ComputePlanService/IsPlanRunning',
return grpc.experimental.unary_unary(
request,
target,
'/orchestrator.ComputePlanService/IsPlanRunning',
computeplan__pb2.IsPlanRunningParam.SerializeToString,
computeplan__pb2.IsPlanRunningResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
34 changes: 22 additions & 12 deletions backend/orchestrator/computetask_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading