fix(docker): copy all workspace package.json manifests in Dockerfile.dev#43
Merged
Conversation
…stall Dockerfile.dev only copied fn-app and fn-runtime package.json before `pnpm install --frozen-lockfile`. After PR #41 added fn-types, fn-generator, fn-client, and fn-cli to packages/, those four workspaces were absent at install time, so pnpm never created their node_modules/@constructive-io symlinks. The later `pnpm build` then failed inside the Docker image with TS2307 when fn-generator tried to resolve `@constructive-io/fn-types`, breaking the CI Test K8s workflow on main. Verified locally: `docker build -f Dockerfile.dev .` now completes end to end and packages/fn-generator/node_modules/@constructive-io/fn-types resolves to the workspace package.
There was a problem hiding this comment.
Pull request overview
Updates Dockerfile.dev to ensure all PNPM workspace package manifests are present during the image layer that runs pnpm install --frozen-lockfile, preventing missing workspace symlinks (and subsequent TypeScript module resolution failures) in the Docker/Skaffold path used by CI Test K8s.
Changes:
- Add
COPY packages/<pkg>/package.jsonlines forfn-types,fn-generator,fn-client, andfn-clibefore the install layer. - Ensures PNPM can correctly recognize/link all workspaces during the cached install step in
Dockerfile.dev.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dockerfile.devonly copiedfn-appandfn-runtimepackage.json manifests beforepnpm install --frozen-lockfile. After PR feat(packages): extract fn-types; make fn-runtime/fn-app publishable (Wave 1 of portable-functions toolkit) #41 addedfn-types,fn-generator,fn-client, andfn-clitopackages/, those four workspaces were absent at install time, so pnpm never created theirnode_modules/@constructive-io/*symlinks.pnpm buildstep then failed inside the Docker image withTS2307: Cannot find module '@constructive-io/fn-types'whenfn-generatorcompiled, breaking the CI Test K8s workflow onmain(see run 25620376079).COPY packages/<pkg>/package.jsonlines so all workspace manifests are present before install.Why the other CI workflows stayed green
CIandTestsrunpnpm installagainst the full source tree (every workspace package is visible from the start), so they never hit this code path. OnlyCI Test K8sbuildsDockerfile.devvia Skaffold.Test plan
docker build -f Dockerfile.dev -t constructive-functions:fix-ci-test .succeeds locally (previously failed identically to CI).packages/fn-generator/node_modules/@constructive-io/fn-typesresolves to the workspace package andpackages/fn-types/dist/is populated.