Skip to content

api: TEMPORAL_API_HOST/PORT settings are dead config — never read by any entry point #54

Description

@Chouffe

Problem

Settings.host and Settings.port (api/src/temporal_model/api/settings.py:44-45) are documented in the README's configuration list (HOST, PORT) but never read anywhere in src/ — every entry point hardcodes the bind on the uvicorn CLI instead:

  • api/Dockerfile:35CMD [..., "--host", "0.0.0.0", "--port", "8000"]
  • api/Makefile serve — uvicorn defaults (127.0.0.1:8000)
  • api/Makefile run-gpu--host 0.0.0.0 --port 8000

So a user setting TEMPORAL_API_PORT=8080 (e.g. to dodge the docker-compose port collision noted in the README's GPU section) silently gets 8000 anyway.

Surfaced during the review of #52.

Options

  1. Drop the two settings and remove HOST/PORT from the README config list — smallest change; bind stays a deployment concern (CLI flags / image CMD).
  2. Wire them up — e.g. a python -m temporal_model.api entry point that calls uvicorn.run(app, host=settings.host, port=settings.port), used by the Dockerfile and Makefile targets.

Option 1 seems right unless someone actually needs runtime-configurable binds in the container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions