Skip to content

fix(execution): build the image in CI, and copy the package that broke it - #72

Open
robertleifke wants to merge 1 commit into
mainfrom
fix/execution-image-build
Open

robertleifke wants to merge 1 commit into
mainfrom
fix/execution-image-build

Conversation

@robertleifke

Copy link
Copy Markdown
Contributor

The execution image has not been buildable since #69

src/executor.ts(15,34): error TS2307: Cannot find module '@numo/kms-signer'
ERROR: failed to build: failed to solve: ... exit code: 1

#69 moved the KMS signer into @numo/kms-signer, but services/execution/Dockerfile copies and builds only @numo/abis. Nothing was deployed with it, so the running venue is unaffected — but this is not only about shipping new work: execution-service could not be rebuilt for any reason, including a rollback.

The cause is narrow. A workspace package's main/types resolve to dist/, which is gitignored (.gitignore:5 **/dist/), so copied-but-unbuilt means "Cannot find module".

Why it reached main matters more than the fix

CI runs pnpm install + tsc at the workspace root, where every package resolves through the root node_modules regardless of what the Dockerfile does. The image only has what it COPYs and builds. Those are different claims and only one was checked, so green CI and an unbuildable image were entirely compatible.

That is the same "green means two different things" problem scripts/verify.sh exists to remove — it had simply never covered the image.

So:

  • services-execution.yml now runs docker build
  • verify.sh mirrors it, skipping with a note when docker is absent rather than failing — same shape as the terraform section, and for the same reason
  • the Dockerfile comment now says to add the build step when a workspace dependency is added, and says CI will catch it if you forget

A future workspace dependency that isn't added to the Dockerfile now fails in CI instead of at deploy.

Swept the class

services/markets is Go and uses COPY . ., so it cannot have this bug. It is the only other Dockerfile in the repo.

Verification

The failing build above is real and reproduced locally. The verifying build of the fix stalled on registry metadata (10 minutes with no progress past load metadata for node:22-slim) and I killed it rather than wait it out — so CI running the new step is the proof this works, which is a reasonable place to put that proof given the step is the point of the PR.

Paths confirmed by hand: packages/kms-signer/package.json and tsconfig.json exist, its build is tsc -p tsconfig.json, outDir is dist, and main is ./dist/index.js.

If CI's docker build fails, this PR is wrong and should not be merged on my say-so.

Note

This is mine — #69 introduced it, and I wrote and recommended #69.

🤖 Generated with Claude Code

…e it

The execution image has not been buildable since #69. That PR moved the KMS
signer into @numo/kms-signer, but services/execution/Dockerfile copies and
builds only @numo/abis, so the service's own tsc fails inside the image:

  src/executor.ts(15,34): error TS2307: Cannot find module '@numo/kms-signer'
  ERROR: failed to build: ... exit code: 1

Nothing was deployed with it, so the running venue is unaffected. But the
breakage is not limited to shipping new work: execution-service could not be
rebuilt for ANY reason, including a rollback.

The cause is narrow -- a workspace package's main/types resolve to dist/, which
is gitignored (.gitignore:5 **/dist/), so copied-but-unbuilt means "Cannot find
module" -- and the fix is to copy and build it like @numo/abis.

The reason it reached main matters more. CI runs pnpm install + tsc at the
WORKSPACE ROOT, where every package resolves through the root node_modules
whatever the Dockerfile does. The image only has what it COPYs and builds. Those
are different claims, and only one of them was checked, so green CI and an
unbuildable image were entirely compatible -- the same "green means two
different things" this repo wrote scripts/verify.sh to remove.

So CI now builds the image (services-execution.yml), and verify.sh mirrors it,
skipping with a note when docker is absent rather than failing -- the same shape
as the terraform section, and for the same reason. A future workspace dependency
that is not added to the Dockerfile now fails in CI instead of at deploy.

Swept the class rather than the instance: services/markets is Go and uses
COPY . ., so it cannot have this bug. It is the only other Dockerfile.

The local build that proved the failure is reproduced in the message above; the
verifying build of the fix stalled on registry metadata and was killed rather
than waited out, so CI running the new step is the proof this works.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant