From 77acc84b102321c008764139702e16b6080e570f Mon Sep 17 00:00:00 2001 From: Simon Andrews Date: Fri, 18 Jul 2025 18:00:48 +0100 Subject: [PATCH 1/4] feat: downgrade to Python 3.12 --- Dockerfile-3.13 => Dockerfile-3.12 | 2 +- Makefile | 2 +- README.md | 2 +- docker-compose.yml | 8 ++++---- pyproject.toml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename Dockerfile-3.13 => Dockerfile-3.12 (96%) diff --git a/Dockerfile-3.13 b/Dockerfile-3.12 similarity index 96% rename from Dockerfile-3.13 rename to Dockerfile-3.12 index 2a4bfd2..252e556 100644 --- a/Dockerfile-3.13 +++ b/Dockerfile-3.12 @@ -1,4 +1,4 @@ -FROM python:3.13-alpine as base +FROM python:3.12-alpine as base RUN mkdir /src WORKDIR /src diff --git a/Makefile b/Makefile index 01068ef..304668e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -export PYTHON_VERSIONS := 3.13 +export PYTHON_VERSIONS := 3.12 .PHONY: dev-build dev-build: ## Create the docker image for you dev environment. diff --git a/README.md b/README.md index 8a057c6..5059d6f 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ pip install hubble_shuttle ### Supported Python versions -Shuttle is build and tested with Python 3.13. +Shuttle is build and tested with Python 3.12. ## Client-level configuration diff --git a/docker-compose.yml b/docker-compose.yml index 28840cf..de01c2f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,9 @@ services: - hubble-shuttle-3.13: - container_name: hubble-shuttle-3.13 + hubble-shuttle-3.12: + container_name: hubble-shuttle-3.12 build: context: . - dockerfile: Dockerfile-3.13 + dockerfile: Dockerfile-3.12 target: dev profiles: - dev @@ -18,7 +18,7 @@ services: release: build: context: . - dockerfile: Dockerfile-3.13 + dockerfile: Dockerfile-3.12 target: release profiles: - release diff --git a/pyproject.toml b/pyproject.toml index e92e43c..180fc80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ authors = [ ] description = "Hubble's Shuttle" readme = "README.md" -requires-python = ">=3.13" +requires-python = ">=3.12" dependencies = [ "requests>2.32.0", ] From ea6d0e80a99944e636b1959ad869c93a6f141fef Mon Sep 17 00:00:00 2001 From: Simon Andrews Date: Fri, 18 Jul 2025 18:05:12 +0100 Subject: [PATCH 2/4] fix: repair broken make commands Docker Compose profiles weren't quite set up correctly. We were also using docker-compose, but modern usage is docker compose (with a space, not a -). --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 304668e..dddc87c 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,11 @@ export PYTHON_VERSIONS := 3.12 .PHONY: dev-build dev-build: ## Create the docker image for you dev environment. - docker-compose build + docker compose --profile "*" build .PHONY: dev-clean dev-clean: ## Remove all the docker containers for this project. - docker-compose down --rmi local --volumes + docker compose --profile "*" down --rmi local --volumes .PHONY: dev-setup ## Basic environment configuration dev-setup: @@ -15,7 +15,7 @@ dev-setup: .PHONY: dev-test dev-test: ## Run the tests. for PYTHON_VERSION in ${PYTHON_VERSIONS} ; do \ - docker-compose run --rm "hubble-shuttle-$$PYTHON_VERSION" python -m unittest discover ; \ + docker compose run --rm "hubble-shuttle-$$PYTHON_VERSION" python -m unittest discover ; \ done .PHONY: build From 584499f87f6f4b9c24d44c18192815c4ce5334c7 Mon Sep 17 00:00:00 2001 From: Simon Andrews Date: Fri, 18 Jul 2025 18:06:53 +0100 Subject: [PATCH 3/4] feat: compatibility with Yardi Prisma VPN Stop filtering for the old YSI-based cert, so that we also pick up the Prisma VPN certificate. --- build-scripts/ca-certs/export-certs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-scripts/ca-certs/export-certs b/build-scripts/ca-certs/export-certs index d81766a..0fc7672 100755 --- a/build-scripts/ca-certs/export-certs +++ b/build-scripts/ca-certs/export-certs @@ -13,7 +13,7 @@ if command -v security 2>&1 >/dev/null then # macOS: `security` command allows for exporting certs echo "Exporting macOS root certificate store to $export_path..." - security find-certificate -a -c ysi-YSIFWCERT01-CA -p > $export_path + security find-certificate -a -p > $export_path else echo "Exporting certificates is unsupported on this platform." exit 1 From 43692175f7f8cfe5ed4ed1b9271f74d8701e0daa Mon Sep 17 00:00:00 2001 From: Simon Andrews Date: Fri, 18 Jul 2025 18:10:45 +0100 Subject: [PATCH 4/4] feat: add dev-shell make command Like we have elsewhere --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index dddc87c..5140a3f 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,10 @@ dev-clean: ## Remove all the docker containers for this project. dev-setup: build-scripts/ca-certs/export-certs +.PHONY: dev-shell +dev-shell: ## Start a shell in the dev container + docker compose run release sh + .PHONY: dev-test dev-test: ## Run the tests. for PYTHON_VERSION in ${PYTHON_VERSIONS} ; do \