From 8eaf18bd66d9c7eee31b8180609bc61d3574f28e Mon Sep 17 00:00:00 2001 From: Eric Carlsson <97894605+eric-carlsson@users.noreply.github.com> Date: Tue, 9 Jun 2026 12:23:02 +0200 Subject: [PATCH] fix function runner servicer type Signed-off-by: Eric Carlsson <97894605+eric-carlsson@users.noreply.github.com> --- crossplane/function/runtime.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crossplane/function/runtime.py b/crossplane/function/runtime.py index 02df6a2..fe6d02f 100644 --- a/crossplane/function/runtime.py +++ b/crossplane/function/runtime.py @@ -70,7 +70,7 @@ def load_credentials(tls_certs_dir: str) -> grpc.ServerCredentials: def serve( - function: grpcv1.FunctionRunnerService, + function: grpcv1.FunctionRunnerServiceServicer, address: str, *, creds: grpc.ServerCredentials, @@ -134,20 +134,20 @@ async def start(): loop.close() -class BetaFunctionRunner(grpcv1beta1.FunctionRunnerService): +class BetaFunctionRunner(grpcv1beta1.FunctionRunnerServiceServicer): """A BetaFunctionRunner handles beta gRPC RunFunctionRequests. - It handles requests by passing them to a wrapped v1.FunctionRunnerService. + It handles requests by passing them to a wrapped v1.FunctionRunnerServiceServicer. Incoming v1beta1 requests are converted to v1 by round-tripping them through serialization. Outgoing requests are converted from v1 to v1beta1 the same way. """ - def __init__(self, wrapped: grpcv1.FunctionRunnerService): + def __init__(self, wrapped: grpcv1.FunctionRunnerServiceServicer): """Create a new BetaFunctionRunner.""" self.wrapped = wrapped - async def RunFunction( # noqa: N802 # gRPC requires this name. + async def RunFunction( # noqa: N802 # gRPC requires this name. # pyright: ignore[reportIncompatibleMethodOverride] self, req: fnv1beta1.RunFunctionRequest, context: grpc.aio.ServicerContext ) -> fnv1beta1.RunFunctionResponse: """Run the underlying function."""