From 71f1b22f664b1ad336299d34daf929f95949ad9e Mon Sep 17 00:00:00 2001 From: Santiago Fraire Willemoes Date: Thu, 18 Jun 2026 16:10:51 +0100 Subject: [PATCH 1/2] fix(create_ssl_context)!: remove crlfile field BREAKING CHANGE: the field was removed from the function, if you were using the crlfile, remove it as it is no longer supported. --- kstreams/utils.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kstreams/utils.py b/kstreams/utils.py index 6453041d..4b080c14 100644 --- a/kstreams/utils.py +++ b/kstreams/utils.py @@ -5,7 +5,7 @@ import ssl import sys from tempfile import NamedTemporaryFile -from typing import Any, Optional, Type, Union +from typing import Optional, Type, Union from aiokafka.helpers import create_ssl_context as aiokafka_create_ssl_context @@ -75,13 +75,16 @@ def create_ssl_context( certfile: Optional[str] = None, keyfile: Optional[str] = None, password: Optional[str] = None, - crlfile: Any = None, ): """Wrapper of [aiokafka.helpers.create_ssl_context]( https://aiokafka.readthedocs.io/en/stable/api.html#helpers ) with typehints. + Note: + Legacy function, we leave it to not depend directly on aiokafka, + but aiokafka now has typehints. + Arguments: cafile: Certificate Authority file path containing certificates used to sign broker certificates @@ -104,7 +107,6 @@ def create_ssl_context( certfile=certfile, keyfile=keyfile, password=password, - crlfile=crlfile, ) From ddf19944cf9aca5c2b3604817de478359c251a11 Mon Sep 17 00:00:00 2001 From: Santiago Fraire Willemoes Date: Thu, 18 Jun 2026 16:18:58 +0100 Subject: [PATCH 2/2] fix(scripts): do not assume terminal --- scripts/bench-compare | 2 +- scripts/bench-current | 3 ++- scripts/cluster/bash | 3 ++- scripts/cluster/events/read | 3 ++- scripts/cluster/events/send | 3 ++- scripts/cluster/logs | 3 ++- scripts/cluster/restart | 3 ++- scripts/cluster/start | 3 ++- scripts/cluster/stop | 3 ++- scripts/cluster/topics/create | 3 ++- scripts/cluster/topics/ls | 3 ++- scripts/format | 3 ++- scripts/install | 7 ++++--- scripts/publish | 3 ++- scripts/test | 3 ++- 15 files changed, 31 insertions(+), 17 deletions(-) diff --git a/scripts/bench-compare b/scripts/bench-compare index 6fcad6ce..5c13d5db 100755 --- a/scripts/bench-compare +++ b/scripts/bench-compare @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script runs pytest benchmarks to compare benchmark results. # # The script compares the latest benchmark with the current code. diff --git a/scripts/bench-current b/scripts/bench-current index 02f95814..550da915 100755 --- a/scripts/bench-current +++ b/scripts/bench-current @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env bash # This script runs benchmark tests using pytest and saves the results. # # By saving this information, way we can keep track of the regressions in performance. @@ -7,6 +7,7 @@ # Usage: # 1. Run this script from the terminal: ./bench-current # 2. The benchmark results will be saved in the `.benchmarks` folder. +set -e export PREFIX="" if [ -d '.venv' ] ; then diff --git a/scripts/cluster/bash b/scripts/cluster/bash index 59816901..7f140b0f 100755 --- a/scripts/cluster/bash +++ b/scripts/cluster/bash @@ -1,4 +1,5 @@ -#!/bin/sh -e +#!/usr/bin/env sh +set -e service="${1:-kafka}" docker-compose run --user="$(id -u)" "${service}" bash diff --git a/scripts/cluster/events/read b/scripts/cluster/events/read index a46f3042..4bc9ba36 100755 --- a/scripts/cluster/events/read +++ b/scripts/cluster/events/read @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/usr/bin/env sh # # Read messages from the given kafka topic # @@ -6,6 +6,7 @@ # # ./scripts/cluster/events/read # default: local--hello-world # ./scripts/cluster/events/read "example-topic" +set -e topic_name="${1:-local--hello-world}" diff --git a/scripts/cluster/events/send b/scripts/cluster/events/send index 9580e2aa..7fe91da9 100755 --- a/scripts/cluster/events/send +++ b/scripts/cluster/events/send @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/usr/bin/env sh # # Send messages to the given kafka topic (default: local--hello-world) # @@ -6,6 +6,7 @@ # # ./scripts/cluster/events/send # default: local--hello-world # ./scripts/cluster/events/send example-topic +set -e topic_name="${1:-local--hello-world}" diff --git a/scripts/cluster/logs b/scripts/cluster/logs index c5bd209a..e9a1cf36 100755 --- a/scripts/cluster/logs +++ b/scripts/cluster/logs @@ -1,3 +1,4 @@ -#!/bin/sh -e +#!/usr/bin/env sh +set -e docker-compose logs -f diff --git a/scripts/cluster/restart b/scripts/cluster/restart index 399edbb7..f894d623 100755 --- a/scripts/cluster/restart +++ b/scripts/cluster/restart @@ -1,4 +1,5 @@ -#!/bin/sh -e +#!/usr/bin/env sh +set -e service="${1:-kafka}" docker-compose restart "${service}" diff --git a/scripts/cluster/start b/scripts/cluster/start index 91780a47..4709d0a8 100755 --- a/scripts/cluster/start +++ b/scripts/cluster/start @@ -1,4 +1,5 @@ -#!/bin/sh -e +#!/usr/bin/env sh +set -e docker-compose up -d scripts/cluster/topics/create "local--kstreams" diff --git a/scripts/cluster/stop b/scripts/cluster/stop index e2613397..04ce8be9 100755 --- a/scripts/cluster/stop +++ b/scripts/cluster/stop @@ -1,4 +1,5 @@ -#!/bin/sh -e +#!/usr/bin/env sh +set -e docker-compose stop docker-compose rm --force -v diff --git a/scripts/cluster/topics/create b/scripts/cluster/topics/create index a97ac8f2..e53f3f40 100755 --- a/scripts/cluster/topics/create +++ b/scripts/cluster/topics/create @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/usr/bin/env sh # # Create a new kafka topic # @@ -6,6 +6,7 @@ # ./scripts/cluster/topics/create "example-topic" # ./scripts/cluster/topics/create "example-topic" partitions=3 # +set -e topic_name=$1 partitions=${2:-1} diff --git a/scripts/cluster/topics/ls b/scripts/cluster/topics/ls index fa748d7b..4e652b48 100755 --- a/scripts/cluster/topics/ls +++ b/scripts/cluster/topics/ls @@ -1,9 +1,10 @@ -#!/bin/sh -e +#!/usr/bin/env sh # # List available topics # # Usage: # ./scripts/cluster/topics/ls # +set -e docker-compose exec kafka kafka-topics --list --bootstrap-server kafka:9092 diff --git a/scripts/format b/scripts/format index f88195f5..552d1a42 100755 --- a/scripts/format +++ b/scripts/format @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e export PREFIX="" if [ -d '.venv' ] ; then diff --git a/scripts/install b/scripts/install index f4eb8a7f..c6e16e4b 100755 --- a/scripts/install +++ b/scripts/install @@ -1,7 +1,8 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e -PYTHON="${PYTHON:=python3.10}" -POETRY_VERSION="${POETRY_VERSION:=1.1.4}" +PYTHON="${PYTHON:=python3.10}" +POETRY_VERSION="${POETRY_VERSION:=1.1.4}" PREFIX=".venv/bin/" $PYTHON -m venv .venv --clear diff --git a/scripts/publish b/scripts/publish index 507d5f12..f7573c66 100755 --- a/scripts/publish +++ b/scripts/publish @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e export PREFIX="" if [ -d '.venv' ] ; then diff --git a/scripts/test b/scripts/test index 6f26e659..10879f0a 100755 --- a/scripts/test +++ b/scripts/test @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e export PREFIX="" if [ -d '.venv' ] ; then