loadtest: package as a runnable Docker image + publish workflow - #43
arnaubennassar wants to merge 1 commit into
Conversation
Package the PR #41 load-test CLI as a standalone image so it can run against real networks (e.g. Bali) without a docker-compose devnet or a VPN-connected laptop. Dockerfile.loadtest is headless-only -- no Chromium/Playwright browser binary is downloaded (pnpm already skips its postinstall build script by default; PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD makes that explicit). loadtest-image.yaml is a workflow_dispatch-only job that builds and publishes ghcr.io/agglayer/agglayer-dev-ui-loadtest:<sha>, mirroring docker-publish.yaml's auth/login/permissions pattern. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzG99erVv82HCYo6priDnN
|
Code review — 1 issue found Checked for bugs and CLAUDE.md compliance. No bugs found. One team-standards compliance issue in Dockerfile.loadtest. Dockerfile.loadtest (lines 28-44): docs/team-standards.md violation — single-stage build hand-copies source into the runtime image The team standards require: pnpm deploy for the runtime bundle — single-package and monorepos both. Never hand-copy node_modules, src/, or package.json into the runtime stage. This single-stage Dockerfile copies package.json/lockfile (line 28) and the full source tree via COPY . . (line 44) directly into the image that ships. The root Dockerfile achieves compliance via a multi-stage build where the runtime stage (nginx:alpine) contains no Node, pnpm, or source. Suggested fix: Use a two-stage build with a builder stage that installs deps and copies source, then a slim runtime stage that COPY --from=builder only the necessary artifacts. Alternatively, if the full-source single-stage approach is intentional for this dev tool, consider documenting it as a known deferral in CLAUDE.md alongside the existing Other known deferrals section. Workflow file (.github/workflows/loadtest-image.yaml) is clean — correct YAML, appropriate permissions, secure auth, and sound step ordering. |
Summary
Stacked on #41. Packages the bridge load-test CLI (
loadtest/) as a standalone, runnable image so it can be executed against a real network (e.g. Bali) as a Job/pod, without a docker-compose devnet or a VPN-connected laptop — needed forP5-04of the aggkit-autoclaim deployment plan.Dockerfile.loadtest:node:24-slim+ pnpm10.30.3(matchingpackage.json'spackageManager/engines.node), full repo source,pnpm install --frozen-lockfile. Headless only — no Chromium/Playwright browser binary is downloaded (pnpm's default build-script allowlist already skips@playwright/test's postinstall;PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1makes that explicit). NoENTRYPOINT, sodocker run <image> pnpm loadtest <command> ...works as-is. Does not touch or build against the existing rootDockerfile(UI-only, unrelated)..github/workflows/loadtest-image.yaml:workflow_dispatch-only (no push/PR trigger), buildsDockerfile.loadtestand publishesghcr.io/agglayer/agglayer-dev-ui-loadtest:<sha>(multi-arch amd64/arm64), mirroringdocker-publish.yaml's GHCR login/permissions/QEMU+Buildx pattern.Does not merge #41 and does not touch its branch beyond stacking on top of it.
Verification (local)
docker-smoke.loadtest.jsonis a local, uncommitted copy of the repo's ownloadtest/config/examples/testnet.loadtest.jsonwith the deliberateREPLACE-MEplaceholderaggkitProxyUrlswapped for a dummy non-placeholder host (validateperforms no network I/O, only schema + operational checks — seeloadtest/config/schema.ts'scheckOperationalConstraints).Test plan
docker build -f Dockerfile.loadtestsucceedspnpm loadtest validate <cfg>succeeds inside the built imageworkflow_dispatchrun ofloadtest-image.yamlto actually publish the image to GHCR (left for a maintainer / CI — not triggered by this PR; seegh workflow run loadtest-image.yaml --ref feat/bridge-loadtest-docker)🤖 Generated with Claude Code
https://claude.ai/code/session_01MzG99erVv82HCYo6priDnN