diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index e28b440..4027ef6 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -25,12 +25,20 @@ on: - '.gitea/workflows/**.yml' - 'scripts/**' - 'README.md' + # The Firecracker infra artifact the integration/coverage jobs pull is + # versioned by a content hash of the Dockerfiles (+ bot_bottle/, init); + # pyproject.toml drives the in-image package install. Changes here alter + # what those jobs build/pull, so they must re-run the suite. + - 'Dockerfile*' + - 'pyproject.toml' pull_request: paths: - '**.py' - '.gitea/workflows/**.yml' - 'scripts/**' - 'README.md' + - 'Dockerfile*' + - 'pyproject.toml' workflow_dispatch: jobs: diff --git a/Dockerfile.gateway b/Dockerfile.gateway index 74c8c24..a9f6d6d 100644 --- a/Dockerfile.gateway +++ b/Dockerfile.gateway @@ -98,6 +98,9 @@ RUN pip install --no-cache-dir /src/ # mitmdump -s requires a file path, not a module. Write a one-line shim that # re-exports `addons` from the installed package; mitmdump finds it there. +# WORKDIR here also creates /app so the shim + COPYs below can write into it +# (nothing created /app before this point). +WORKDIR /app RUN printf 'from bot_bottle.egress_addon import addons\n' > /app/egress_addon.py COPY bot_bottle/egress_entrypoint.sh /app/egress-entrypoint.sh RUN chmod +x /app/egress-entrypoint.sh @@ -117,8 +120,6 @@ RUN mkdir -p \ # subset the bottle uses. EXPOSE 8888 9099 9418 9420 9100 -WORKDIR /app - # PID 1 is the supervisor. It owns signal handling and exit-code # propagation; no `exec` chain in the entrypoint itself. ENTRYPOINT ["python3", "-m", "bot_bottle.gateway_init"] diff --git a/pyproject.toml b/pyproject.toml index ab1a97b..64359a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = ["setuptools>=68"] -build-backend = "setuptools.backends.legacy:build" +build-backend = "setuptools.build_meta" [project] name = "bot-bottle"