Repository navigation
ci: reuse main designer image cache - #9
Conversation
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex (applied directly; nested CLI not launched in the k8s run pod).
Reviewed head: 5c6393b
Looks good. Small, correctly-scoped change: PRs get read-only cache access, cache export and publication stay gated to push on main.
Critical Issues (0)
Important Issues (0)
Suggestions (2)
- [pr-review-toolkit/code]
.github/workflows/docker-pod.yml:13-31—Dockerfile.podnowCOPYsscripts/postinstall.mjsinto thenpm cilayer, but that path is not in eitherpaths:filter. A PR that only editspostinstall.mjs(or deletes/renames it) won't run this image build, so a brokenCOPYwould first show up on an unrelated later change. Consider adding"scripts/postinstall.mjs"to both lists. - [gstack/review]
.github/workflows/docker-pod.yml:44-46— the pull-only cache credentials are exported as job-levelenv, so every step in the job (including third-party actions) can read them, not only the login step. The secret is pull-only and fork PRs never receive it, so the exposure is small; scoping it to the step would be tighter, e.g. keep theif:onsecrets.HARBOR_CACHE_PULL_PASSWORD != ''via a step-levelenvand referencesecrets.*directly inwith:.
Strengths
- The
env.CACHE_PULL_PASSWORD != ''guard makes fork PRs (no secrets) and the not-yet-provisioned credential case degrade to a cold-cache build instead of failing the login step. cache-toremains restricted topush+refs/heads/main, so PR builds cannot poison the shared:buildcache.- Copying only
scripts/postinstall.mjsbeforenpm cikeeps the dependency layer's cache key narrow, instead ofCOPY scripts/.
Recommended Action
- No blocking changes requested.
- Merge once the remaining required CI checks finish green.
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex (applied directly; nested CLI not launched in the k8s run pod).
Reviewed head: e074f96
Looks good. The new commit since the previous review (5c6393b → e074f96, Dockerfile.pod only) fixes the skill copy path: node:24-bookworm-slim uses the npm prefix /usr/local, so npm i -g ./pro-vi-designer-*.tgz installs to /usr/local/lib/node_modules, and the old /usr/lib/node_modules/... source would have failed the cp. Neither scripts/entrypoint-pod.sh nor scripts/designer-chrome-pod.sh references the old path.
Critical Issues (0)
Important Issues (0)
Suggestions (3)
- [pr-review-toolkit/comments]
Dockerfile.pod:18— the header usage example still saysCOPY --from=designer-runtime /usr/lib/node_modules/@blockcast/designer .... The package actually installs as@pro-vi/designerunder/usr/local/lib/node_modules, so anyone copying that example gets a missing-path build error. Worth updating alongside this fix. - [pr-review-toolkit/code]
.github/workflows/docker-pod.ymlpaths:filters — still carried from the previous head:scripts/postinstall.mjsis nowCOPYed beforenpm cibut is not in the trigger paths, so a PR touching only that file won't exercise the image build. - [gstack/review]
.github/workflows/docker-pod.yml:44-46— still carried: the pull-only cache credentials are job-levelenv, visible to every step. Pull-only and absent on fork PRs, so low exposure; step-level scoping would be tighter.
Strengths
- Root-cause fix (correct global prefix for the official node image) rather than a symlink or
npm config set prefixworkaround. cache-tostays restricted topushonmain; PR builds only read the shared cache, and the empty-secret guard keeps fork PRs on a cold-cache build.
Recommended Action
- No blocking changes requested.
- Merge once the remaining required CI checks finish green.
What changed
scripts/postinstall.mjsinto the Docker build context beforenpm ci, so the declaredpostinstallhook works in the clean image build.designer/designer-runtime:buildcache.main; pull requests remain build-only.Validation
yq e '"'"'.'"'"' .github/workflows/docker-pod.ymlgit diff --checknpm ci --no-audit --no-fundnpm run checknpm run buildThe shared cache namespace may initially miss until its Harbor project/credential setup is complete; the build still succeeds from a cold cache.