From c1cbd33b79369110110be1b473963d2479a241bd Mon Sep 17 00:00:00 2001 From: Chouffe Date: Fri, 12 Jun 2026 08:49:51 +0200 Subject: [PATCH] fix(api): drop dead TEMPORAL_API_HOST/PORT settings (#54) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Settings.host and Settings.port were never read by any entry point — every bind is set on the uvicorn CLI (Dockerfile CMD, Makefile targets) — so setting TEMPORAL_API_PORT silently did nothing. Remove the fields and drop HOST/PORT from the README configuration list; the bind stays a deployment concern. --- api/README.md | 4 ++-- api/src/temporal_model/api/settings.py | 3 --- api/tests/test_settings.py | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/api/README.md b/api/README.md index 8f0230b..ab4d0aa 100644 --- a/api/README.md +++ b/api/README.md @@ -44,8 +44,8 @@ will fail at the `COPY` step without it.) Configuration via env vars (prefix `TEMPORAL_API_`): `MODEL_PATH`, `DEVICE`, `CALIBRATOR_THRESHOLD`, `TOKEN`, `FRAME_SOURCE`, `FRAMES_ROOT`, `S3_BUCKET`, -`S3_REGION`, `S3_ENDPOINT_URL` (empty = real AWS; set for OVH or MinIO), -`HOST`, `PORT`. AWS/OVH/MinIO credentials come from the standard boto3 chain +`S3_REGION`, `S3_ENDPOINT_URL` (empty = real AWS; set for OVH or MinIO). +AWS/OVH/MinIO credentials come from the standard boto3 chain (env vars / IAM role). `S3_BUCKET` is an optional default; a request may override it per call with its `bucket` field (needed for alert-api stacks whose per-org bucket names are not known ahead of time). A request with diff --git a/api/src/temporal_model/api/settings.py b/api/src/temporal_model/api/settings.py index 3ce8c0e..f9bf877 100644 --- a/api/src/temporal_model/api/settings.py +++ b/api/src/temporal_model/api/settings.py @@ -53,9 +53,6 @@ class Settings(BaseSettings): # probe arbitrary server paths. frames_root: str = "" - host: str = "0.0.0.0" - port: int = 8000 - @model_validator(mode="after") def _require_frames_root_for_local(self) -> "Settings": # A local-default server without a root would 400 on every request; diff --git a/api/tests/test_settings.py b/api/tests/test_settings.py index 5aa84a4..56f1589 100644 --- a/api/tests/test_settings.py +++ b/api/tests/test_settings.py @@ -12,7 +12,6 @@ def test_defaults(): assert s.s3_bucket == "" assert s.s3_region is None assert s.s3_endpoint_url is None - assert s.port == 8000 def test_env_override(monkeypatch):