From f819087734f991a3bd96e700c2841f6258ce15c3 Mon Sep 17 00:00:00 2001 From: gaurav0107 Date: Sun, 7 Jun 2026 14:57:51 +0530 Subject: [PATCH] fix(deploy): install tracebility-tenant in service Docker images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The three Python service Dockerfiles install the service via ``pip install --no-cache-dir .`` against PyPI. PR #3 added a ``tracebility-tenant`` dependency that lives in services/_shared/tenant as a uv-workspace member — it isn't on PyPI, so pip fails the build: ERROR: Could not find a version that satisfies the requirement tracebility-tenant (from tracebility-ingest-api) Fix: copy services/_shared/tenant into the image and ``pip install`` it locally before installing the service. Pip's resolver finds the already- installed copy and the service install succeeds. Verified: ``docker build`` succeeds for ingest-api, api, and ingest-worker locally; running the image confirms ``from tracebility_tenant import ...`` works inside the container. Signed-off-by: Gaurav Dubey Signed-off-by: gaurav0107 --- services/api/Dockerfile | 6 ++++++ services/ingest-api/Dockerfile | 7 +++++++ services/ingest-worker/Dockerfile | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/services/api/Dockerfile b/services/api/Dockerfile index 65d6fc6..988424f 100644 --- a/services/api/Dockerfile +++ b/services/api/Dockerfile @@ -6,6 +6,12 @@ ENV PYTHONDONTWRITEBYTECODE=1 \ WORKDIR /app +# Install the workspace-shared tracebility-tenant package first. uv treats +# it as a workspace member; pip needs it pre-installed locally so the +# subsequent ``pip install .`` finds it (not published to PyPI). +COPY services/_shared/tenant /tmp/tracebility-tenant +RUN pip install --no-cache-dir /tmp/tracebility-tenant && rm -rf /tmp/tracebility-tenant + COPY services/api/pyproject.toml ./pyproject.toml COPY services/api/tracebility_api ./tracebility_api diff --git a/services/ingest-api/Dockerfile b/services/ingest-api/Dockerfile index 99eb601..e3656fa 100644 --- a/services/ingest-api/Dockerfile +++ b/services/ingest-api/Dockerfile @@ -6,6 +6,13 @@ ENV PYTHONDONTWRITEBYTECODE=1 \ WORKDIR /app +# Install the workspace-shared tracebility-tenant package first. uv treats +# it as a workspace member; pip needs it pre-installed locally so the +# subsequent ``pip install .`` finds it (the package is not published to +# PyPI). +COPY services/_shared/tenant /tmp/tracebility-tenant +RUN pip install --no-cache-dir /tmp/tracebility-tenant && rm -rf /tmp/tracebility-tenant + COPY services/ingest-api/pyproject.toml ./pyproject.toml COPY services/ingest-api/tracebility_ingest ./tracebility_ingest diff --git a/services/ingest-worker/Dockerfile b/services/ingest-worker/Dockerfile index 716d9f7..d0e0cf0 100644 --- a/services/ingest-worker/Dockerfile +++ b/services/ingest-worker/Dockerfile @@ -6,6 +6,12 @@ ENV PYTHONDONTWRITEBYTECODE=1 \ WORKDIR /app +# Install the workspace-shared tracebility-tenant package first. uv treats +# it as a workspace member; pip needs it pre-installed locally so the +# subsequent ``pip install .`` finds it (not published to PyPI). +COPY services/_shared/tenant /tmp/tracebility-tenant +RUN pip install --no-cache-dir /tmp/tracebility-tenant && rm -rf /tmp/tracebility-tenant + COPY services/ingest-worker/pyproject.toml ./pyproject.toml COPY services/ingest-worker/tracebility_worker ./tracebility_worker