fix(infra-build): repair gateway image build so infra artifact can publish
tracker-policy-pr / check-pr (pull_request) Successful in 16s
test / integration-docker (pull_request) Successful in 31s
test / unit (pull_request) Successful in 40s
test / integration-firecracker (pull_request) Failing after 2m36s
test / coverage (pull_request) Failing after 3m34s
tracker-policy-pr / check-pr (pull_request) Successful in 16s
test / integration-docker (pull_request) Successful in 31s
test / unit (pull_request) Successful in 40s
test / integration-firecracker (pull_request) Failing after 2m36s
test / coverage (pull_request) Failing after 3m34s
The Firecracker integration + coverage jobs pull a prebuilt infra rootfs artifact (PRD 0069 Stage 2) versioned by a content hash of the Dockerfiles, bot_bottle/, and the guest init. Building that artifact (publish_infra -> docker build Dockerfile.gateway) has been broken since5ad3449, so the artifact was never published and the KVM runner's integration test 404'd on the pull — the failure this branch surfaced once it stopped falsely skipping. Two build-time bugs, both from5ad3449, neither exercised since: - pyproject.toml declared build-backend "setuptools.backends.legacy:build", which is not an importable module; `pip install /src/` failed with BackendUnavailable. Use the real backend, "setuptools.build_meta" (the project has proper [project] metadata + flat-layout autodiscovery). Not part of the artifact hash, so this alone doesn't move the version. - Dockerfile.gateway wrote /app/egress_addon.py before /app existed (the mkdir/WORKDIR came later), so the RUN redirect died with exit 2. Move WORKDIR /app above the shim write (WORKDIR creates it) and drop the now redundant later WORKDIR. This changes the gateway Dockerfile, so the infra artifact version moves 3c9e7b23260992db -> 01e6aaa714756fce; the matching artifact has been built and published to the generic package registry. Also add Dockerfile* and pyproject.toml to test.yml's path filters: these inputs determine what the firecracker jobs build/pull, so a change to them must re-run the suite (and lets this push trigger a pull_request run). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A9qa3xoavjQScufDfZaXKR
This commit is contained in:
@@ -25,12 +25,20 @@ on:
|
|||||||
- '.gitea/workflows/**.yml'
|
- '.gitea/workflows/**.yml'
|
||||||
- 'scripts/**'
|
- 'scripts/**'
|
||||||
- 'README.md'
|
- '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:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '**.py'
|
- '**.py'
|
||||||
- '.gitea/workflows/**.yml'
|
- '.gitea/workflows/**.yml'
|
||||||
- 'scripts/**'
|
- 'scripts/**'
|
||||||
- 'README.md'
|
- 'README.md'
|
||||||
|
- 'Dockerfile*'
|
||||||
|
- 'pyproject.toml'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
+3
-2
@@ -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
|
# 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.
|
# 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
|
RUN printf 'from bot_bottle.egress_addon import addons\n' > /app/egress_addon.py
|
||||||
COPY bot_bottle/egress_entrypoint.sh /app/egress-entrypoint.sh
|
COPY bot_bottle/egress_entrypoint.sh /app/egress-entrypoint.sh
|
||||||
RUN chmod +x /app/egress-entrypoint.sh
|
RUN chmod +x /app/egress-entrypoint.sh
|
||||||
@@ -117,8 +120,6 @@ RUN mkdir -p \
|
|||||||
# subset the bottle uses.
|
# subset the bottle uses.
|
||||||
EXPOSE 8888 9099 9418 9420 9100
|
EXPOSE 8888 9099 9418 9420 9100
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# PID 1 is the supervisor. It owns signal handling and exit-code
|
# PID 1 is the supervisor. It owns signal handling and exit-code
|
||||||
# propagation; no `exec` chain in the entrypoint itself.
|
# propagation; no `exec` chain in the entrypoint itself.
|
||||||
ENTRYPOINT ["python3", "-m", "bot_bottle.gateway_init"]
|
ENTRYPOINT ["python3", "-m", "bot_bottle.gateway_init"]
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools>=68"]
|
requires = ["setuptools>=68"]
|
||||||
build-backend = "setuptools.backends.legacy:build"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "bot-bottle"
|
name = "bot-bottle"
|
||||||
|
|||||||
Reference in New Issue
Block a user