From 10c16b3371c0f274ad6a15b9fdc8120147a03758 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2026 23:45:05 +0000 Subject: [PATCH 1/5] Update dependency protobuf to v7.36.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a2d3368..29866f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ dependencies = [ "click==8.*", "grpcio==1.84.0", "grpcio-reflection==1.*", - "protobuf==7.36.1", # Must be compatible with grpcio-tools. + "protobuf==7.36.2", # Must be compatible with grpcio-tools. "pydantic==2.*", "structlog==26.*", ] From 52aa7db1445e644347a0dacb448985789a5fcfcb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Sep 2026 20:32:03 +0000 Subject: [PATCH 2/5] Update dependency ubuntu to v26 --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff3fa4c..7217c0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ env: jobs: lint: - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 steps: - name: Checkout uses: actions/checkout@v7 @@ -52,7 +52,7 @@ jobs: run: hatch fmt unit-test: - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 steps: - name: Checkout uses: actions/checkout@v7 @@ -70,7 +70,7 @@ jobs: build: - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 steps: - name: Checkout uses: actions/checkout@v7 @@ -111,7 +111,7 @@ jobs: if: ${{ inputs.version != '' }} needs: - build - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 steps: - name: Download Sdist and Wheel from GitHub uses: actions/download-artifact@v8 @@ -133,7 +133,7 @@ jobs: # The simple docs tool we're using doesn't support versions, so our docs # will only reflect what's in main. if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 steps: - name: Checkout uses: actions/checkout@v7 From a5c7186739c4772e7385d979c668a82b4ef7d23c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Fern=C3=A1ndez?= <7312236+fernandezcuesta@users.noreply.github.com> Date: Mon, 21 Sep 2026 23:40:06 +0200 Subject: [PATCH 3/5] fix: expose max-send-message-size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com> --- crossplane/function/cli.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/crossplane/function/cli.py b/crossplane/function/cli.py index ee22bdf..0b06f8c 100644 --- a/crossplane/function/cli.py +++ b/crossplane/function/cli.py @@ -56,12 +56,20 @@ def cli(cache_size, **kwargs): def standard_options(func: F) -> F: """Apply the standard Composition Function CLI options to a Click command.""" + @click.option( + "--max-send-message-size", + type=int, + default=None, + envvar="MAX_SEND_MESSAGE_SIZE", + help="Maximum size of sent gRPC messages in MB. Defaults to --max-grpc-message-size.", + ) @click.option( "--max-recv-message-size", + "--max-grpc-message-size", type=int, default=DEFAULT_MAX_RECV_MESSAGE_SIZE, show_default=True, - envvar="MAX_RECV_MESSAGE_SIZE", + envvar=["MAX_RECV_MESSAGE_SIZE", "MAX_GRPC_MESSAGE_SIZE"], help="Maximum size of received gRPC messages in MB.", ) @click.option( @@ -107,15 +115,18 @@ def run( # noqa: PLR0913 tls_certs_dir: str | None, insecure: bool, max_recv_message_size: int, + max_send_message_size: int | None, ) -> None: """Start a composition function gRPC server with standard options.""" level = logging.Level.DEBUG if debug else logging.Level.INFO logging.configure(level=level) - size_bytes = max_recv_message_size * 1024 * 1024 + if max_send_message_size is None: + max_send_message_size = max_recv_message_size + options = [ - ("grpc.max_receive_message_length", size_bytes), - ("grpc.max_send_message_length", size_bytes), + ("grpc.max_receive_message_length", max_recv_message_size * 1024 * 1024), + ("grpc.max_send_message_length", max_send_message_size * 1024 * 1024), ] runtime.serve( From 9a0c9a6dd7cb1071635b297979f87c65dae7b266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Fern=C3=A1ndez?= <7312236+fernandezcuesta@users.noreply.github.com> Date: Tue, 22 Sep 2026 00:09:51 +0200 Subject: [PATCH 4/5] fix: lint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com> --- crossplane/function/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crossplane/function/cli.py b/crossplane/function/cli.py index 0b06f8c..e18967c 100644 --- a/crossplane/function/cli.py +++ b/crossplane/function/cli.py @@ -61,7 +61,8 @@ def standard_options(func: F) -> F: type=int, default=None, envvar="MAX_SEND_MESSAGE_SIZE", - help="Maximum size of sent gRPC messages in MB. Defaults to --max-grpc-message-size.", + help="Maximum size of sent gRPC messages in MB. " + "Defaults to --max-recv-message-size.", ) @click.option( "--max-recv-message-size", From 2bfabb944df21cf73067166c97627c8dacbb1c5b Mon Sep 17 00:00:00 2001 From: Bob Haddleton Date: Wed, 23 Sep 2026 12:41:39 -0500 Subject: [PATCH 5/5] Set the new event loop Signed-off-by: Bob Haddleton --- crossplane/function/runtime.py | 1 + 1 file changed, 1 insertion(+) diff --git a/crossplane/function/runtime.py b/crossplane/function/runtime.py index a6e465e..827460a 100644 --- a/crossplane/function/runtime.py +++ b/crossplane/function/runtime.py @@ -99,6 +99,7 @@ def serve( loop = asyncio.get_event_loop() except RuntimeError: loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) server = grpc.aio.server(options=options)